Jump to content

User:Raid5/common.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Raid5 (talk | contribs) at 20:07, 16 May 2023 (+user:kephir/gadgets/unclutter.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
/* Käyttäjä:Zache/vector.js 3. elokuuta 2010 kello 14.03: https://fi.wikipedia.org/enwiki/w/index.php?oldid=8849654 */
/* Vasemman reunan käyttäjälinkkien lisääminen */

addOnloadHook(function() {
  var toolboxElement = document.getElementById( 'p-tb' );
  if ( !toolboxElement ) {
	return -1;
  }
	
  var inspectionElement = toolboxElement.cloneNode( true );
  if ( !inspectionElement ) {
     return -1;
  }

  inspectionElement.id = 'p-oma';
  inspectionElement.innerHTML = '<label id="p-oma-label" aria-label="" class="vector-menu-heading"><span class="vector-menu-heading-label">raid5</span></label><div class="pBody body vector-menu-content"><ul class="vector-menu-content-list"></ul></div>';
  toolboxElement.parentNode.insertBefore( inspectionElement, toolboxElement.nextSibling );


  addPortletLink('p-oma', 'https://commons.wikimedia.org/wiki/User:Raid5', 'Commons', 'uniikki_id1', 'Käyttäjä:Raid5 – Commons', '', '');
  addPortletLink('p-oma', 'https://en.wikipedia.org/wiki/User:Raid5', 'English', 'uniikki_id2', 'User:Raid5 – English Wikipedia', '', '');
});

/* This script adds a link saying "Subpages" to subpages of your user page.
   To use the script, add the following line to Special:MyPage/common.js:
 
importScript('User:PrimeHunter/My_subpages.js'); // Linkback: [[User:PrimeHunter/My subpages.js]]

/* This script adds a link saying "Subpages" to subpages of your user page.
   To use the script, add the following line to Special:MyPage/common.js:
 
importScript('User:PrimeHunter/My_subpages.js'); // Linkback: [[User:PrimeHunter/My subpages.js]]

*/

$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).done( function() {
  mw.util.addPortletLink(
    'p-personal',
    mw.util.getUrl( 'Special:PrefixIndex/User:' ) + mw.config.get( 'wgUserName' ) + '/',
    'Subpages',
    'pt-mysubpages',
    'Show your subpages',
    null,
    '#pt-preferences'
  );
});

/* https://en.wikipedia.org/wiki/User:Kephir/gadgets/unclutter */

window.kephirUnclutter = { /* configuration */ };
importScript('User:Kephir/gadgets/unclutter.js'); // [[User:Kephir/gadgets/unclutter]]