User:EpochFail/wikignome.js: Difference between revisions

Content deleted Content added
No edit summary
Version 1.0 ready. Loads on main article pages. Does not load on talk pages, .js or .css and avoids template pages.
Line 1:
 
/*******************************************************************************
,, ,,
Line 22 ⟶ 23:
* MIT licensed (http://en.wikipedia.org/wiki/MIT_License)
* http://halfaker.info
* Version 1.0
 
WikiGnome is a collection of utilities that allow for easy minor modifications
Line 77 ⟶ 79:
//Decide whether to import the body of the script or not.
if(
wgNamespaceNumber % 2 == 0 && //Main articles (not talk)
(
wgNamespaceNumber != 10 && //No templates
wgPageName.search("Sandbox") > -1 || //Sandboxes
wgNamespaceNumber % 2 == 0 > 0 && //MainNo Special pages namespace articles
getParameterByName('oldidaction') == '' && //No oldpreview or revisionsedit
) &&
getParameterByName('actiondiff') == '' && //No preview or editdiffs
getParameterByName('diffoldid') == '' && //No diffsold revisions
wgPageName.search("Sandbox"/.(js|css)$/) >== -1 || //SandboxesNo javascript or css
getParameterByName('oldid') == '' && //No old revisions
wgPageName.search(/.(js|css)$/) == -1 //No javascript or css
){
//Import CSS
importCSSimportCSSURI("Userhttp:EpochFail//www-users.cs.umn.edu/~halfak/wikignome/gadget/wikignome.css")
//Import script Body
importScriptURI("http://www-users.cs.umn.edu/~halfak/wikignome/gadget/wg_system.cgi")
importScript("User:EpochFail/wg_system.js")
}