I'm doing active development on my @require scripts and TamperMonkey's caching of them makes the development flow lengthy. For every change I have to...
1) Update the script
2) Go to Chrome
3) Find the TM tab with the Externals tab selected
4) Press "Delete" on the resource
5) Switch tabs to the page where my UserScript is running
6) Refresh the page
Now if I make a change, my flow is even longer
1) Update the script
2) Go to Chrome
3) Switch back to the TM tab with the Externals tab selected.
4) Press refresh (because the Delete button does not appear when the resource is downloaded, you have to refresh the page)
5) Press "Delete" on the resource
6) Switch tabs to the page where my UserScript is running
7) Refresh that page
If there was a directive or TM setting to disable caching, that would be amaaazing. My ideal flow would be:
1) Update the script
2) Go to Chrome
3) Refresh
...and the world would be so much brighter ;)
Perhaps as part of Advanced config mode?
There are several ways to ease your pain. :)
1) You can increase the version number before saving the script and all external resources will be reloaded.
2) After setting "Config mode" to "Advanced" you can configure the external update interval. Note: "Always" still means _after_ the resource was used. So you might need to execute/load the page twice.
3) If you use Tampermonkey Beta (Chrome or Firefox) you can edit the external resource in place (because there now is a edit button besides the delete button).
4) Copy the resources and store them locally. After you've enabled "Local file access" at Chrome's extension management page or Tampermonkey's settings page (if you're using Firefox) you can @require them via a local file:/// URI.
[edit] FF does not support local file access anymore [/edit]
@derjanb thank you so much for the prompt reply with so many options! Re: #4,yes! So file:// resources won't be cached? This would be ideal!
So file:// resources won't be cached? This would be ideal!
Correct, file:// resources are not cached. The only downside of 4) for scripts using @run-at document-start is that local file resources are retrieved asynchronously and therefore the script execution timing might change compared against the usage of cached web resources.
@derjanb my friend, you are a life saver! Option (4) works perfectly. For the development version of my UserScript I replace my resources with file:// versions and it refreshes every time.
Thank you so much. Just made my weekend! :)
Most helpful comment
There are several ways to ease your pain. :)
1) You can increase the version number before saving the script and all external resources will be reloaded.
2) After setting "Config mode" to "Advanced" you can configure the external update interval. Note: "Always" still means _after_ the resource was used. So you might need to execute/load the page twice.
3) If you use Tampermonkey Beta (Chrome or Firefox) you can edit the external resource in place (because there now is a edit button besides the delete button).
4) Copy the resources and store them locally. After you've enabled "Local file access" at Chrome's extension management page or Tampermonkey's settings page (if you're using Firefox) you can
@requirethem via a local file:/// URI.[edit] FF does not support local file access anymore [/edit]