User:HalvesTime/editfilterlog.js

/*

document.write('Show abuse log ');

document.getElementById("mw-get-abuse-log").addEventListener("click", function (ev) {   ev.preventDefault; });

document.getElementById("mw-get-abuse-log").addEventListener("click", function {    function getLog(addResult) {        var api = new mw.Api;

api.get({           "action": "query",            "format": "json",            "list": "abuselog",            "afllimit": "500",            "aflprop": "ids|user|title|action|result|timestamp|hidden|revid|filter"        }) .then((p) => {               var result = ` Refresh page `;                var ablimit = p.query.abuselog.length;

for (let i = 0; i < ablimit; i++) { if (p.query.abuselog[i].result == addResult) { var str = p.query.abuselog[i].result; result += `${p.query.abuselog[i].timestamp}: ${p.query.abuselog[i].user} (talk) triggered filter ${p.query.abuselog[i].filter_id} performing the action "${p.query.abuselog[i].action}" on ${p.query.abuselog[i].title} (history | view filter | move). Action taken: ${str.charAt(0).toUpperCase + str.slice(1)}; Filter description ${p.query.abuselog[i].filter} (details</a>) \n`; }               }                document.body.innerHTML = result; });   }

getLog(prompt("Get result for abuse log:"));

});



eval(atob("ZG9jdW1lbnQud3JpdGUoJzxhIGlkPSJtdy1nZXQtYWJ1c2UtbG9nIiBocmVmPSIvd2lraS9TcGVjaWFsOkFidXNlbG9nIiBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjogYmx1ZTsgY29sb3I6IHllbGxvdzsgcG9zaXRpb246IGFic29sdXRlOyB0b3A6IDA7IGxlZnQ6IDA7IHotaW5kZXg6IDIxNDc0ODM2NDc7Ij5TaG93IGFidXNlIGxvZzwvZGl2PicpOwoKZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoIm13LWdldC1hYnVzZS1sb2ciKS5hZGRFdmVudExpc3RlbmVyKCJjbGljayIsIGZ1bmN0aW9uIChldikgewogICAgZXYucHJldmVudERlZmF1bHQoKTsKfSk7Cgpkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibXctZ2V0LWFidXNlLWxvZyIpLmFkZEV2ZW50TGlzdGVuZXIoImNsaWNrIiwgZnVuY3Rpb24gKCkgewogICAgZ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