diff --git a/chrome/content/zotero/feedSettings.js b/chrome/content/zotero/feedSettings.js
index fd0db9d85a..7eedd14331 100644
--- a/chrome/content/zotero/feedSettings.js
+++ b/chrome/content/zotero/feedSettings.js
@@ -116,12 +116,12 @@ var Zotero_Feed_Settings = new function() {
if (feedReader !== fr || urlTainted) return;
let title = document.getElementById('feed-title');
- if (!data.url && feed.title) {
+ if (feed.title && (!data.url || data.unsaved)) {
title.value = feed.title;
}
let ttl = document.getElementById('feed-ttl');
- if (!data.url && feed.ttl) {
+ if (feed.ttl && (!data.url || data.unsaved)) {
ttl.value = Math.floor(feed.ttl / 60) || 1;
}
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
index c91f098ee6..91f1b4c3a3 100644
--- a/chrome/content/zotero/zoteroPane.js
+++ b/chrome/content/zotero/zoteroPane.js
@@ -113,6 +113,11 @@ var ZoteroPane = new function()
document.getElementById('zotero-pane-stack').setAttribute('oldsearchfield', 'true')
}
+ if (Zotero.isStandalone) {
+ document.getElementById('zotero-tb-feed-add-fromPage').hidden = true;
+ document.getElementById('zotero-tb-feed-add-fromPage-menu').hidden = true;
+ }
+
// register an observer for Zotero reload
observerService = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
@@ -861,7 +866,27 @@ var ZoteroPane = new function()
return collection.saveTx();
});
- this.newFeed = Zotero.Promise.coroutine(function* () {
+ this.newFeedFromPage = Zotero.Promise.coroutine(function* (event) {
+ let data = {unsaved: true};
+ if (event) {
+ data.url = event.target.getAttribute('feed');
+ } else {
+ data.url = gBrowser.selectedBrowser.feeds[0].href;
+ }
+ window.openDialog('chrome://zotero/content/feedSettings.xul',
+ null, 'centerscreen, modal', data);
+ if (!data.cancelled) {
+ let feed = new Zotero.Feed();
+ feed.url = data.url;
+ feed.name = data.title;
+ feed.refreshInterval = data.ttl;
+ feed.cleanupAfter = data.cleanupAfter;
+ yield feed.saveTx();
+ yield feed.updateFeed();
+ }
+ });
+
+ this.newFeedFromURL = Zotero.Promise.coroutine(function* () {
let data = {};
window.openDialog('chrome://zotero/content/feedSettings.xul',
null, 'centerscreen, modal', data);
@@ -2255,7 +2280,6 @@ var ZoteroPane = new function()
"newCollection",
"newSavedSearch",
"newSubcollection",
- "newFeed",
"refreshFeed",
"sep1",
"showDuplicates",
diff --git a/chrome/content/zotero/zoteroPane.xul b/chrome/content/zotero/zoteroPane.xul
index cb7661cc11..d2898e0317 100644
--- a/chrome/content/zotero/zoteroPane.xul
+++ b/chrome/content/zotero/zoteroPane.xul
@@ -58,7 +58,7 @@
-
+
@@ -106,7 +106,19 @@
@@ -245,14 +257,13 @@
-
-
+
-
+
diff --git a/chrome/locale/en-US/zotero/zotero.dtd b/chrome/locale/en-US/zotero/zotero.dtd
index 7a634ca0f0..f9840d84ef 100644
--- a/chrome/locale/en-US/zotero/zotero.dtd
+++ b/chrome/locale/en-US/zotero/zotero.dtd
@@ -105,9 +105,6 @@
-
-
-
@@ -128,6 +125,12 @@
+
+
+
+
+
+