From a0e0dea78d93a4ffc80b6ea3c11f3cdb0b4f6f46 Mon Sep 17 00:00:00 2001 From: Jonius7 Date: Tue, 2 Nov 2021 09:23:23 +1000 Subject: [PATCH] Fix Change Game Image Grid Sizes, switch to rjsmin temporarily --- fixes.txt | 9 ++++----- js_tweaker.py | 4 ++-- old_glory.py | 4 ++-- old_glory_data.json | 3 ++- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/fixes.txt b/fixes.txt index 6a9806c..61c6fe0 100644 --- a/fixes.txt +++ b/fixes.txt @@ -16,8 +16,7 @@ e.m_nScrollTop = 0, e.m_elTarget e.m_nScrollTop = 30, e.m_elTarget ### === Change Game Image Grid Sizes (optional) - default widths 111, 148, 222 === ###(n = 111, a = !0) : 2 == e ? n = 148 : 3 == e && (n = 222), { (n = 120, a = !0) : 2 == e ? n = 160 : 3 == e && (n = 200), { -###for (var n = [], r = 2; /*for (var n = [], r = 2; -###.apply(console, Object(p.g)([e, t], n)) .apply(console, Object(p.g)([e, t], n))*/ + ### === Vertical Nav Bar (beta, working) === ###x: l, x: 0, @@ -34,13 +33,13 @@ e.m_nScrollTop = 0, e.m_elTarget e.m_nScrollTop = 30, e.m_elTarget ###height: s + "px" height: n ? Math.max(s, 150) + "px" : s + "px" ### === Stop What's New Events from Loading (working, needs more testing) === -###n = E.c.STORE_BASE_URL + "events/ajaxgetbesteventsforuser", n = "", +n = E.c.STORE_BASE_URL + "events/ajaxgetbesteventsforuser", n = "", ### === HOME page Scrolling, reduce number of ComputeLayout calls === -this.props.maxRows < 2 || (t = this.m_elGrid.current.getBoundingClientRect(), n = Math.abs(t.top - this.m_fLastScrollTop), this.props.childHeight * this.props.scaleGridItems / 8 < n && (this.m_fLastScrollTop = t.top, t.top < window.innerHeight && 0 < t.bottom && this.ComputeLayout())) var timeSince;t=this.m_elGrid.current.getBoundingClientRect(),timeSince=performance.now()-this.lastTime,this.lastTime=performance.now(),console.log(timeSince),setTimeout(function(){timeSince>60,this.ComputeLayout()}.bind(this),200) +###this.props.maxRows < 2 || (t = this.m_elGrid.current.getBoundingClientRect(), n = Math.abs(t.top - this.m_fLastScrollTop), this.props.childHeight * this.props.scaleGridItems / 8 < n && (this.m_fLastScrollTop = t.top, t.top < window.innerHeight && 0 < t.bottom && this.ComputeLayout())) var timeSince;t=this.m_elGrid.current.getBoundingClientRect(),timeSince=performance.now()-this.lastTime,this.lastTime=performance.now(),console.log(timeSince),setTimeout(function(){timeSince>60,this.ComputeLayout()}.bind(this),200) ### === Game Properties Window Size === -bForcePopOut: !0,~~popupWidth: 842, popupWidth: 672, +###bForcePopOut: !0,~~popupWidth: 842, popupWidth: 672, ### === CLASSIC Sticky image background and spillover into sidebar (beta) === ###rgHeaderImages: this.props.rgHeaderImages, rgHeaderImages: "", diff --git a/js_tweaker.py b/js_tweaker.py index c808174..ed64773 100644 --- a/js_tweaker.py +++ b/js_tweaker.py @@ -8,7 +8,7 @@ import shutil import traceback import re -from jsmin import jsmin +import rjsmin import time LOCAL_DEBUG = 0 #Set to 1 to not copy files to/from Steam directory @@ -241,7 +241,7 @@ def re_minify_file(): try: print("\nRe-minify JS file") with open("libraryroot.modif.js", "r", newline='', encoding="UTF-8") as js_file: - minified = jsmin(js_file.read()) + minified = rjsmin.jsmin(js_file.read(), keep_bang_comments=True) with open("libraryreet.js", "w", newline='', encoding="UTF-8") as js_min_file: js_min_file.write(minified) js_file.close() diff --git a/old_glory.py b/old_glory.py index 5cb0aa2..0799ad2 100644 --- a/old_glory.py +++ b/old_glory.py @@ -25,8 +25,8 @@ class OldGloryApp(tk.Tk): def __init__(self, *args, **kwargs): - self.version = "v0.9.11.4" - self.release = "5.7.4.1" + self.version = "v0.9.11.5" + self.release = "5.7.4.2" ### Window Frame tk.Tk.__init__(self, *args, **kwargs) diff --git a/old_glory_data.json b/old_glory_data.json index f6d00a4..d436b4c 100644 --- a/old_glory_data.json +++ b/old_glory_data.json @@ -2,7 +2,8 @@ "CSSVariableString": "/* ===== SteamUI-OldGlory will insert CSS Variables from variables.css here ==== */", "CSSBeforeThemes": "// Themes applied before CSS Tweaks", "CSSAfterThemes": "// Themes applied after CSS Tweaks", - "lastPatchedDate": "2021-10-06T18:33:13Z", + "libraryrootFile": "6.css", + "lastPatchedDate": "2021-11-01T22:07:20Z", "themes": { "steam-library": { "author": "Shiina",