User:MusikAnimal/userRightsManager.js: Difference between revisions

Content deleted Content added
fix regex for finding section number
fix anchor tag selector to ignore visual editor edit links
Line 227:
console.log('Marking as done');
var sectionNode = document.getElementById('User:' + userName.replace(/ /g, '_')),
sectionNumber = $(sectionNode).siblings('.mw-editsection').find('"a:not('.mw-editsection-visualeditor')").prop('href').match(/section=(\d+)/)[1];
return api.postWithToken( 'edit', {
format: 'json',