User:Echelon/BlueCloud.js

From StrategyWiki, the free strategy guide and walkthrough wiki

Note - After saving, you may have to bypass your browser's cache to see the changes. Mozilla / Firefox / Safari: hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (Command-R on a Macintosh); Konqueror: click Reload or press F5; Opera: clear the cache in Tools → Preferences; Internet Explorer: hold Ctrl while clicking Refresh, or press Ctrl-F5.

// [[User:Ryan Schmidt/Reskin/AutumnLeaf.css]]
//document.write('<style type="text/css">/*<![CDATA[*/ @import "/w/index.php?title=User:Ryan Schmidt/Reskin/AutumnLeaf.css&action=raw&ctype=text/css"; /*]]>*/</style>');

// [[wikibooks:w:User:Lupin/popups.js]]

document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

//simplePopups = true;
popupAdminLinks = true;
//popupUseQueryInterface = false;
function siteArticlePath(){ return 'wiki'; }
function siteBotInterfacePath(){ return 'w'; }

// install [[Wikipedia:User:Cacycle/wikEd]] in-browser text editor
//document.write('<script type="text/javascript" src="http://en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

// Avoid pesky edit summaries!! *shhh* 
// Anyone who can figure this out is PROBABLY the type who 
// doesn't need to be forced into using summaries anyway.
function check_edit_summary(event){ return false; }

// ==================================================
// Guide-wide search using Google
// from pl.wikibooks, maintainer [[b:pl:User:Piotr]]
// ==================================================
 
function insertGoogleSearch() {
   if ( wgNamespaceNumber != 0 ) {
     return;
   }
   var google = "http://www.google.com/custom?sa=Google+Search&domains=strategywiki.org/wiki/PAGE&sitesearch=strategywiki.org/wiki/PAGE";
   var tb = document.getElementById('nav_right').getElementsByTagName('ul')[0];
   var link = document.createElement('a');
   var guide = wgPageName.replace(/\/.*/g, "");
   
   link.href = google.replace(/PAGE/g, guide);
   link.appendChild(document.createTextNode("Search this guide"));
   
   var li = document.createElement('li');
   li.id = "google-trick-search";
   
   li.appendChild(link);
   tb.insertBefore(li, tb.firstChild);
}
 
addOnloadHook(insertGoogleSearch);