summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-05-07 02:50:51 -0500
committerMatt A. Tobin <email@mattatobin.com>2022-05-07 02:50:51 -0500
commite0b25e26a4dc5dc5fdb146c0326512725ff382cc (patch)
treef7a2d769d0ce78b28be99586a67074fadb53e235
parente8595967f06de28cc8e5a21a63dfa5b61329dd29 (diff)
downloadaura-central-e0b25e26a4dc5dc5fdb146c0326512725ff382cc.tar.gz
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..."
-rw-r--r--apps/navigator/base/content/nsBrowserStatusHandler.js44
1 files 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;