Tampermonkey is the most popular userscript manager, with over 10 million users. It's available for Chrome, Microsoft Edge, Safari, Opera Next, and Firefox.
GNU General Public License v3.0
4.2k
stars
418
forks
source link
Possible solution to avoid the need for a temporary .user.js redirect for installation #2081
Looks like a better workaround might be to change the content-type header of .user.js URLs to an html page to prevent Chrome's built-in handling, so instead a normal navigation is performed, which will be seen by a non-blocking webRequest or chrome.tabs.onUpdated or chrome.webNavigation.
This example only shows one pattern in urlFilter. I don't know what's best for multiple patterns, either several identical rules with different urlFilter or one rule with regexFilter.
Currently when installing from sites like greasyfork, Tampermonkey has to redirect to a temporary URL in order to circumvent the lack of proper redirection in ManifestV3, https://github.com/w3c/webextensions/issues/610.
Looks like a better workaround might be to change the content-type header of .user.js URLs to an html page to prevent Chrome's built-in handling, so instead a normal navigation is performed, which will be seen by a non-blocking webRequest or chrome.tabs.onUpdated or chrome.webNavigation.
This example only shows one pattern in urlFilter. I don't know what's best for multiple patterns, either several identical rules with different urlFilter or one rule with regexFilter.