User:INoMed/common.js: Difference between revisions

From SmashWiki, the Super Smash Bros. wiki
Jump to navigationJump to search
(I give up tryin to fix the javascript required to fix the glitch where the edit js link is not shoeing.)
(Undid edit by INoMed: Turns out that it actually doesn't halt the process on special pages, which is not what I want.)
 
(7 intermediate revisions by the same user not shown)
Line 24: Line 24:
     }
     }
});
});
// Add links into the toolbar
mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript' );
var csslinkportlet = "p-personal"
var addtoolbarlinks = "p-personal"


addOnloadHook(
addOnloadHook(
   function() {
   function() {
     addPortletLink(csslinkportlet, 'http://www.ssbwiki.com/index.php?title=Special:Mypage/common.css&action=edit', 'Edit .css', 'pt-mycss')
     addPortletLink(addtoolbarlinks, 'http://www.ssbwiki.com/index.php?title=Special:Mypage/common.css&action=edit', 'Edit css', 'pt-mycss')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolbarlinks, 'http://www.ssbwiki.com/index.php?title=Special:Mypage/common.js&action=edit', 'Edit js', 'pt-myjs')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolbarlinks, 'http://www.ssbwiki.com/index.php?title=Special:Log', 'View logs', 'pt-logs')
  }
);
 
// Add links into the sidebar
 
var addtoolboxlinks = "p-tb"
 
addOnloadHook(
  function() {
    addPortletLink(addtoolboxlinks, 'http://www.ssbwiki.com/index.php?title=SmashWiki:Sandbox&action=edit', 'SmashWiki Sandbox')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolboxlinks, 'http://www.ssbwiki.com/index.php?title=User:INoMed/sandbox&action=edit', 'Personal Sandbox')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolboxlinks, 'http://www.ssbwiki.com/index.php?title=Special:PrefixIndex/User:INoMed/', 'Show my subpages')
   }
   }
);
);

Latest revision as of 10:05, December 19, 2015

// Text replacement
$( '#siteSub' ).text( 'SmashWiki, skinned by INoMeds CSS' );
$( '#ca-history a' ).text( 'Page history' );
$( '#ca-nstab-user a' ).text( 'Userspace' );
$( '#ca-talk a' ).text( 'Talk page' );
$( '#ca-view a' ).text( 'View' );
$( function () {
    var tab, tablink;

    tab = document.getElementById('ca-addsection');
    if ( !tab ) {
        return;
    }

    tablink = tab.getElementsByTagName('a')[0];
    if ( !tablink ) {
        return;
    }

    tablink.firstChild.nodeValue = 'New topic';
    if ( mw.config.get( 'skin' ) === 'monobook' ) {
      tablink.style.paddingLeft = ".4em";
      tablink.style.paddingRight = ".4em";
    }
});

// Add links into the toolbar

mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript' );
var addtoolbarlinks = "p-personal"

addOnloadHook(
  function() {
    addPortletLink(addtoolbarlinks, 'http://www.ssbwiki.com/index.php?title=Special:Mypage/common.css&action=edit', 'Edit css', 'pt-mycss')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolbarlinks, 'http://www.ssbwiki.com/index.php?title=Special:Mypage/common.js&action=edit', 'Edit js', 'pt-myjs')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolbarlinks, 'http://www.ssbwiki.com/index.php?title=Special:Log', 'View logs', 'pt-logs')
  }
);

// Add links into the sidebar

var addtoolboxlinks = "p-tb"

addOnloadHook(
  function() {
    addPortletLink(addtoolboxlinks, 'http://www.ssbwiki.com/index.php?title=SmashWiki:Sandbox&action=edit', 'SmashWiki Sandbox')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolboxlinks, 'http://www.ssbwiki.com/index.php?title=User:INoMed/sandbox&action=edit', 'Personal Sandbox')
  }
);
addOnloadHook(
  function() {
    addPortletLink(addtoolboxlinks, 'http://www.ssbwiki.com/index.php?title=Special:PrefixIndex/User:INoMed/', 'Show my subpages')
  }
);