From 059822e195e6e8438421828c3d59b41b998c4990 Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Sun, 21 Sep 2025 12:30:29 +0300 Subject: [PATCH 1/7] simplify .fxVersion getter --- chrome/content/linkPropsPlus.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/linkPropsPlus.js b/chrome/content/linkPropsPlus.js index 2974fb8..3c7f223 100644 --- a/chrome/content/linkPropsPlus.js +++ b/chrome/content/linkPropsPlus.js @@ -71,8 +71,7 @@ var linkPropsPlusSvc = { delete this.fxVersion; var pv = this.appInfo.platformVersion; var v = parseFloat(pv); - var app = this.appInfo.name; - if(app == "Pale Moon" || app == "Iceape-UXP" || app == "Basilisk") + if (["Pale Moon", "Iceape-UXP", "Basilisk"].includes(this.appInfo.name)) return this.fxVersion = v >= 4.1 ? 56 : 28; // https://developer.mozilla.org/en-US/docs/Mozilla/Gecko/Versions if(v < 5) { @@ -2353,4 +2352,4 @@ var linkPropsPlusSvc = { return true; } }; -linkPropsPlusSvc.instantInit(); \ No newline at end of file +linkPropsPlusSvc.instantInit(); From 7cd01953cca70f05b8c4643bbfa3b03c4680fd49 Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Sun, 21 Sep 2025 12:39:07 +0300 Subject: [PATCH 2/7] Simplify conversion to string --- chrome/content/ownWindow.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chrome/content/ownWindow.js b/chrome/content/ownWindow.js index 32d2d74..32121f7 100644 --- a/chrome/content/ownWindow.js +++ b/chrome/content/ownWindow.js @@ -80,7 +80,7 @@ var linkPropsPlusWnd = { this.parentTab = top.gBrowser && top.gBrowser.selectedTab; window.addEventListener("popstate", this, false); } - this.uriChanged(this.autostart); + this.(this.autostart); this.setClickSelectsAll(); this.addTabIcon(); !this.inTab && window.addEventListener("resize", this, false); @@ -370,13 +370,13 @@ var linkPropsPlusWnd = { uriChanged: function(cantGet) { var uri = this.uri; this.cantGet = cantGet || this.svc.activeRequest || !uri; - var notHttp = "" + !/^https?:\//i.test(uri); + var notHttp = (!/^https?:\//i.test(uri)).toString(); var tbr = this.tbReferer; if(tbr.getAttribute("lpp_notUsed") != notHttp) { tbr.setAttribute("lpp_notUsed", notHttp); tbr.previousSibling.setAttribute("lpp_notUsed", notHttp); } - var empty = "" + !uri; + var empty = (!uri).toString(); var tbu = this.tbUri; if(tbu.getAttribute("lpp_empty") != empty) { tbu.setAttribute("lpp_empty", empty); @@ -431,4 +431,4 @@ var linkPropsPlusWnd = { + this.getNumProperty(elt, "borderTopWidth") + this.getNumProperty(elt, "borderBottomWidth") + this.getNumProperty(elt, "marginTop") + this.getNumProperty(elt, "marginBottom"); } -}; \ No newline at end of file +}; From 061ec5f2a3a53ae2f35793278a0a50a7c6027c15 Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Sun, 21 Sep 2025 17:27:54 +0300 Subject: [PATCH 3/7] Minor speed improvement of tooltips updating --- chrome/content/linkPropsPlus.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chrome/content/linkPropsPlus.js b/chrome/content/linkPropsPlus.js index 3c7f223..02c2ebd 100644 --- a/chrome/content/linkPropsPlus.js +++ b/chrome/content/linkPropsPlus.js @@ -1646,8 +1646,7 @@ var linkPropsPlusSvc = { }, updateTooltips: function() { var nodes = this.field.getElementsByTagName("span"); - for(var i = 0, l = nodes.length; i < l; ++i) { - var node = nodes[i]; + for(var node of nodes) { var ttl = node.title || node.getAttribute("lpp_title"); if(!ttl) continue; From 39fe2a0481d2bfe21cfb17e490aeab5b1fdd7654 Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Sun, 21 Sep 2025 19:07:51 +0300 Subject: [PATCH 4/7] Minor speed improvement --- chrome/content/ownWindow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/ownWindow.js b/chrome/content/ownWindow.js index 32121f7..5fbbcbb 100644 --- a/chrome/content/ownWindow.js +++ b/chrome/content/ownWindow.js @@ -245,7 +245,7 @@ var linkPropsPlusWnd = { }, get titleFileName() { var uri = this.svc.directURI || this.svc.requestURI || this.uri; - if(!uri || !this.svc.isValidURI(uri)) + if(!(uri && this.svc.isValidURI(uri))) return ""; var crop = this.pu.get("ownWindow.cropFileNameInTitle"); if(crop <= 0) From 8605264d1867ff19e7126267008f507f4b346e9c Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Sun, 21 Sep 2025 23:25:49 +0300 Subject: [PATCH 5/7] Minor optimization for speed --- chrome/content/headers.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/headers.js b/chrome/content/headers.js index 3bd1b6e..1587b65 100644 --- a/chrome/content/headers.js +++ b/chrome/content/headers.js @@ -41,8 +41,7 @@ function handleTwisty(btn, multiple) { toggleTwisty(btn, show); if(multiple) { var twisties = document.getElementsByTagName("button"); - for(var i = 0, l = twisties.length; i < l; ++i) { - var twisty = twisties[i]; + for(var twisty of twisties) { if(isTwisty(twisty) && twisty != btn) toggleTwisty(twisty, show); } @@ -126,4 +125,4 @@ if(!Object.create) { // Firefox 3.6 and older document.removeEventListener("DOMNodeInserted", updProxy, false); document.removeEventListener("DOMAttrModified", updProxy, false); }, false); -} \ No newline at end of file +} From d1db939b6c28513d505f34685eb9e01e50f0ef96 Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Mon, 22 Sep 2025 01:10:54 +0300 Subject: [PATCH 6/7] Accidental source file damage fixed --- chrome/content/ownWindow.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/ownWindow.js b/chrome/content/ownWindow.js index 5fbbcbb..d412a87 100644 --- a/chrome/content/ownWindow.js +++ b/chrome/content/ownWindow.js @@ -80,7 +80,7 @@ var linkPropsPlusWnd = { this.parentTab = top.gBrowser && top.gBrowser.selectedTab; window.addEventListener("popstate", this, false); } - this.(this.autostart); + this.uriChanged(this.autostart); this.setClickSelectsAll(); this.addTabIcon(); !this.inTab && window.addEventListener("resize", this, false); From 211a46dcaac31319c904fcb2999da776bf5e64a5 Mon Sep 17 00:00:00 2001 From: zanud <76625744+zanud@users.noreply.github.com> Date: Fri, 26 Sep 2025 05:06:59 +0300 Subject: [PATCH 7/7] Sorted out hotkeys conflict in Seamonkey/Iceape --- chrome/locale/ru/mainWindow.dtd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/locale/ru/mainWindow.dtd b/chrome/locale/ru/mainWindow.dtd index 7cbfd80..f37e68a 100644 --- a/chrome/locale/ru/mainWindow.dtd +++ b/chrome/locale/ru/mainWindow.dtd @@ -1,7 +1,7 @@ - + - + - \ No newline at end of file +