User:Qwerfjkl/scripts/subscribeall.js

mw.loader.using( 'mediawiki.util', function {

// Wait for the page to be parsed $( document ).ready( function {

//see below "Portlets" subsection var link = mw.util.addPortletLink( 'p-tb', '#', 'Subscribe all', 't-subscribeall', 'Click all subscribe links on the page'); $( link ).click( function ( event ) {           event.preventDefault;            var myLinks = document.getElementsByClassName("ext-discussiontools-init-section-subscribe-link");            console.log('Links from https://en.wikipedia.org/w/index.php?title=User:Qwerfjkl/scripts/subscribeall.js&action=edit:\n'+myLinks);            for (var i = 0; i < myLinks.length; i++) {            	console.log("subscribeall.js: "+myLinks[i]);            	myLinks[i].click;            }

} );   } ); } );