User:Pemaksa/Api.js

// Install with: // // or with //  // // If forking this script, please note my contributions / give me credit // $(function { var Api_log_config = {	name: 'View api log.js',	version: 1.0,	debug: false };

mw.loader.using( 'mediawiki.util', function {    $(document).ready( function  { var page = mw.config.get('wgCanonicalSpecialPageName'); if (page && page == "Log") { var target = document.getElementById("ooui-php-3").value; if (Api_log_config.debug) console.log ( target ); mw.util.addPortletLink ( 'p-cactions', '//api.wikimedia.org/wiki/Special:Log?page=' + target + '@enwiki', 'View api log', 'ca-api-link', 'View logs on api'); }   } ); } ); }); //