User:Eric Luth (WMSE)/common.js

// User:Dr pda/prosesize mw.loader.load('//en.wikipedia.org/w/index.php?title=User%3ADr+pda%2Fprosesize.js&action=raw&ctype=text/javascript'); /* This script adds a "Page views" link under "Tools" in the sidebar. The link goes to the external tool https://tools.wmflabs.org/pageviews. To use the script, add the following line to Special:MyPage/common.js: importScript('User:PrimeHunter/Pageviews.js'); // Linkback: User:PrimeHunter/Pageviews.js

mw.loader.using(['mediawiki.util'], function {  mw.util.addPortletLink( 'p-tb', 'https://tools.wmflabs.org/pageviews?pages=' + encodeURIComponent(mw.config.get( 'wgPageName' )) + '&project=en.wikipedia.org', 'Page views', 'pt-pageviews', 'Show page views for this page', null, '#t-info' ); });