aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorMark Powers <markppowers0@gmail.com>2020-11-23 20:21:59 -0600
committerMark Powers <markppowers0@gmail.com>2020-11-23 20:21:59 -0600
commitc5cf1359762274a17fb139944405c02618996700 (patch)
tree69e48f19a6d187eccb8cc50740aadf534781a0de /index.js
parenta0dad259a6c767487be08afc666dbf2c923a6e25 (diff)
Fix youtube feeds
Diffstat (limited to 'index.js')
-rw-r--r--index.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/index.js b/index.js
index 9ba390e..2138dd5 100644
--- a/index.js
+++ b/index.js
@@ -6,14 +6,28 @@ function subscribe_link(feed_url){
}
window.onload = async function () {
- let settings = await browser.storage.sync.get("tr");
+ let settings = await browser.storage.sync.get(["tr", "rb"]);
base_ttrss = settings.tr;
+ let base_rb = settings.rb;
let feeds = document.getElementById('feeds');
feeds.innerText = "Loading..."
browser.tabs.query({ active: true, currentWindow: true }, function (tabs) {
browser.tabs.sendMessage(tabs[0].id, {}).then(
function (feed_urls) {
feeds.innerText = ""
+ if(!base_rb) {
+ let newSettingsLink = document.createElement("a")
+ newSettingsLink["href"] = "/options.html"
+ newSettingsLink.innerText = "RSS-bridge instance not set! Click here to open options.";
+ let newDiv = document.createElement('div');
+ newDiv.append(newSettingsLink);
+ feeds.appendChild(newDiv);
+
+ let newP = document.createElement('p')
+ newP.innerText = `Found ${feed_urls.length} feeds`
+ feeds.append(newP)
+ return;
+ }
feed_urls.forEach(item => {
let newLink = document.createElement('a');