Admin Flag Notifier v0.3: fix for supporting new admin dashboard
This commit is contained in:
parent
c4bf2c9496
commit
85908c5e56
1 changed files with 12 additions and 4 deletions
|
@ -5,15 +5,19 @@
|
||||||
// @author Glorfindel
|
// @author Glorfindel
|
||||||
// @updateURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/admin-flag-notifier/admin-flag-notifier.user.js
|
// @updateURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/admin-flag-notifier/admin-flag-notifier.user.js
|
||||||
// @downloadURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/admin-flag-notifier/admin-flag-notifier.user.js
|
// @downloadURL https://raw.githubusercontent.com/Glorfindel83/SE-Userscripts/master/admin-flag-notifier/admin-flag-notifier.user.js
|
||||||
// @version 0.2
|
// @version 0.3
|
||||||
// @match *://*.stackexchange.com/admin/dashboard*
|
// @match *://*.stackexchange.com/admin/dashboard*
|
||||||
// @match *://*.stackoverflow.com/admin/dashboard*
|
|
||||||
// @match *://stackoverflow.com/admin/dashboard*
|
// @match *://stackoverflow.com/admin/dashboard*
|
||||||
|
// @match *://*.stackoverflow.com/admin/dashboard*
|
||||||
// @match *://superuser.com/admin/dashboard*
|
// @match *://superuser.com/admin/dashboard*
|
||||||
|
// @match *://*.superuser.com/admin/dashboard*
|
||||||
// @match *://serverfault.com/admin/dashboard*
|
// @match *://serverfault.com/admin/dashboard*
|
||||||
|
// @match *://*.serverfault.com/admin/dashboard*
|
||||||
// @match *://askubuntu.com/admin/dashboard*
|
// @match *://askubuntu.com/admin/dashboard*
|
||||||
// @match *://stackapps.com/admin/dashboard*
|
// @match *://*.askubuntu.com/admin/dashboard*
|
||||||
|
// @match *://*.stackapps.com/admin/dashboard*
|
||||||
// @match *://mathoverflow.net/admin/dashboard*
|
// @match *://mathoverflow.net/admin/dashboard*
|
||||||
|
// @match *://*.mathoverflow.net/admin/dashboard*
|
||||||
// @grant none
|
// @grant none
|
||||||
// ==/UserScript==
|
// ==/UserScript==
|
||||||
|
|
||||||
|
@ -33,7 +37,11 @@
|
||||||
console.log("Current: " + currentFlags);
|
console.log("Current: " + currentFlags);
|
||||||
|
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
var url = 'https://' + host + '/admin/dashboard?filtered=' + !document.getElementById("chk-apply-filters").checked;
|
let checkbox = document.getElementById("chk-apply-filters");
|
||||||
|
if (checkbox == null) {
|
||||||
|
checkbox = document.getElementsByClassName("js-toggle-apply-filters")[0];
|
||||||
|
}
|
||||||
|
var url = 'https://' + host + '/admin/dashboard?filtered=' + !checkbox.checked;
|
||||||
console.log("Calling: " + url);
|
console.log("Calling: " + url);
|
||||||
$.get(url, function (data) {
|
$.get(url, function (data) {
|
||||||
var updatedTitle = $("<html/>").html(data).find("title").text();
|
var updatedTitle = $("<html/>").html(data).find("title").text();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue