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
417
forks
source link
file URL content is not updated in `UserScripts API Dynamic` mode #2184
Change the external file name (and the corresponding @resource line).
// @resource my_styles file:///Users/.../Documents/userscripts/style_new-name.css
Or only change the variable name.
const styles_2 = GM_getResourceText("my_styles");GM_addStyle(styles_2);
TM stopped updating local .css files.
Expected Behavior
After fine-tuning local .css file, page reload should import the new styles.
Actual Behavior
The older .css file is still active.
Specifications
<-- BTW: Please make this dashboard text selectable for easy copying
Script
// @grant GM_getResourceText
// @resource my_styles file:///Users/.../Documents/userscripts/style.css
const styles_1 = GM_getResourceText("my_styles");
GM_addStyle(styles_1);
How to force update
Both work (compare with the lines above).
Change the external file name (and the corresponding
@resource
line).// @resource my_styles file:///Users/.../Documents/userscripts/style_new-name.css
Or only change the variable name.
const styles_2 = GM_getResourceText("my_styles");
GM_addStyle(styles_2);