Search code examples
browseruserscripts

User script installation


Is it possible to make it so I can put the user script that I made on my website and users to instal it simply by clicking on it (on firefox and chrome)? And if it is possible how do I do it?

And how do I put my user script in chrome manually? In firefox it is simple, I just click on greasemonkey icon and select "new user script". But I simply can't figure out how to do it in chrome and couldn't find the answer online.

For me this looks like a really simple thing to do, but from some reason I can't find the answer by googling. Am I using a bad key word or something? idk.


Solution

  • Is it possible to make it so I can put the user script that I made on my website and users to instal it simply by clicking on it (on firefox and chrome)? And if it is possible how do I do it?

    Yes. Just insert an ordinary download link such as

    <a href="http://www.yoursite.com/path/to/script/yourscript.user.js">Click here to download my script!</a>.

    Please note prospective users should have Greasemonkey (Firefox) or Tampermonkey (Chrome) installed. Also, filename of the script should end with .user.js.

    Example

    And how do I put my user script in chrome manually? In firefox it is simple, I just click on greasemonkey icon and select "new user script". But I simply can't figure out how to do it in chrome and couldn't find the answer online.

    Use Tampermonkey.