User:Henna/common.js

// d:User:Yair rand/WikidataInfo.js mw.loader.load("//www.wikidata.org/w/index.php?title=User:Yair rand/WikidataInfo.js&action=raw&ctype=text/javascript"); ( function ( mw, $ ) {       var wiki = 'enwiki';        var namespace = mw.config.get( 'wgCanonicalNamespace' );        if( namespace === '' ) {                var page = mw.config.get( 'wgTitle' );        } else {                var page = namespace + ':' + mw.config.get( 'wgTitle' );        }        $.ajax( { url: '//www.wikidata.org/w/api.php', data: { 'format': 'json', 'action': 'wbgetentities', 'sites': wiki, 'titles': page, 'language': mw.config.get( 'wgPageContentLanguage' ) },               dataType: 'jsonp', success: function( data ) { if( data.success ) { for( var i in data.entities ) { if( i != -1 ) { mw.util.addPortletLink( 'p-tb', '//www.wikidata.org/wiki/' + data.entities[i].title, 'Wikidata' ); }                               }                               }                }        } ); } ( mediaWiki, jQuery ) ); mw.loader.load('//www.wikidata.org/w/index.php?title=User:Tpt/interproject.js&action=raw&ctype=text/javascript'); importScript("User:PleaseStand/userinfo.js"); /* USAGE: https://en.wikipedia.org/wiki/MediaWiki:Wdsearch.js On en.wikipedia, add the following line: */ if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 'Search' || ( mw.config.get( 'wgArticleId' ) === 0 && mw.config.get( 'wgCanonicalSpecialPageName' ) === false ) ) { importScript('MediaWiki:Wdsearch.js'); }