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.)
(And... Done with the ideas that I thought of when I had probation.)
Line 32: Line 32:
   }
   }
);
);
$( document ).ready( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.wikiGetlink( 'Special:PrefixIndex/User:' ) + mw.config.get( 'wgUserName' ) + '/', 'Subpages', 'pt-subpages', 'Show your subpages', 'pt-mycss'
  );
});

Revision as of 08:29, December 12, 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";
    }
});
mw.loader.load( '//www.mediawiki.org/w/index.php?title=MediaWiki:Gadget-UTCLiveClock.js&action=raw&ctype=text/javascript' );
var csslinkportlet = "p-personal"

addOnloadHook(
  function() {
    addPortletLink(csslinkportlet, 'http://www.ssbwiki.com/index.php?title=Special:Mypage/common.css&action=edit', 'Edit .css', 'pt-mycss')
  }
);
$( document ).ready( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.wikiGetlink( 'Special:PrefixIndex/User:' ) + mw.config.get( 'wgUserName' ) + '/', 'Subpages', 'pt-subpages', 'Show your subpages', 'pt-mycss'
  );
});