User:Hytsnbr10519/test.js

var title = mw.config.get( 'wgTitle' ); var test = mw.config.get( 'wgPageName' );

console.log(test);