User:Rod McGuire: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
mNo edit summary
(added way to automatically get the raw text file recognized as a Greasemonkey script)
Line 3: Line 3:
<b>(UGH, to access that  wiki page Greasemonkey has to be disabled so it doesn't intercept it as a userscript)</b>
<b>(UGH, to access that  wiki page Greasemonkey has to be disabled so it doesn't intercept it as a userscript)</b>


The raw text file version of that page should be accessed as [[http://wiki.greasespot.net/index.php?title=User:Rod_McGuire/dataschemetest.user.js&action=raw&ctype=text/javascript]], i.e.,
The raw text file version of that page should be accessed as [http://wiki.greasespot.net/index.php?title=User:Rod_McGuire/dataschemetest.user.js&action=raw&ctype=text/javascript], i.e.,


<pre style='overflow: auto'>http://wiki.greasespot.net/index.php?title=User:Rod_McGuire/dataschemetest.user.js&action=raw&ctype=text/javascript</pre>
<pre style='overflow: auto'>http://wiki.greasespot.net/index.php?title=User:Rod_McGuire/dataschemetest.user.js&action=raw&ctype=text/javascript</pre>


<b>Greasemonkey does not currently automatically recognize the above as a userscript.</b>
<b>Greasemonkey does not currently automatically recognize the above as a userscript.</b>
However you can fool Greasemonkey into automatically treating it as a userscript by appending <code>.user.js</code> to the URL, using some bogus parameter such as <code>US</code>. I.e.
&US=.user.js
This [http://wiki.greasespot.net/index.php?title=User:Rod_McGuire/dataschemetest.user.js&action=raw&ctype=text/javascript&US=.user.js link] will cause Greasemonkey to automatically try to install the above.
Maybe creating a Template to handle the rewriting needed would be appropriate.

Revision as of 18:01, 31 January 2010

Test example javascript file: User:Rod_McGuire/dataschemetest.user.js.

(UGH, to access that wiki page Greasemonkey has to be disabled so it doesn't intercept it as a userscript)

The raw text file version of that page should be accessed as [1], i.e.,

http://wiki.greasespot.net/index.php?title=User:Rod_McGuire/dataschemetest.user.js&action=raw&ctype=text/javascript

Greasemonkey does not currently automatically recognize the above as a userscript.

However you can fool Greasemonkey into automatically treating it as a userscript by appending .user.js to the URL, using some bogus parameter such as US. I.e.

&US=.user.js

This link will cause Greasemonkey to automatically try to install the above.

Maybe creating a Template to handle the rewriting needed would be appropriate.