User:Rod McGuire: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
(added way to automatically get the raw text file recognized as a Greasemonkey script)
(transferred old junk into Old_stuff_that_is_probably_deletable)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Test example javascript file: [[User:Rod_McGuire/dataschemetest.user.js]].
[[User:Rod_McGuire/Wiki_defined_example_user_scripts]]


<b>(UGH, to access that  wiki page Greasemonkey has to be disabled so it doesn't intercept it as a userscript)</b>
[[User:Rod_McGuire/Old_stuff_that_is_probably_deletable]]


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.,
{{RawWikiUserscript|User:Rod_McGuire/dataschemetest.user.js|dataschemetest}}
 
<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>
 
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.

Latest revision as of 20:17, 2 February 2010