Cizagna/global.js
Talk0
57,093pages on
this wiki
this wiki
< Cizagna
Note: After saving, you have to bypass your browser's cache to see the changes.
- Internet Explorer: hold down the Ctrl key and click the Refresh or Reload button, or press Ctrl+F5.
- Firefox: hold down the Shift key while clicking Reload; alternatively press Ctrl+F5 or Ctrl-Shift-R.
- Opera users have to clear their caches through Tools→Preferences
- Konqueror and Safari users can just click the Reload button.
- Chrome: press Ctrl+F5 or Shift+F5
// ***************************************************************** // Add Tab For X Skin function addTabForXSkin ( id , href , title , text ) { if ( document.getElementById( id ) ) { return; } switch ( skin ) { case 'answers': $( '<div id="qa_toolbox_advancedtools"></div>' ).appendTo( '#qa_toolbox_advancedtools_wrapper' ); $( '<span><img src="http://images1.wikia.nocookie.net/common/skins/common/blank.gif" class="sprite" /><a href="' + href + '" rel="nofollow" title="' + title + '">' + text + '</a></span>' ).appendTo( '#qa_toolbox_advancedtools' ); break; case 'awesome': case 'monaco_old': case 'monaco': $( '<li id="' + id + '" class=""><img src="http://images1.wikia.nocookie.net/common/skins/common/blank.gif" class="sprite" /><a href="' + href + '" rel="nofollow" title="' + title + '">' + text + '</a></li>' ).appendTo( '#page_controls' ); break; case 'uncyclopedia': case 'wowwiki': case 'lostbook': case 'monobook': $( '<li id="' + id + '"><a href="' + href + '" title="' + title + '">' + text + '</a></li>' ).appendTo( '#p-cactions > .pBody > ul' ); break; case 'oasis': case 'wikia': if ( $( 'a[data-id="' + id + '"]' ).length == 0 ) { return; } atfxs = '<a class="wikia-button" href="' + href + '" title="' + title + '" data-id="' + id + '">' + text + '</a>'; switch ( wgNamespaceNumber ) { case 1: case 5: case 7: case 9: case 11: case 13: case 14: case 15: case 111: case 401: $( 'header.WikiaPageHeader > h2').before( atfxs ); break; case 2: case 3: $( 'div.WikiaUserPagesHeader > ul.wikia-avatar' ).after( atfxs ); break; case 500: case 502: $( 'div.WikiaUserPagesHeader > h1' ).after( atfxs ); break; default: $( 'header.WikiaPageHeader > details' ).before( atfxs ); break; } break; } }; /* if ( wgNamespaceNumber == -1 ) { importScriptPage ( 'User:Cizagna/contribtools.js', 'community' ); importScriptPage ( 'User:Cizagna/filelisttools.js', 'community' ); } else { importScriptPage ( 'User:Cizagna/mwcustomeditbtns.js', 'community' ); importScriptPage ( 'User:Cizagna/forumtools.js', 'community' ); importScriptPage ( 'User:Cizagna/ajaxpatrollinks.js', 'community' ); 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' ) { importScriptPage( 'EditIntroButton2/code.js', 'dev' ); } // ***************************************************************** // Subpages tab if ( wgNamespaceNumber!= -1 ) { addOnloadHook ( function () { addTabForXSkin ( 'ca-subpages','/wiki/Special:Prefixindex/' + encodeURIComponent ( wgPageName ) , 'Show subages of ' + wgPageName , 'SubP' ); } ); } }*/ // ***************************************************************** // Alternating skin tabs function skinview () { var skinlink = document.location.href; var antiskin; if ( skinlink.indexOf( '?' ) == -1 ) { skinlink += '?useskin='; } else { skinlink += '&useskin='; } switch ( skin ) { case 'awesome': case 'monaco_old': case 'monaco': case 'oasis': case 'wikia': antiskin = 'monobook'; break; case 'uncyclopedia': case 'wowwiki': case 'lostbook': case 'monobook': antiskin = 'wikia'; break; case 'answers': return; } addTabForXSkin ( 'ca-skin' , skinlink + antiskin , 'View ' + antiskin + ' skin' , 'CS' ); } $( skinview );