From e0b25e26a4dc5dc5fdb146c0326512725ff382cc Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 7 May 2022 02:50:51 -0500 Subject: Revert "[Navigator] Add a shitty hack to enforce feeds are coming from the same domain as the page to avoid a busted feeds button/menu until something better comes along..." --- .../base/content/nsBrowserStatusHandler.js | 44 ++++------------------ 1 file changed, 7 insertions(+), 37 deletions(-) diff --git a/apps/navigator/base/content/nsBrowserStatusHandler.js b/apps/navigator/base/content/nsBrowserStatusHandler.js index 26356a3c6..a35b4c576 100644 --- a/apps/navigator/base/content/nsBrowserStatusHandler.js +++ b/apps/navigator/base/content/nsBrowserStatusHandler.js @@ -134,54 +134,24 @@ nsBrowserStatusHandler.prototype = contentType == "mozilla.application/cached-xul"; }, - fuckOffFeeds : function(popup) { - if (popup) { - while (popup.hasChildNodes()) - popup.lastChild.remove(); - } - - this.feeds = []; - this.feedsMenu.setAttribute("disabled", "true"); - this.feedsButton.hidden = true; - }, - populateFeeds : function(popup) { // First clear out any old items while (popup.hasChildNodes()) popup.lastChild.remove(); - var host = getBrowser().currentURI.host; - - try { - for (var i = 0; i < this.feeds.length; i++) { - var link = this.feeds[i]; - - if (!link.href.contains(host)) { - this.fuckOffFeeds(popup); - return; - } - - var menuitem = document.createElement("menuitem"); - menuitem.className = "menuitem-iconic bookmark-item"; - menuitem.statusText = link.href; - menuitem.setAttribute("label", link.title || link.href); - popup.appendChild(menuitem); - } - } - catch (ex) { - this.fuckOffFeeds(popup); - return; + for (var i = 0; i < this.feeds.length; i++) { + var link = this.feeds[i]; + var menuitem = document.createElement("menuitem"); + menuitem.className = "menuitem-iconic bookmark-item"; + menuitem.statusText = link.href; + menuitem.setAttribute("label", link.title || link.href); + popup.appendChild(menuitem); } }, onFeedAvailable : function(aLink) { - if (!aLink.href.contains(getBrowser().currentURI.host)) { - this.fuckOffFeeds(null); - return; - } - this.feeds.push(aLink); this.feedsMenu.removeAttribute("disabled"); this.feedsButton.hidden = false; -- cgit v1.2.3