User:PAC2/chouette.js

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%3Aen.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("Wikidata") ; $("#page-secondary-actions").append("Reasonator") ;

$("#page-secondary-actions").append("Linked pages") ;

$("#page-secondary-actions").append("Search in Wikipedia") ;

$("#page-secondary-actions").append("Pageviews") ;

$("#page-secondary-actions").append("Rename") ;

$("#page-secondary-actions").append("Infos") ; }

}

$(document).ready(hackerbox) ;

});