summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/Article.js13
-rw-r--r--js/CommonDialogs.js3
2 files changed, 8 insertions, 8 deletions
diff --git a/js/Article.js b/js/Article.js
index 694c7e616..a57454dec 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -123,15 +123,12 @@ const Article = {
Article.setActive(0);
},
displayUrl: function (id) {
- const query = {op: "Article", method: "getmetadatabyid", id: id};
+ const hl = Headlines.objectById(id);
- xhr.json("backend.php", query, (reply) => {
- if (reply && reply.link) {
- prompt(__("Article URL:"), reply.link);
- } else {
- alert(__("No URL could be displayed for this article."));
- }
- });
+ if (hl?.link)
+ prompt(__("Article URL:"), hl.link);
+ else
+ alert(__("No URL could be displayed for this article."));
},
openInNewWindow: function (id) {
/* global __csrf_token */
diff --git a/js/CommonDialogs.js b/js/CommonDialogs.js
index 1215d567d..781b0dcc5 100644
--- a/js/CommonDialogs.js
+++ b/js/CommonDialogs.js
@@ -195,6 +195,9 @@ const CommonDialogs = {
case 5:
dialog.show_error(__("Couldn't download the specified URL."), App.escapeHtml(rc['message']));
break;
+ case 6:
+ dialog.show_error(__("Invalid content."), App.escapeHtml(rc['message']));
+ break;
case 7:
dialog.show_error(__("Error while creating feed database entry."));
break;