From d9b23d4f109881a87e2516aee31c20f23105c90e Mon Sep 17 00:00:00 2001 From: AlexVallat Date: Sat, 25 Apr 2015 14:08:01 +0100 Subject: [PATCH] Fixing for PaleMoon under Linux, and general cosmetic improvements to button. Also possibly fix SeaMonkey static filtering broken until settings reset issue. --- platform/firefox/css/legacy-toolbar-button.css | 11 ++++++++--- platform/firefox/frameModule.js | 14 ++++++++------ .../{icon32-off.svg => icon-large-off.svg} | 2 +- .../browsericons/{icon32.svg => icon-large.svg} | 2 +- platform/firefox/vapi-background.js | 11 +++++++---- 5 files changed, 25 insertions(+), 15 deletions(-) rename platform/firefox/img/browsericons/{icon32-off.svg => icon-large-off.svg} (94%) rename platform/firefox/img/browsericons/{icon32.svg => icon-large.svg} (94%) diff --git a/platform/firefox/css/legacy-toolbar-button.css b/platform/firefox/css/legacy-toolbar-button.css index 2e2f34505..f29052ab7 100644 --- a/platform/firefox/css/legacy-toolbar-button.css +++ b/platform/firefox/css/legacy-toolbar-button.css @@ -1,8 +1,8 @@ #uBlock-legacy-button { - list-style-image: url('../img/browsericons/icon32.svg'); + list-style-image: url('../img/browsericons/icon-large.svg'); } #uBlock-legacy-button.off { - list-style-image: url('../img/browsericons/icon32-off.svg'); + list-style-image: url('../img/browsericons/icon-large-off.svg'); } toolbar[iconsize="small"] #uBlock-legacy-button { @@ -28,10 +28,15 @@ toolbar[iconsize="small"] #uBlock-legacy-button.off { /* Override off state when in palette */ toolbarpaletteitem #uBlock-legacy-button.off { - list-style-image: url('../img/browsericons/icon32.svg'); + list-style-image: url('../img/browsericons/icon-large.svg'); } /* Override badge when in palette */ toolbarpaletteitem #uBlock-legacy-button[badge]::before { content: none; +} + +/* Prevent pale moon from showing the arrow underneath the button */ +#uBlock-legacy-button .toolbarbutton-menu-dropmarker { + -moz-box-orient: horizontal; } \ No newline at end of file diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index 71ce100ca..57952acde 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -294,13 +294,15 @@ const contentObserver = { let doc = e.target; doc.removeEventListener(e.type, docReady, true); - // It is possible, in some cases (#1140) for document-element-inserted to occur *before* nsIWebProgressListener.onLocationChange, so ensure that the URL is correct before continuing - let messageManager = doc.docShell.getInterface(Ci.nsIContentFrameMessageManager); + if (doc.docShell) { + // It is possible, in some cases (#1140) for document-element-inserted to occur *before* nsIWebProgressListener.onLocationChange, so ensure that the URL is correct before continuing + let messageManager = doc.docShell.getInterface(Ci.nsIContentFrameMessageManager); - messageManager.sendSyncMessage(locationChangedMessageName, { - url: loc.href, - noRefresh: true, // If the URL is the same, then don't refresh it so that if this occurs after onLocationChange, no the block count isn't reset - }); + messageManager.sendSyncMessage(locationChangedMessageName, { + url: loc.href, + noRefresh: true, // If the URL is the same, then don't refresh it so that if this occurs after onLocationChange, no the block count isn't reset + }); + } lss(this.contentBaseURI + 'contentscript-end.js', sandbox); diff --git a/platform/firefox/img/browsericons/icon32-off.svg b/platform/firefox/img/browsericons/icon-large-off.svg similarity index 94% rename from platform/firefox/img/browsericons/icon32-off.svg rename to platform/firefox/img/browsericons/icon-large-off.svg index 0b9030845..684a696c9 100644 --- a/platform/firefox/img/browsericons/icon32-off.svg +++ b/platform/firefox/img/browsericons/icon-large-off.svg @@ -1,7 +1,7 @@ + width="24px" height="24px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> + width="24px" height="24px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">