aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2019-06-22 00:18:14 +0200
committerAlessio Vanni <vannilla@firemail.cc>2019-06-22 00:18:14 +0200
commit3cc75d0a0da35336b9c12377ea1c63990f55be31 (patch)
tree9ad98ecef6558705177d3cc9d1071f62054f5414
parentd5f07761dcaad4128a222537fc36d49e1debb55b (diff)
downloadematrix-3cc75d0a0da35336b9c12377ea1c63990f55be31.tar.lz
ematrix-3cc75d0a0da35336b9c12377ea1c63990f55be31.tar.xz
ematrix-3cc75d0a0da35336b9c12377ea1c63990f55be31.zip
Remove commented-out region
-rw-r--r--js/vapi-background.js132
1 files changed, 0 insertions, 132 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js
index a482af6..a809b48 100644
--- a/js/vapi-background.js
+++ b/js/vapi-background.js
@@ -1984,138 +1984,6 @@
};
})();
-
- /*
- (function() {
- // Add toolbar button for Basilisk
- if (Services.appinfo.ID !== "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}") {
- return;
- }
-
- var tbb = vAPI.toolbarButton;
- if ( tbb.init !== null ) {
- return;
- }
-
- if ( Services.vc.compare(Services.appinfo.version, '36.0') >= 0 ) {
- return null;
- }
- var CustomizableUI = null;
- try {
- CustomizableUI = Cu.import('resource:///modules/CustomizableUI.jsm', null).CustomizableUI;
- } catch (ex) {
- }
- if ( CustomizableUI === null ) {
- return;
- }
- tbb.codePath = 'australis';
- tbb.CustomizableUI = CustomizableUI;
- tbb.defaultArea = CustomizableUI.AREA_NAVBAR;
-
- var styleURI = null;
-
- var onPopupCloseRequested = function({target}) {
- if ( typeof tbb.closePopup === 'function' ) {
- tbb.closePopup(target);
- }
- };
-
- var shutdown = function() {
- CustomizableUI.destroyWidget(tbb.id);
-
- for ( var win of winWatcher.getWindows() ) {
- var panel = win.document.getElementById(tbb.viewId);
- panel.parentNode.removeChild(panel);
- win.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils)
- .removeSheet(styleURI, 1);
- }
-
- vAPI.messaging.globalMessageManager.removeMessageListener(
- location.host + ':closePopup',
- onPopupCloseRequested
- );
- };
-
- tbb.onBeforeCreated = function(doc) {
- var panel = doc.createElement('panelview');
-
- this.populatePanel(doc, panel);
-
- doc.getElementById('PanelUI-multiView').appendChild(panel);
-
- doc.defaultView.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIDOMWindowUtils)
- .loadSheet(styleURI, 1);
- };
-
- tbb.onBeforePopupReady = function() {
- // https://github.com/gorhill/uBlock/issues/83
- // Add `portrait` class if width is constrained.
- try {
- this.contentDocument.body.classList.toggle(
- 'portrait',
- CustomizableUI.getWidget(tbb.id).areaType === CustomizableUI.TYPE_MENU_PANEL
- );
- } catch (ex) {
- // noop
- }
- };
-
- tbb.init = function() {
- vAPI.messaging.globalMessageManager.addMessageListener(
- location.host + ':closePopup',
- onPopupCloseRequested
- );
-
- var style = [
- '#' + this.id + '.off {',
- 'list-style-image: url(',
- vAPI.getURL('img/browsericons/icon19-off.png'),
- ');',
- '}',
- '#' + this.id + ' {',
- 'list-style-image: url(',
- vAPI.getURL('img/browsericons/icon19.png'),
- ');',
- '}',
- '#' + this.viewId + ', #' + this.viewId + ' > iframe {',
- 'width: 160px;',
- 'height: 290px;',
- 'overflow: hidden !important;',
- '}',
- '#' + this.id + '[badge]:not([badge=""])::after {',
- 'position: absolute;',
- 'margin-left: -16px;',
- 'margin-top: 3px;',
- 'padding: 1px 2px;',
- 'font-size: 9px;',
- 'font-weight: bold;',
- 'color: #fff;',
- 'background: #000;',
- 'content: attr(badge);',
- '}'
- ];
-
- styleURI = Services.io.newURI(
- 'data:text/css,' + encodeURIComponent(style.join('')),
- null,
- null
- );
-
- this.closePopup = function(tabBrowser) {
- CustomizableUI.hidePanelForNode(
- tabBrowser.ownerDocument.getElementById(this.viewId)
- );
- };
-
- CustomizableUI.createWidget(this);
-
- cleanupTasks.push(shutdown);
- };
- })();
- */
-
(function() {
// It appears that this branch actually works on the latest
// Basilisk. Maybe we can simply use this one directly instead of