I like to keep my personal userscripts on local storage that syncs to the cloud. What I have been doing in the past is simply backing them up but then I realized I can use the @require tag to link to my local version of the file which I can then edit in my IDE.
This worked for a while but stopped working for some reason about 2 years ago and I would like to solve this issue as I am using userscripts more and more these days.
I'm using Google Chrome, Tampermonkey and MacOS.
Here is an example of my userscript code. Please be advised that I'm certain the path is correct.
// ==UserScript==
// @name Google Mods
// @run-at document-start
// @namespace http://google.com/
// @version 1.00
// @description Google mods
// @author John Doe
// @match https://*.google.com/*
// @require file:///Users/johndoe/Desktop/google.user.js
// ==/UserScript==
When I look at the console when viewing the page I can tell that it is attempting to load the script but cannot find it. This is what the error looks like
Tampermonkey: couldn't load @require from forbidden URL file:///Users/johndoe/Desktop/google.user.js
Any help as to what I am missing would be greatly appreciated.
EDIT: To be clear I have the extension setting Allow access to file URLs enabled.
I hope it helps, greetings

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With