User:SilverLocust/sandbox.js: Difference between revisions

Content deleted Content added
check later
Tag: Reverted
change edit summary
 
(One intermediate revision by the same user not shown)
Line 8:
protections: 'edit=extendedconfirmed|move=extendedconfirmed',
expiry: 'infinite',
reason: '[[WP:ARBECR|Arbitration enforcement]]: [[WP:PIA|Arab-Israeli conflict]]',
format: 'json'
},;
protection;
api = new mw.Api();
prot = api.get({
action: 'query',
format: 'json',
prop: 'info',
titles: page,
inprop: 'protection'
});
if(confirm(message)) {
api = new mw.Api();
prot = prot.query.pages[0].protection
api.postWithToken( 'csrf', params );
if (prot[0].level !== 'sysop'
&& prot[0].level !== 'extendedconfirmed'
&& prot[1].level !== 'sysop'
&& prot[1].level !== 'extendedconfirmed') {
api.postWithToken( 'csrf', params );
}
}
});