GitHub-Dark-Script icon indicating copy to clipboard operation
GitHub-Dark-Script copied to clipboard

Chrom* User Script support

Open lanodan opened this issue 7 years ago • 7 comments

You might want to add support for builtin chrome/chromium user-script support as detailed here: https://www.chromium.org/developers/design-documents/user-scripts

Specially as Tampermonkey is non-libre and violentmonkey seems to be the only libre alternative.

EDIT: replaced non-free with non-libre

lanodan avatar May 08 '18 19:05 lanodan

Hi @lanodan!

Loading even the simpliest userscript directly into Chrome/Chromium won't work as you expect. Chrome permanently disables userscripts that weren't obtained from the web store (ref):

I'm not sure what you mean by "Tampermonkey is non-free", it's been free for as long as I can remember.

I was planning on adding the more popular userscripts into my Octopatcher extension, but I have other projects with higher priorities right now.

Mottie avatar May 08 '18 20:05 Mottie

Well here is works, but maybe because I have Developer Mode enabled.

I'm not sure what you mean by "Tampermonkey is non-free", it's been free for as long as I can remember.

See https://github.com/Tampermonkey/tampermonkey, it states that "All newer versions are distributed under a proprietary license." And the repository is basically dead as the build script was made when it was using subversion.

lanodan avatar May 08 '18 22:05 lanodan

tampermonkey is still "Free" it's just not open source anymore. http://tampermonkey.net/

RedSparr0w avatar May 08 '18 22:05 RedSparr0w

Well i have to defend @lanodan here. Even though its free a closed source addon has so many ways to introduce "malicous" parts reading your stuff with a high ability of noone even noticing it. Open source will stay the best option. Especially with browser addons these days because everything gets outsourced into the clouds :(

Bluscream avatar May 08 '18 22:05 Bluscream

I meant Libre, not free as in free beer, even if I’m not a fan of paywalls I find the lack of sources for an extension that literally can tamper with the website more important.

lanodan avatar May 08 '18 22:05 lanodan

Making the change to get this userscript to work in native Chromium/Chrome would be very difficult since we @require two external scripts, use GM_registerMenuCommand, GM_setValue and GM_getValue – which are not supported in Chromium.

Also, it appears that Chromium will only inject the script on "document-idle", so this script will inject the CSS after the document has loaded. You'll experience a FOUC every time.

The main reason we made this userscript was to give users more options, and support for more browsers. If Tampermonkey stops being the go-to extension for userscripts, there are other userstyle manager alternatives... and we might then consider converting this userscript into an extension... but I highly doubt it'll get developed for Safari since I don't own any Apple devices.

Mottie avatar May 08 '18 22:05 Mottie

Also to note:

  • GM_xmlhttpRequest is same-origin only.

This would break our update check. I unfortunately don't see us supporting such a crippled userscript implementation, sorry.

silverwind avatar May 23 '18 15:05 silverwind