Skip to content

Commit

Permalink
PSDLE - Close button
Browse files Browse the repository at this point in the history
Fixes #97
Fixes #115
  • Loading branch information
RePod committed Jul 8, 2024
1 parent b003df0 commit 2b8c06e
Show file tree
Hide file tree
Showing 10 changed files with 91 additions and 52 deletions.
6 changes: 3 additions & 3 deletions _src/base/gotham/psdle.gotham.includes.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*! psdle 4.1.4 (c) RePod, MIT https://github.com/RePod/psdle/blob/master/LICENSE - base - compiled 2023-04-28 */
/*! psdle 4.2.0 (c) RePod, MIT https://github.com/RePod/psdle/blob/master/LICENSE - base - compiled 2024-07-08 */
var repod = {}
repod.psdle = {
config: {
version: "4.1.4",
versionDate: "2023-04-28"
version: "4.2.0",
versionDate: "2024-07-08"
},
init: function() {
console.log(`PSDLE ${this.config.version} ${this.config.versionDate}`)
Expand Down
4 changes: 2 additions & 2 deletions _src/base/gotham/psdle.gotham.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions _src/base/gotham/psdle.gotham.user.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*! psdle 4.1.4 (c) RePod, MIT https://github.com/RePod/psdle/blob/master/LICENSE - user+base - compiled 2023-04-28 */
/*! psdle 4.2.0 (c) RePod, MIT https://github.com/RePod/psdle/blob/master/LICENSE - user+base - compiled 2024-07-08 */
// ==UserScript==
// @author RePod
// @name PSDLE for Greasemonkey (gotham)
// @description Improving everyone's favorite online download list, one loop at a time.
// @namespace https://github.com/RePod/psdle
// @homepage https://repod.github.io/psdle/
// @version 4.1.4
// @version 4.2.0
// @include /https://store.playstation.com/*/
// @include /https://library.playstation.com/*/
// @exclude /https://store.playstation.com/(cam|liquid)/*/
Expand All @@ -26,12 +26,12 @@ Alternatively, reconfigure the updating settings in your Userscript manager.
*/


/*! psdle 4.1.4 (c) RePod, MIT https://github.com/RePod/psdle/blob/master/LICENSE - base - compiled 2023-04-28 */
/*! psdle 4.2.0 (c) RePod, MIT https://github.com/RePod/psdle/blob/master/LICENSE - base - compiled 2024-07-08 */
var repod = {}
repod.psdle = {
config: {
version: "4.1.4",
versionDate: "2023-04-28"
version: "4.2.0",
versionDate: "2024-07-08"
},
init: function() {
console.log(`PSDLE ${this.config.version} ${this.config.versionDate}`)
Expand Down
8 changes: 8 additions & 0 deletions _src/base/valkyrie/css/psdle.css
Original file line number Diff line number Diff line change
Expand Up @@ -631,3 +631,11 @@ span[id^=system_],
.psdledark tr:nth-child(2n) {
background-color: rgb(57, 57, 57)
}

button.psdleClose {
cursor: pointer;
position: absolute;
top: 0px;
right: 0px;
z-index: 10001;
}
2 changes: 1 addition & 1 deletion _src/base/valkyrie/css/psdle.min.css

Large diffs are not rendered by default.

23 changes: 14 additions & 9 deletions _src/base/valkyrie/psdle.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ repod.psdle = {
.slideUp(function() {
$(this).children().remove();

content.append(
$("<button />", {class: "page-header__close-button psdleClose"})
.on("click", function () { $("#muh_games_container").slideUp(function() { $(this).remove() }) })
)

$(this)
.append(content)
.toggleClass("psdledark", that.dark)
Expand All @@ -165,8 +170,8 @@ repod.psdle = {
var that = this;
var t = $("<div />", {class:'psdle tagline'});
t.append($("<span />", {id:'psdle_night', text: "Night Mode"}).on("click", function() { that.darkCSS(); }))
.append(" | ")
.append($("<span />", {id:'dropCache', text: "Clear Catalog Cache"}).on("click", function() { repod.psdle.database.drop(); }))
//.append(" | ")
//.append($("<span />", {id:'dropCache', text: "Clear Catalog Cache"}).on("click", function() { repod.psdle.database.drop(); }))
.append("<br><a href='//repod.github.io/psdle#support' target='_blank'>Support PSDLE</a> | <a href='//github.com/RePod/psdle/wiki/Submit-a-Bug-or-Translation' target='_blank'>Submit Bug/Translation</a> | ")
.append($("<span />", {id:'dump_raw', text: "Dump Raw"}).on("click", function() {
repod.psdle.macrossBrain(function(raw) {
Expand Down Expand Up @@ -360,7 +365,7 @@ repod.psdle = {
rawEntitlements: [],
macrossBrain: function(callback) {
var that = this // The classic

query = window.GrandCentralCore.createQueryString({
// start >= total = bad time with the API!
start: this.rawEntitlements.length,
Expand All @@ -375,12 +380,12 @@ repod.psdle = {
.then(function (response) {
console.log("PSDLE | Fetching Entitlements", that.rawEntitlements, response)
that.rawEntitlements = that.rawEntitlements.concat(response.entitlements)

// should never be greater than, but just in case
if (response.entitlements == undefined ||
response.entitlements.length <= 450 &&
that.rawEntitlements.length >= response.total_results
) {
) {
callback(that.rawEntitlements)
} else {
that.macrossBrain(callback)
Expand All @@ -395,7 +400,7 @@ repod.psdle = {
this.macrossBrain(function(e) { that.generateList(e) })
return;
}

entitlements = entitlements.filter(obj => obj !== null);

console.log("PSDLE | Generating download list.", entitlements);
Expand Down Expand Up @@ -510,7 +515,7 @@ repod.psdle = {
stats: { fine: 0, generic: 0, expired: 0, service: 0, video: 0 },
isValidContent: function(obj) {
if (obj == undefined) return 0;

var exp = (obj.license) ? obj.license.expiration : obj.inactive_date,
inf = (obj.license) ? obj.license.infinite_duration : false;

Expand Down Expand Up @@ -883,9 +888,9 @@ repod.psdle = {
that.setIcon(index);
return 0;
}

// Assume API icons from now on.

$.extend(repod.psdle.gamelist[index],{safe_icon: true, icon: u});
that.setIcon(index);

Expand Down
31 changes: 18 additions & 13 deletions _src/base/valkyrie/psdle.valkyrie.includes.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _src/base/valkyrie/psdle.valkyrie.min.js

Large diffs are not rendered by default.

53 changes: 37 additions & 16 deletions _src/base/valkyrie/psdle.valkyrie.user.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _src/psdle.user.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// @description Improving everyone's favorite online download list, one loop at a time.
// @namespace https://github.com/RePod/psdle
// @homepage https://repod.github.io/psdle/
// @version 4.1.4
// @version 4.2.0
// @include /https://store.playstation.com/*/
// @include /https://library.playstation.com/*/
// @exclude /https://store.playstation.com/(cam|liquid)/*/
Expand Down

0 comments on commit 2b8c06e

Please sign in to comment.