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 +} diff --git a/chrome/content/linkPropsPlus.js b/chrome/content/linkPropsPlus.js index 2974fb8..02c2ebd 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) { @@ -1647,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; @@ -2353,4 +2351,4 @@ var linkPropsPlusSvc = { return true; } }; -linkPropsPlusSvc.instantInit(); \ No newline at end of file +linkPropsPlusSvc.instantInit(); diff --git a/chrome/content/ownWindow.js b/chrome/content/ownWindow.js index 32d2d74..d412a87 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) @@ -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 +}; 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 +