mirror of https://github.com/gorhill/uBlock.git
Fixing for PaleMoon under Linux, and general cosmetic improvements to button. Also possibly fix SeaMonkey static filtering broken until settings reset issue.
This commit is contained in:
parent
5ac4ec21e9
commit
d9b23d4f10
|
@ -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;
|
||||
}
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="32px" height="32px" 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">
|
||||
<path fill="#808080" d="M15.7,4.2c-1.3-1.3-2.6-2.6-3.9-3.9C11.6,0.1,11.3,0,11,0C9,0,7,0,5,0C4.6,0,4.4,0.1,4.2,0.3
|
||||
C2.9,1.6,1.6,2.9,0.3,4.2C0.1,4.4,0,4.6,0,4.9C0,7,0,9,0,11c0,0.3,0.1,0.6,0.3,0.8c1.3,1.3,2.6,2.6,3.8,3.8C4.4,15.9,4.7,16,5,16
|
||||
c1,0,2,0,3,0c1,0,2,0,3,0c0.3,0,0.5,0,0.8-0.3c1.3-1.3,2.6-2.6,3.9-3.9c0.2-0.2,0.3-0.4,0.3-0.7C16,9,16,7,16,4.9
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="32px" height="32px" 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">
|
||||
<path fill="#800000" d="M15.7,4.2c-1.3-1.3-2.6-2.6-3.9-3.9C11.6,0.1,11.3,0,11,0C9,0,7,0,5,0C4.6,0,4.4,0.1,4.2,0.3
|
||||
C2.9,1.6,1.6,2.9,0.3,4.2C0.1,4.4,0,4.6,0,4.9C0,7,0,9,0,11c0,0.3,0.1,0.6,0.3,0.8c1.3,1.3,2.6,2.6,3.8,3.8C4.4,15.9,4.7,16,5,16
|
||||
c1,0,2,0,3,0c1,0,2,0,3,0c0.3,0,0.5,0,0.8-0.3c1.3-1.3,2.6-2.6,3.9-3.9c0.2-0.2,0.3-0.4,0.3-0.7C16,9,16,7,16,4.9
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -511,8 +511,11 @@ vAPI.tabs.get = function(tabId, callback) {
|
|||
|
||||
if ( tabId === null ) {
|
||||
win = Services.wm.getMostRecentWindow('navigator:browser');
|
||||
tab = getTabBrowser(win).selectedTab;
|
||||
tabId = this.getTabId(tab);
|
||||
var tabBrowser = getTabBrowser(win);
|
||||
if (tabBrowser) {
|
||||
tab = tabBrowser.selectedTab;
|
||||
tabId = this.getTabId(tab);
|
||||
}
|
||||
} else {
|
||||
tab = this.getTabsForIds(tabId);
|
||||
if ( tab ) {
|
||||
|
@ -1535,13 +1538,13 @@ vAPI.toolbarButton.init = function() {
|
|||
|
||||
var toolbarButton = document.createElement('toolbarbutton');
|
||||
toolbarButton.setAttribute('id', legacyButtonId);
|
||||
toolbarButton.setAttribute('type', 'panel');
|
||||
toolbarButton.setAttribute('type', 'menu'); // type = panel would be more accurate, but doesn't look as good
|
||||
toolbarButton.setAttribute('removable', 'true');
|
||||
toolbarButton.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional');
|
||||
toolbarButton.setAttribute('label', vAPI.toolbarButton.label);
|
||||
|
||||
var toolbarButtonPanel = document.createElement("panel");
|
||||
toolbarButtonPanel.setAttribute('level', 'parent');
|
||||
// toolbarButtonPanel.setAttribute('level', 'parent'); NOTE: Setting level to parent breaks the popup for PaleMoon under linux (mouse pointer misaligned with content). For some reason.
|
||||
vAPI.toolbarButton.populatePanel(document, toolbarButtonPanel);
|
||||
toolbarButtonPanel.addEventListener('popupshowing', vAPI.toolbarButton.onViewShowing);
|
||||
toolbarButtonPanel.addEventListener('popuphiding', vAPI.toolbarButton.onViewHiding);
|
||||
|
|
Loading…
Reference in New Issue