User:Jayprakash12345/qrcode-svg.js
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/*
@Author [[User:Jayprakash12345]]
@OwnBy [[meta:Indic-TechCom]]
Please note The word "QR Code" is registered trademark of DENSO WAVE INCORPORATED
*/
$(document).ready( function() {
// Add a portlet link.
var link = mw.util.addPortletLink(
'p-tb',
'#',
'Generate QR-Code SVG'
);
// Trigger for portlet link
$(link).click( function( e ) {
e.preventDefault();
pageName = mw.config.get( 'wgPageName' )
wikiurl = 'https:' + mw.config.get( 'wgServer' ) + '/wiki/' + mw.config.get( 'wgPageName' );
url = 'https://tools.wmflabs.org/qrcode-generator/?urltextBox=' + wikiurl;
var win = window.open(url, '_blank');
win.focus();
});
});