|
|
Line 1: |
Line 1: |
| Test example wiki userscript file: [[User:Rod_McGuire/dataschemetest.u.js]].
| | [[User:Rod_McGuire/Wiki_defined_example_user_scripts]] |
|
| |
|
| Clickable link ({{RawWikiUserscript|User:Rod_McGuire/dataschemetest.u.js|dataschemetest}}) to raw <code>.js</code> that will cause a running GM to try to install it.
| | [[User:Rod_McGuire/Old_stuff_that_is_probably_deletable]] |
| | |
| === Stuff below should be edited and put in a seperate page ===
| |
| | |
| Test example javascript file: [[User:Rod_McGuire/dataschemetest.user.js]].
| |
| | |
| <b>UGH, to access that wiki page Greasemonkey has to be disabled so it doesn't intercept it as a userscript</b>
| |
| | |
| Or the link can be given on a wiki page with a bogus parameter appended to the URL to block Greasemoneky from triggering. E.g.
| |
| | |
| http://wiki.greasespot.net/User:Rod_McGuire/dataschemetest.user.js?Wiki
| |
| | |
| 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>
| |
| | |
| <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 Templates to handle the rewriting needed would be appropriate.
| |
| | |
| Like this:
| |
|
| |
|
| {{RawWikiUserscript|User:Rod_McGuire/dataschemetest.user.js|dataschemetest}} | | {{RawWikiUserscript|User:Rod_McGuire/dataschemetest.user.js|dataschemetest}} |