// Install with:
// <code><nowiki>		{{subst:Iusc|User:DannyS712/Meta.js}}																		</nowiki></code>
// or with
// <code><nowiki>		importScript( 'User:DannyS712/Meta.js' ); // Backlink: ] 							</nowiki></code> 
//
// If forking this script, please note my contributions / give me credit
//<nowiki>
$(function (){
const MetaLog = {};
MetaLog.config = {
	name: ']',
	version: 1.1,
	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 (MetaLog.config.debug) {
    			console.log( target );
    		}
    		mw.util.addPortletLink(
    			'p-cactions',
    			'//meta.wikimedia.orghttps://wiki95.com/en/Special:Log?page=' + target + '@' + mw.config.get( 'wgDBname'),
    			'View meta log',
    			'ca-meta-link',
    			'View logs on meta'
    		);
    	}
    } );
} );
});
//</nowiki>