Jump to content

User:PAC2/chouette.js

From Wikipedia, the free encyclopedia
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.
mw.loader.using('mediawiki.util', function () { 

if (mw.config.get('wgNamespaceNumber') == 0) { 

var hackerbox = function($) {

 var reasonator = 'https://tools.wmflabs.org/reasonator/?q='   mw.config.get('wgWikibaseItemId')   '&lang=en' ;

 var wikidata = 'https://www.wikidata.org/wiki/'   mw.config.get('wgWikibaseItemId') ; 

var whatlinks = 'https://en.wikipedia.org/wiki/Special:WhatLinksHere/'   mw.config.get( 'wgPageName' ) ; 

var pageviews = 'https://tools.wmflabs.org/pageviews/?project=en.wikipedia.org&platform=all-access&agent=user&range=latest-90&pages='   mw.config.get('wgPageName') ; 

var infos = 'https://tools.wmflabs.org/xtools-articleinfo/index.php?project=en.wikipedia.org&article='   mw.config.get( 'wgPageName' );

 var searchinwp = 'http://www.google.com/search?num=20&safe=off&q=site:en.wikipedia.org \"'   mw.util.rawurlencode( mw.config.get( 'wgTitle' ) )   '\"&btnG=Search' ; 

var rename = 'https://en.m.wikipedia.org/wiki/Special:MovePage/'   mw.config.get('wgPageName');

 $("#page-secondary-actions").append("<a href="   wikidata   " data-title='wikidata' class='wikidata mw-ui-button button'>Wikidata</a>") ; $("#page-secondary-actions").append("<a href="   reasonator   " data-title='reasonator' class='reasonator mw-ui-button button'>Reasonator</a>") ; 

$("#page-secondary-actions").append("<a href="   whatlinks   " data-title='pages-liees' class='pageliees mw-ui-button button'>Linked pages</a>") ;

 $("#page-secondary-actions").append("<a href="   searchinwp   " data-title='search' class='search mw-ui-button button'>Search in Wikipedia</a>") ; 

$("#page-secondary-actions").append("<a href="   pageviews   " data-title='pageviews' class='pageviews mw-ui-button button'>Pageviews</a>") ; 

$("#page-secondary-actions").append("<a href="   rename   " data-title='rename' class='mw-ui-button button'>Rename</a>") ;

 $("#page-secondary-actions").append("<a href="   infos   " data-title='infos' class='infos mw-ui-button button'>Infos</a>") ;
 } 

} 

$(document).ready(hackerbox) ;

 });