User:Daniel Letalis/global.js

/* Search Fix

Now wikia is fixed, so you don't need this script if you want to do "go" searches from an external source, just do them like this (with or without script): http://YOUR_WIKI.wikia.com/wiki/Special:Search?go=Go&search=YOUR SEARCH HERE

(Remember to replace YOUR_WIKI with your wiki name)

The script is only needed if you want to modify search behaviour inside wikis so you can chose: go/search, new window/current window.

ADMINS, WIKI TERMS OF USE PROBABLY DON'T ALLOW THIS SCRIPT TO BE INSTALLED ON YOUR WIKI, SO, YOU CAN INSTALL IT ON YOUR USER BUT NOT ON YOUR WIKI, SORRY :/

TO INSTALL ON YOUR USER(WILL WORK ON ALL WIKIS), PUT THE CODE(only last one line needed) ON: http://community.wikia.com/wiki/User:YOUR_USERNAME/global.js

(Remember to replace YOUR_USERNAME with your wiki username.) Installing the script on that location will make it work on all wikia wikis.

Use the "..." button in the search dialog to configure

Location of the script code(not need to do anything with it just for reference): http://dantest.wikia.com/wiki/MediaWiki:Search_Fix.js



importScriptPage('MediaWiki:Search_Fix.js', 'dantest');

///////////////////////////////////////////////// /////////////wikia rail hide///////////////////// /////////////////////////////////////////////////

if (skin == 'oasis') { wr_read_cookie = function(name) { var i, c, cl = document.cookie.split(';'); for(i=0;i<cl.length;i++) { c = $.trim(cl[i]); if (c.indexOf(name+'=') === 0) { return c.substring(name.length+1); } } return null; }; wr_write_cookie = function(name, val) { var date = new Date; date.setTime(date.getTime+(30*24*60*60*1000)); date = date.toGMTString; document.cookie = name+'='+val+'; expires='+date+'; path=/'; }; WikiaRailCToggler = function(page_loaded) { if (typeof $ !== 'undefined' && $('#WikiaRail').size) { $('#WikiaRail').after($('    ')); $('#WikiaRailToggler div').attr('style', 'border-style:solid;border-bottom-color:transparent;border-bottom-width:6px;border-left-color:#006cb0;border-left-width:0px;border-right-color:#006cb0;border-right-width:6px;border-top-color:transparent;border-top-width:6px;'); $('#WikiaRailToggler').toggle(function {     WikiaRailCTogglerOW = parseInt($('#WikiaMainContent').css('width'));      $('#WikiaMainContent').width(WikiaRailCTogglerOW + 320);      $('#WikiaRail').css('display', 'none');      $('#WikiaRailToggler div').css({'border-left-width':'6px', 'border-right-width':'0px'});      wr_write_cookie('WikiaRail_CHide', '1');    }, function {      $('#WikiaMainContent').width(WikiaRailCTogglerOW);      $('#WikiaRail').css('display', '');      $('#WikiaRailToggler div').css({'border-left-width':'0px', 'border-right-width':'6px'});      wr_write_cookie('WikiaRail_CHide', '0');    }); if (wr_read_cookie('WikiaRail_CHide') == '1') { $('#WikiaRailToggler').click; } } else if (!page_loaded) { WikiaRailCTogglerT = setTimeout(function { WikiaRailCToggler; }, 100); } }; WikiaRailCTogglerT = 0; WikiaRailCToggler; WikiaRailCTogglerOW = ''; addOnloadHook(function { clearTimeout(WikiaRailCTogglerT); });

}