diff --git a/src/js/background.js b/src/js/background.js index 1a80a50..3de3465 100644 --- a/src/js/background.js +++ b/src/js/background.js @@ -11,7 +11,7 @@ * * This will open up a new non-focused tab with the url it was sent */ -chrome.extension.onMessage.addListener( +chrome.runtime.onMessage.addListener( function(messageObject) { chrome.tabs.create({ url: messageObject.url, @@ -38,4 +38,4 @@ chrome.runtime.onInstalled.addListener(function(details) { }); } } -}); \ No newline at end of file +}); diff --git a/src/js/keypress.js b/src/js/keypress.js index 071673c..14b8a64 100644 --- a/src/js/keypress.js +++ b/src/js/keypress.js @@ -13,9 +13,10 @@ '.selectedEntry a.visitWebsiteButton', // the button square button on list view '.list-entries .selected a.visitWebsiteButton', // the button square button on list view 'a.visitWebsiteButton', // the floating one for card view - '.entry.selected a.title' // title bar for active entry in React-based collapsed list view + '.entry.selected a.title', // title bar for active entry in React-based collapsed list view + '[aria-selected="true"] a.article-card' // Oksskolten (feed.jkte.ch) selected article ]; - + /** * Main feedlybackgroundtab constructor */ @@ -57,7 +58,7 @@ } } if (url) { - chrome.extension.sendMessage({url: url.href}); + chrome.runtime.sendMessage({url: url.dataset.originalUrl || url.href}); } else { console.log("Could not find any selectors from: " + selectors.join()); diff --git a/src/manifest.json b/src/manifest.json index 4b146b5..02f8636 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,22 +1,34 @@ { "name": "Feedly Background Tab", - "version": "0.13", - "manifest_version": 2, + "version": "0.14", + "manifest_version": 3, "description": "Open Feedly Links in Background Tab using shortcut key", "content_scripts": [ { - "matches": ["*://*.feedly.com/*"], - "js": ["js/keypress.js"] + "matches": [ + "*://*.feedly.com/*", + "*://feed.jkte.ch/*" + ], + "js": [ + "js/keypress.js" + ] } ], - "background": { "scripts": ["js/background.js"] }, + "background": { + "service_worker": "js/background.js" + }, "options_page": "options.html", "permissions": [ + "storage" + ], + "host_permissions": [ "http://www.feedly.com/*", "http://cloud.feedly.com/*", "https://cloud.feedly.com/*", - "storage" + "https://feed.jkte.ch/*" ], - "minimum_chrome_version": "21", - "icons": { "128": "images/icon_128.png" } + "minimum_chrome_version": "95", + "icons": { + "128": "images/icon_128.png" + } } diff --git a/src/options.html b/src/options.html index e3cc018..0dcf45b 100644 --- a/src/options.html +++ b/src/options.html @@ -76,4 +76,4 @@

FeedlyBackgroundTab Chrome Extension Options

- \ No newline at end of file +