User:Woganhemlock/wikia.js

if( wgNamespaceNumber == -1 ) { importScriptPage('User:Cizagna/contribtools.js', 'www'); importScriptPage('User:Cizagna/filelisttools.js', 'www'); } else { importScriptPage('User:Cizagna/mwcustomeditbtns.js', 'www'); importScriptPage('User:Cizagna/forumtools.js', 'www'); importScriptPage('User:Cizagna/ajaxpatrollinks.js', 'www'); importScriptPage('FastDelete/code.js', 'dev'); // *****************************************************************	// Adds custom automatic one-click delete tabs to any deletable page. var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Spam', 'label' : 'S'}; if ( skin != 'answers' || wgAction != 'view' ) addOnloadHook(addZeroEditSectionLink); // *****************************************************************	// Subpages tab if(wgNamespaceNumber!=-1) addOnloadHook(function { addTabForXSkin('ca-subpages','/wiki/Special:Prefixindex/' + encodeURIComponent(wgPageName),'Show subages of ' + wgPageName,'SubP') } ); } // ***************************************************************** //  Adds 0 edit Link beside the title if (!window.$G){	window.$G = YAHOO.util.Dom.get;} function addZeroEditSectionLink{ switch( wgNamespaceNumber ) { case '-1': case '2': case '3': return; }	var s = $T.create('span', {'class':'editsection',style:'float:none;position:absolute;'}); var a = $T.create('a', {href: wgScript+'?title='+wgPageName+'&action=edit&section=0', title:'Editar la sección inicial'}, 'editar'); $T.makeChildren([document.createTextNode('['),a,document.createTextNode(']')],s); (document.getElementById('content')||document.getElementById('article')).getElementsByTagName('h1')[0].appendChild(s); } // ***************************************************************** // Alternating skin tabs function skinview { var skinlink = document.location.href; var antiskin; if(skinlink.indexOf('?')==-1) skinlink += '?'; else skinlink += '&'; skinlink += 'useskin='; switch( skin ) { case 'awesome': case 'monaco_old': case 'monaco': antiskin = 'monobook'; break; case 'uncyclopedia': case 'wowwiki': case 'lostbook': case 'monobook': antiskin = 'monaco'; break; case 'answers': return; }	skinlink += antiskin; addTabForXSkin('ca-skin0',skinlink,'Change skin to ' + antiskin,'CS'); switch( skin ) { case 'uncyclopedia': case 'wowwiki': case 'lostbook': case 'monobook': addTabForXSkin('ca-skin1',skinlink + '&usetheme=custom','Change skin to ' + antiskin + ' custom','CS-C'); break; } } addOnloadHook(skinview); // ***************************************************************** // Add Tab For X Skin function addTabForXSkin(id,href,title,text) { switch( skin ) { case 'answers': case 'awesome': case 'monaco_old': case 'monaco': $(' ' + text + '').appendTo('#page_controls'); break; case 'uncyclopedia': case 'wowwiki': case 'lostbook': case 'monobook': $('' + text + '').appendTo('#p-cactions > .pBody > ul'); break; } };

/* add contribs to user menu - 2/1/11 */

function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('Contributions'); } addOnloadHook(UserContribsMenuItem);

importScript('User:Woganhemlock/ajaxrefresh.js');

//

if( wgNamespaceNumber >= 0 && !window.PurgeButtonsLoaded && document.getElementById('control_purge') == null && wgNamespaceNumber != 500 && wgNamespaceNumber != 502 ) { addOnloadHook( addPurgeButton ); } var PurgeButtonsLoaded = true; // prevent duplicate running (but not dupe buttons from outside this code) function addPurgeButton { var theText = 'Refresh'; //default text, ala SMW if( typeof PurgeButtonText == "string" ) { theText = PurgeButtonText; }	switch( skin ) { case 'answers': /* forked from monaco, close enough, pass to monaco */ case 'awesome': /* you really shouldnt even have this value... */		case 'monaco_old': /* really, where are you getting these skin settings from... */		case 'monaco': $('#page_controls').append(''+ theText + '</li>'); break; case 'uncyclopedia': /* monobook clone, pass to monobook */ case 'wowwiki': /* monobook clone, pass to monobook */ case 'lostbook': /* monobook clone, pass to monobook */ case 'monobook': $('#p-cactions > .pBody > ul').append('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&action=purge" title="Purge page">'+ theText + '</a></li>'); break; case 'oasis': case 'wikia': $(((wgNamespaceNumber == 2 || wgNamespaceNumber == 3) && $( '.UserProfileActionButton' ).length ? '.UserProfileActionButton' : '#WikiaPageHeader') + ' > .wikia-menu-button > ul').append('<a href="/index.php?title='+encodeURIComponent(wgPageName)+'&action=purge" title="Purge page">'+ theText + '</a></li>'); break; } } //