MediaWiki:Gadget-exchangePages-core.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.
1 //<nowiki>
2 $(function () {
3 $('.gemw-button.secondary').each(function(i,e){
4 var txt = $(e).find('a').text();
5 var href = $(e).find('a').attr('href');
6 var button = new OO.ui.ButtonWidget({
7 label: txt,
8 title: href
9 });
10 button.$element.on('mousedown', function(){
11 window.open(href, '_blank');
12 });
13
14 $(e).parent().append(button.$element);
15 $(e).remove();
16 });
17 var exchangeOverlay = $('<div>');
18 exchangeOverlay
19 .css({position: 'relative', 'z-index': 100})
20 .attr('id', 'rsw-exchange-overlay')
21 .appendTo('body');
22 })
23 //</nowiki>