mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 879980 - Subscribe button appears disabled when in the palette, r=mconley
This commit is contained in:
parent
75790d65f1
commit
56fb10a7c5
@ -118,8 +118,15 @@ var FeedHandler = {
|
||||
var haveFeeds = feeds && feeds.length > 0;
|
||||
|
||||
var feedButton = document.getElementById("feed-button");
|
||||
// Don't disable the button for customization mode. We check the URL
|
||||
// here rather than the window's [customizing] attribute because they
|
||||
// do not change at the same time, and the browser's feed info pertains
|
||||
// to the selected page's browser, so using the location ensures
|
||||
// this check is always correct:
|
||||
let contentLoc = window.content && window.content.location.href;
|
||||
let areCustomizing = contentLoc == "about:customizing";
|
||||
if (feedButton)
|
||||
feedButton.disabled = !haveFeeds;
|
||||
feedButton.disabled = !areCustomizing && !haveFeeds;
|
||||
|
||||
if (!haveFeeds) {
|
||||
this._feedMenuitem.setAttribute("disabled", "true");
|
||||
|
@ -456,9 +456,10 @@ const CustomizableWidgets = [{
|
||||
},
|
||||
onCreated: function(node) {
|
||||
let win = node.ownerDocument.defaultView;
|
||||
let selectedBrowser = win.gBrowser.selectedBrowser;
|
||||
let feeds = selectedBrowser && selectedBrowser.feeds;
|
||||
if (!feeds || !feeds.length) {
|
||||
let browser = win.gBrowser.selectedBrowser;
|
||||
let feeds = browser && browser.feeds && browser.feeds.length;
|
||||
let contentURL = browser && browser.currentURI && browser.currentURI.spec;
|
||||
if (contentURL != "about:customizing" && !feeds) {
|
||||
node.setAttribute("disabled", "true");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user