From 8bb0d3276bb27b73f6e21108f4bd8c5797f3c66d Mon Sep 17 00:00:00 2001 From: Deathamns Date: Wed, 17 Dec 2014 10:33:02 +0100 Subject: [PATCH] Firefox: minor changes --- platform/firefox/chrome.manifest | 2 +- platform/firefox/frameModule.js | 2 +- platform/firefox/vapi-background.js | 12 ++++++++---- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/platform/firefox/chrome.manifest b/platform/firefox/chrome.manifest index 2fa92a86b..5433b6dca 100644 --- a/platform/firefox/chrome.manifest +++ b/platform/firefox/chrome.manifest @@ -1 +1 @@ -content ublock ./ +content ublock ./ diff --git a/platform/firefox/frameModule.js b/platform/firefox/frameModule.js index ce2121980..a48ebdc95 100644 --- a/platform/firefox/frameModule.js +++ b/platform/firefox/frameModule.js @@ -36,7 +36,7 @@ let getMessager = function(win) { }; let contentPolicy = { - classDescription: 'ContentPolicy implementation', + classDescription: 'content-policy implementation for ' + appName, classID: Components.ID('{e6d173c8-8dbf-4189-a6fd-189e8acffd27}'), contractID: '@' + appName + '/content-policy;1', ACCEPT: Ci.nsIContentPolicy.ACCEPT, diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index 92ff9d571..25151cf1f 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -253,9 +253,9 @@ var windowWatcher = { this.removeEventListener(e.type, windowWatcher.onReady); } - var docElement = this.document.documentElement; + var wintype = this.document.documentElement.getAttribute('windowtype'); - if (docElement.getAttribute('windowtype') !== 'navigator:browser') { + if (wintype !== 'navigator:browser') { return; } @@ -637,8 +637,7 @@ vAPI.toolbarButton.add = function(doc) { var iframe = panel.appendChild(doc.createElement('iframe')); iframe.setAttribute('type', 'content'); - panel.style.cssText = iframe.style.cssText - = 'width: 180px; height: 310px; transition: width .1s, height .1s; overflow: hidden'; + panel.style.overflow = iframe.style.overflow = 'hidden'; doc.getElementById('PanelUI-multiView') .appendChild(panel) @@ -698,6 +697,11 @@ vAPI.toolbarButton.add = function(doc) { 'color: #fff;', 'background: #666;', 'content: attr(badge);', + '}', + '#' + this.panelId + ', #' + this.panelId + ' > iframe {', + 'width: 180px;', + 'height: 310px;', + 'transition: width .1s, height .1s;', '}' ].join(''));