mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Imported 620a7d78d1
This commit is contained in:
parent
9e3684d6ca
commit
77c1e8b694
@ -1,12 +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="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
|
||||
C16,4.6,15.9,4.4,15.7,4.2z"/>
|
||||
<path fill="#FFFFFF" d="M10.8,8c0,1,0,2,0,3c0,0.4-0.1,0.6-0.5,0.7C9.5,11.8,8.8,12,8.1,12c-1.6,0-2.5-0.7-2.7-2.3
|
||||
C5.1,8,5.3,6.3,5.2,4.7c0-0.3,0.1-0.3,0.4-0.3c1-0.1,1.1-0.1,1.1,1c0,1.1,0,2.2,0,3.3c0,1.5,0.6,1.9,2.1,1.8c0.4,0,0.5-0.2,0.5-0.6
|
||||
c0-1.6,0-3.3,0-4.9c0-0.6,0.2-0.7,0.8-0.7c0.5,0,0.8,0,0.7,0.7C10.7,6,10.8,7,10.8,8z"/>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" x="0px" y="0px" height="24px" width="24px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#808080"/>
|
||||
<path style="color:#000000;enable-background:accumulate;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/>
|
||||
<path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
@ -1,12 +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="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
|
||||
C16,4.6,15.9,4.4,15.7,4.2z"/>
|
||||
<path fill="#FFFFFF" d="M10.8,8c0,1,0,2,0,3c0,0.4-0.1,0.6-0.5,0.7C9.5,11.8,8.8,12,8.1,12c-1.6,0-2.5-0.7-2.7-2.3
|
||||
C5.1,8,5.3,6.3,5.2,4.7c0-0.3,0.1-0.3,0.4-0.3c1-0.1,1.1-0.1,1.1,1c0,1.1,0,2.2,0,3.3c0,1.5,0.6,1.9,2.1,1.8c0.4,0,0.5-0.2,0.5-0.6
|
||||
c0-1.6,0-3.3,0-4.9c0-0.6,0.2-0.7,0.8-0.7c0.5,0,0.8,0,0.7,0.7C10.7,6,10.8,7,10.8,8z"/>
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" x="0px" y="0px" height="24px" width="24px" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<path stroke-linejoin="round" d="M8,16c7-4,7-4,7-14-3,0-4,0-7-2m0,16c-7-4-7-4-7-14,3,0,4,0,7-2" fill-rule="nonzero" stroke="#FFF" stroke-linecap="round" stroke-miterlimit="4" stroke-width="0.12500024" fill="#800000"/>
|
||||
<path style="color:#000000;enable-background:accumulate;" fill="#FFF" d="m9.5001,4.9981c-1.3748,0-2.5,1.1252-2.5,2.5s1.1252,2.5,2.5,2.5,2.5-1.1252,2.5-2.5-1.1252-2.5-2.5-2.5zm0,1c0.83435,0,1.5,0.66565,1.5,1.5s-0.66565,1.5-1.5,1.5-1.5-0.66565-1.5-1.5,0.66565-1.5,1.5-1.5z"/>
|
||||
<path fill="#FFF" stroke-width="0" stroke-miterlimit="4" d="m7.9996,8.0002c0,1.375-0.625,2-2,2s-2-0.625-2-2v-2.9998h1.0001v3c0,0.875,0.125,1,1,1s1-0.125,1-1v-3h1z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
@ -498,26 +498,26 @@ var windowWatcher = {
|
||||
|
||||
var attachToTabBrowser = function(window, tabBrowser) {
|
||||
if (!tabBrowser) {
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var tabContainer;
|
||||
if ( tabBrowser.deck ) {
|
||||
// Fennec
|
||||
tabContainer = tabBrowser.deck;
|
||||
} else if ( tabBrowser.tabContainer ) {
|
||||
// desktop Firefox
|
||||
tabContainer = tabBrowser.tabContainer;
|
||||
if ( tabBrowser.deck ) {
|
||||
// Fennec
|
||||
tabContainer = tabBrowser.deck;
|
||||
} else if (tabBrowser.tabContainer) {
|
||||
// desktop Firefox
|
||||
tabContainer = tabBrowser.tabContainer;
|
||||
vAPI.contextMenu.register(window.document);
|
||||
if (vAPI.toolbarButton.attachToNewWindow) {
|
||||
vAPI.toolbarButton.attachToNewWindow(window);
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
tabContainer.addEventListener('TabClose', tabWatcher.onTabClose);
|
||||
tabContainer.addEventListener('TabSelect', tabWatcher.onTabSelect);
|
||||
tabContainer.addEventListener('TabClose', tabWatcher.onTabClose);
|
||||
tabContainer.addEventListener('TabSelect', tabWatcher.onTabSelect);
|
||||
// when new window is opened TabSelect doesn't run on the selected tab?
|
||||
}
|
||||
|
||||
@ -1953,9 +1953,9 @@ vAPI.toolbarButton.init = function() {
|
||||
|
||||
var forceLegacyToolbarButton = vAPI.localStorage.getBool("forceLegacyToolbarButton");
|
||||
if (!forceLegacyToolbarButton) {
|
||||
try {
|
||||
CustomizableUI = Cu.import('resource:///modules/CustomizableUI.jsm', null).CustomizableUI;
|
||||
} catch (ex) {
|
||||
try {
|
||||
CustomizableUI = Cu.import('resource:///modules/CustomizableUI.jsm', null).CustomizableUI;
|
||||
} catch (ex) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1985,8 +1985,8 @@ vAPI.toolbarButton.init = function() {
|
||||
addLegacyToolbarButton(window);
|
||||
}
|
||||
}, 250);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
var toolbarButton = document.createElement('toolbarbutton');
|
||||
toolbarButton.setAttribute('id', legacyButtonId);
|
||||
@ -2183,7 +2183,6 @@ vAPI.toolbarButton.init = function() {
|
||||
};
|
||||
|
||||
CustomizableUI.createWidget(this);
|
||||
|
||||
|
||||
cleanupTasks.push(function() {
|
||||
if ( this.CUIEvents ) {
|
||||
@ -2242,12 +2241,14 @@ vAPI.toolbarButton.populatePanel = function(doc, panel) {
|
||||
|
||||
// Sanity check
|
||||
attempts = (attempts || 0) + 1;
|
||||
if (attempts > 1000) {
|
||||
console.error('uBlock> delayedResize: giving up after too many attemps');
|
||||
if (attempts > 1/*000*/) {
|
||||
debugger;
|
||||
console.error('uBlock> delayedResize: giving up after too many attempts');
|
||||
return;
|
||||
}
|
||||
|
||||
updateTimer = vAPI.setTimeout(resizePopup, 10, attempts); };
|
||||
updateTimer = vAPI.setTimeout(resizePopup, 10, attempts);
|
||||
};
|
||||
var resizePopup = function(attempts) {
|
||||
updateTimer = null;
|
||||
var body = iframe.contentDocument.body;
|
||||
@ -2268,6 +2269,8 @@ vAPI.toolbarButton.populatePanel = function(doc, panel) {
|
||||
delayedResize(attempts);
|
||||
}
|
||||
};
|
||||
|
||||
var CustomizableUI = this.CustomizableUI;
|
||||
var onPopupReady = function() {
|
||||
var win = this.contentWindow;
|
||||
|
||||
@ -2276,7 +2279,6 @@ vAPI.toolbarButton.populatePanel = function(doc, panel) {
|
||||
}
|
||||
|
||||
if (CustomizableUI) {
|
||||
|
||||
// https://github.com/gorhill/uBlock/issues/83
|
||||
// Add `portrait` class if width is constrained.
|
||||
try {
|
||||
@ -2287,11 +2289,6 @@ vAPI.toolbarButton.populatePanel = function(doc, panel) {
|
||||
} catch (ex) {
|
||||
/* noop */
|
||||
}
|
||||
var placement = CustomizableUI.getPlacementOfWidget(widgetId);
|
||||
if (placement.area === CustomizableUI.AREA_PANEL) {
|
||||
// Add some overrides for displaying the popup correctly in a panel
|
||||
win.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils)
|
||||
.loadSheet(Services.io.newURI(vAPI.getURL("css/popup-vertical.css"), null, null), Ci.nsIDOMWindowUtils.AUTHOR_SHEET);
|
||||
}
|
||||
|
||||
new win.MutationObserver(delayedResize).observe(win.document.body, {
|
||||
|
@ -38,8 +38,8 @@ vAPI.sessionId = String.fromCharCode(Date.now() % 26 + 97) +
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
vAPI.setTimeout = vAPI.setTimeout || function(callback, delay) {
|
||||
return setTimeout(function() { callback(); }, delay);
|
||||
vAPI.setTimeout = vAPI.setTimeout || function(callback, delay, args) {
|
||||
return setTimeout(function(args) { callback(args); }, delay, args);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -40,8 +40,8 @@ var vAPI = self.vAPI = self.vAPI || {};
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
vAPI.setTimeout = vAPI.setTimeout || function(callback, delay) {
|
||||
return setTimeout(function() { callback(); }, delay);
|
||||
vAPI.setTimeout = vAPI.setTimeout || function(callback, delay, args) {
|
||||
return setTimeout(function(args) { callback(args); }, delay, args);
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -952,9 +952,6 @@ var startPicker = function(details) {
|
||||
showDialog({ modifier: true });
|
||||
return;
|
||||
}
|
||||
|
||||
// A target was specified, but it wasn't found: abort.
|
||||
stopPicker();
|
||||
};
|
||||
|
||||
/******************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user