Skylords Reborn
No edit summary
No edit summary
Line 3: Line 3:
 
/* this is stupidly overspecifc to make sure it's only used for tabbers */
 
/* this is stupidly overspecifc to make sure it's only used for tabbers */
 
/* .parent(), because the a element doesn't listen to clicks itself */
 
/* .parent(), because the a element doesn't listen to clicks itself */
console.log($('.wds-tabs__tab[data-hash="'+ decodeURI(window.location.hash.replace(/\./gi, '%')).substr(1) +'"] > .wds-tabs__tab-label > a[href="#"]').parent());
+
console.log($('.wds-tabs__tab[data-hash="'+ decodeURI(window.location.hash.replace(/\./gi, '%')).substr(1) +'"] > .wds-tabs__tab-label > a[href="#"]').parent().click());
$('.wds-tabs__tab[data-hash="'+ decodeURI(window.location.hash.replace(/\./gi, '%')).substr(1) +'"] > .wds-tabs__tab-label > a[href="#"]').first().parent().click();
 
 
});
 
});

Revision as of 14:20, 23 September 2021

/* mw-tabber link fix [links containing "()"] */
mw.hook('wikipage.content').add(function () {
	/* this is stupidly overspecifc to make sure it's only used for tabbers */
	/* .parent(), because the a element doesn't listen to clicks itself */
    console.log($('.wds-tabs__tab[data-hash="'+ decodeURI(window.location.hash.replace(/\./gi, '%')).substr(1) +'"] > .wds-tabs__tab-label > a[href="#"]').parent().click());
});