How to edit Tampermonkey scripts outside of the browser

eComEvo picture eComEvo · Jul 3, 2014 · Viewed 12.3k times · Source

How do I edit Tampermonkey scripts outside of the browser? Would rather be in a good IDE instead of trying to make the edits in the browser.

I used to be able to do this when I developed Greasemonkey scripts in Firefox, but I can't locate the .user.js files with Chrome.

Answer

Acecool picture Acecool · Oct 13, 2017

Go to Extensions > Tampermonkey > Allow access to file urls

Then, set your script as:

// ==UserScript==
// @name            Acecool - Video Site - Ultimate Video Site Management, Ad Removal, Redirection, Direct-Linking and more!
// @author          Acecool
// @namespace       Acecool
// @version         0.0.1
// @description     Replaces encoded-links with decoded direct-links on episode finder sites.
// @description     Automatically click the "continue" button, and attempt to skip the countdown if any, on video watching sites.
// @description     Remove ad panels on video watching sites.
// @match           http://*/*
// @require         http://code.jquery.com/jquery-latest.js
// @require         file:///C:/AcecoolGit/acecooldev_userscripts/libraries/acecool_functions_lib.js
// @require         file:///C:/AcecoolGit/acecooldev_userscripts/video_sites/video_site_ultimate_tool.js
// @grant           GM_xmlhttpRequest
// ==/UserScript==

I know it is a bit late for this thread author, but this is how I develop...

Then, the scripts are set up with the exact header as that so the example file I include: video_site_ultimate_tool.js is

// ==UserScript==
// @name            Acecool - Video Site - Ultimate Video Site Management, Ad Removal, Redirection, Direct-Linking and more!
// @author          Acecool
// @namespace       Acecool
// @version         0.0.1
// @description     Replaces encoded-links with decoded direct-links on episode finder sites.
// @description     Automatically click the "continue" button, and attempt to skip the countdown if any, on video watching sites.
// @description     Remove ad panels on video watching sites.
// @match           http://*/*
// @require         http://code.jquery.com/jquery-latest.js
// @require         file:///C:/AcecoolGit/acecooldev_userscripts/libraries/acecool_functions_lib.js
// @require         file:///C:/AcecoolGit/acecooldev_userscripts/video_sites/video_site_ultimate_tool.js
// @grant           GM_xmlhttpRequest
// ==/UserScript==
alert( 'test script is running from the file system instead of from TM...' );

I set them up identically ( well, I change the @requires in the file-system script to be the http variants, so the functions_lib goes to bitbucket while video_site_ultimate_tool would be deleted and the script put in when copied to my bitbucket repo...

It really speeds up development to be able to use an external editor and have the changes appear immediately...

Hopefully this helps the next person..