1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-16 23:42:39 +01:00

Merge branch 'master' of https://github.com/chrisaljoudi/uBlock into chrisaljoudi

This commit is contained in:
gorhill 2015-04-20 09:21:05 -04:00
commit 85f8e05080
6 changed files with 40 additions and 4 deletions

View File

@ -29,7 +29,7 @@ uBlock's main goal is to help users neutralize privacy-invading apparatus — ad
#### Installation: #### Installation:
* **Safari**: available to install [from the homepage](https://chrismatic.io/ublock/safari/), or from the [Safari Extension Gallery](https://extensions.apple.com/details/?id=net.chrisaljoudi.uBlock-96G4BAKDQ9). * **Safari**: available to install [from the homepage](https://chrismatic.io/ublock/safari/), or from the [Safari Extension Gallery](https://extensions.apple.com/details/?id=net.gorhill.uBlock-96G4BAKDQ9).
* **Chrome**: available on the [Chrome Web Store](https://chrome.google.com/webstore/detail/ublock/epcnnfbjfcgphgdmggkamkmgojdagdnn) or for [manual](https://github.com/chrisaljoudi/uBlock/tree/master/dist#install) installation. * **Chrome**: available on the [Chrome Web Store](https://chrome.google.com/webstore/detail/ublock/epcnnfbjfcgphgdmggkamkmgojdagdnn) or for [manual](https://github.com/chrisaljoudi/uBlock/tree/master/dist#install) installation.

View File

@ -0,0 +1,23 @@
/* Overrides to popup.css for display in a vertical panel, such as the firefox panel menu */
body {
width: 100%;
}
#panes > div {
display: block;
}
#panes > #dfPane {
width: 100%;
border-right: none;
}
body[dir="ltr"] #panes > #dfPane {
direction: ltr; /* reset scroll bar to the right */
margin-right: 0;
}
body[dir="rtl"] #panes > #dfPane {
direction: rtl; /* reset scroll bar to the left */
margin-left: 0;
}

View File

@ -1467,6 +1467,8 @@ vAPI.toolbarButton.init = function() {
return; return;
} }
this.CustomizableUI = CustomizableUI;
this.defaultArea = CustomizableUI.AREA_NAVBAR; this.defaultArea = CustomizableUI.AREA_NAVBAR;
this.styleURI = [ this.styleURI = [
'#' + this.id + '.off {', '#' + this.id + '.off {',
@ -1479,7 +1481,7 @@ vAPI.toolbarButton.init = function() {
vAPI.getURL('img/browsericons/icon16.svg'), vAPI.getURL('img/browsericons/icon16.svg'),
');', ');',
'}', '}',
'#' + this.viewId + ', #' + this.viewId + ' > iframe {', '#' + this.viewId + ' {',
'width: 160px;', 'width: 160px;',
'height: 290px;', 'height: 290px;',
'overflow: hidden !important;', 'overflow: hidden !important;',
@ -1636,6 +1638,9 @@ vAPI.toolbarButton.onBeforeCreated = function(doc) {
delayedResize(); delayedResize();
} }
}; };
var CustomizableUI = this.CustomizableUI;
var widgetId = this.id;
var onPopupReady = function() { var onPopupReady = function() {
var win = this.contentWindow; var win = this.contentWindow;
@ -1643,6 +1648,13 @@ vAPI.toolbarButton.onBeforeCreated = function(doc) {
return; return;
} }
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, { new win.MutationObserver(delayedResize).observe(win.document.body, {
attributes: true, attributes: true,
characterData: true, characterData: true,

View File

@ -6,7 +6,7 @@
<array> <array>
<dict> <dict>
<key>CFBundleIdentifier</key> <key>CFBundleIdentifier</key>
<string>net.chrisaljoudi.uBlock</string> <string>net.gorhill.uBlock</string>
<key>Developer Identifier</key> <key>Developer Identifier</key>
<string>96G4BAKDQ9</string> <string>96G4BAKDQ9</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>

View File

@ -190,7 +190,7 @@ return asyncJobManager;
if ( vAPI.isBehindTheSceneTabId(tabId) ) { if ( vAPI.isBehindTheSceneTabId(tabId) ) {
return; return;
} }
µb.asyncJobs.add('updateBadge-' + tabId, tabId, updateBadge, 250); µb.asyncJobs.add('updateBadge-' + tabId, tabId, updateBadge, 0);
}; };
return updateBadgeAsync; return updateBadgeAsync;

View File

@ -21,6 +21,7 @@ cp platform/firefox/vapi-*.js $DES/js/
cp platform/firefox/bootstrap.js $DES/ cp platform/firefox/bootstrap.js $DES/
cp platform/firefox/frame*.js $DES/ cp platform/firefox/frame*.js $DES/
cp -R platform/firefox/img $DES/ cp -R platform/firefox/img $DES/
cp -R platform/firefox/css $DES/
cp platform/firefox/chrome.manifest $DES/ cp platform/firefox/chrome.manifest $DES/
cp platform/firefox/install.rdf $DES/ cp platform/firefox/install.rdf $DES/
cp platform/firefox/*.xul $DES/ cp platform/firefox/*.xul $DES/