Wikipedia:User scripts/Guide: Difference between revisions

Content deleted Content added
Some fixing in the lead section. Added link to JavaScript syntax.
Editing and loading the user script: Adding more explanation to section "Publishing a CSS file".
Line 247:
 
<source lang="javascript">
importScriptURI( 'http://localhost/wikipediatest.js' );
</source>
 
Line 290:
If the CSS should be used together with a user script written in JavaScript then you can make it easy for the users. Simply put the line above in the JavaScript code for your user script, then the users only need to "install" your JavaScript.
 
For completeness, in case someone wonders. YouUsers can import your <tt>User:Yourname/yourscript.css</tt> from yourtheir <tt>/monobook.css</tt> too,. althoughThis of course has the advantage that it works even if the user has JavaScript disabled. Although it takes this ratherslightly messycomplex line of code:
<source lang="css">
@import "/w/index.php?title=User:Yourname/yourscript.css&action=raw&ctype=text/css";