Wikipedia:WikiProject User scripts/Scripts/Inclusion

Use these commands to include things from other places:

Javascript

importScript(); is now built into the site

/* Include a script from another location */

function winc(s) {

s = s.replace(/^\[\[/, ).replace(/\]\]$/, );

document.write('

+ 'ipt>'); /* (Broken up so that page preview doesn't get confused) */

then include a script like so:

winc('User:SOMEONE/monobook.js'); /* Comment about what the script does */

See User:Quarl/monobook.js

= Synchronize across wikis =

A more concise version for including your user js to synchronize across wikis:

document.write('

+ 'ipt>'); /* (Broken up so that page preview doesn't get confused) */

See meta:User:Omegatron/monobook.js.

CSS

/* Include css from en */

@import url(http://en.wikipedia.org/w/index.php?title=User:YOURUSERNAME/monobook.css&action=raw&ctype=text/css);

See meta:User:Omegatron/monobook.css

For Internet explorer' users:

/* Include css from es */

@import "http://es.wikipedia.org/w/index.php?title=Usuario:Axxgreazz/monobook.css&action=raw&ctype=text/css";

See en:User:Axxgreazz/monobook.css