diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index c901bc96e..e583a5f51 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1043,7 +1043,7 @@ class Pref_Feeds extends Handler_Protected {
= __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") ?>
-
+
= __('Display published OPML URL') ?>
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index a100a546d..321ddf6d3 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -587,64 +587,6 @@ const CommonDialogs = {
dialog.show();
},
- publishedOPML: function() {
-
- Notify.progress("Loading, please wait...", true);
-
- xhr.json("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => {
- try {
- const dialog = new fox.SingleUseDialog({
- title: __("Public OPML URL"),
- regenOPMLKey: function() {
- if (confirm(__("Replace current OPML publishing address with a new one?"))) {
- Notify.progress("Trying to change address...", true);
-
- xhr.json("backend.php", {op: "pref-feeds", method: "regenOPMLKey"}, (reply) => {
- if (reply) {
- const new_link = reply.link;
- const target = this.domNode.querySelector('.generated_url');
-
- if (new_link && target) {
- target.href = new_link;
- target.innerHTML = new_link;
-
- Notify.close();
-
- } else {
- Notify.error("Could not change feed URL.");
- }
- }
- });
- }
- return false;
- },
- content: `
- ${__("Your Public OPML URL is:")}
-
-
-
- ${__('Generate new URL')}
-
-
- ${__('Close this window')}
-
-
- `
- });
-
- dialog.show();
-
- Notify.close();
-
- } catch (e) {
- App.Error.report(e);
- }
- });
- },
generatedFeed: function(feed, is_cat, search = "") {
Notify.progress("Loading, please wait...", true);
diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js
index d27e0e071..62f6d91b1 100644
--- a/js/PrefHelpers.js
+++ b/js/PrefHelpers.js
@@ -347,5 +347,62 @@ const Helpers = {
console.log("export");
window.open("backend.php?op=opml&method=export&" + dojo.formToQuery("opmlExportForm"));
},
+ publish: function() {
+ Notify.progress("Loading, please wait...", true);
+
+ xhr.json("backend.php", {op: "pref-feeds", method: "getOPMLKey"}, (reply) => {
+ try {
+ const dialog = new fox.SingleUseDialog({
+ title: __("Public OPML URL"),
+ regenOPMLKey: function() {
+ if (confirm(__("Replace current OPML publishing address with a new one?"))) {
+ Notify.progress("Trying to change address...", true);
+
+ xhr.json("backend.php", {op: "pref-feeds", method: "regenOPMLKey"}, (reply) => {
+ if (reply) {
+ const new_link = reply.link;
+ const target = this.domNode.querySelector('.generated_url');
+
+ if (new_link && target) {
+ target.href = new_link;
+ target.innerHTML = new_link;
+
+ Notify.close();
+
+ } else {
+ Notify.error("Could not change feed URL.");
+ }
+ }
+ });
+ }
+ return false;
+ },
+ content: `
+ ${__("Your Public OPML URL is:")}
+
+
+
+ ${__('Generate new URL')}
+
+
+ ${__('Close this window')}
+
+
+ `
+ });
+
+ dialog.show();
+
+ Notify.close();
+
+ } catch (e) {
+ App.Error.report(e);
+ }
+ });
+ },
}
};