-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usage of content scripts #61
Comments
Research ResultThe plot thickens... It happens that the Declarative Content API is very very limited.
I can't have the same behavior, nor show a pop up. The alternative would be, we change the icon to something else, and when clicked, it would have run the content script (using the "activeTab" permission), and then show a page with the feeds it found (no pop up anymore). The amount of change makes me really think about letting this feature go... References
|
Why don't you put the " feed finder feature" optional in the settings ? This way users that don't want a script to be injected inside every page would keep the option disabled. You could also put a button accessible from the toolbar to scan manually the current page for "feeds". Regards |
Hi @mikhoul , sorry for the late reply.
That is an option, I just don't know if it is actually worth it. It would be turned off by default, and I guess most users would never even know it exist.
I am not sure that is actually possible, last time I checked an extension could only have a single button. I think it would be possible to scan the current tab when the button is pressed and show the pop up only then, but having a specific badge when the page contains a feed would not be possible anymore (by the way, please vote for https://bugs.chromium.org/p/chromium/issues/detail?id=893375, that would make it possible to use the declarative content API and show the badge without actually adding a script to every page). |
Reasoning
Although not explicitly mentioned in the Chrome API documentation:
The usage of Content Scripts as used in podStation:
Does cause the installation warning: Read and change all your data on the websites you visit
Why do we use content scripts?
At the moment, we inject the script https://github.com/podStation/podStation/blob/master/extension/feedFinder.js into every visited webpage to detect rss feeds.
When a feed is found, the extension button on the toolbar will change and give you the option to add the podcast from a popup window:
About the feed finder feature
When I introduced this feature, it sounded like a cool idea.
It is used, at least according to analytics:
More than 1000 times over the course of 6 months.
I particularly do not find it very useful, as many podcast webpages will not correctly expose the podcast feed in the webpage metadata, but I do not want to de-comission the feature.
Alternative implementation
My idea on how to keep this feature while avoiding injecting a script in every webpage the user visits is to use
chrome.declarativeContent
, maybe in combination with theactiveTab
permission.The text was updated successfully, but these errors were encountered: