From 8ac8f45ce7ba4fe69aed317e0796bba7973a56fe Mon Sep 17 00:00:00 2001 From: Clemens Lieb Date: Thu, 19 Apr 2018 21:35:25 +0200 Subject: [PATCH 1/3] respect filtering preference for queries --- admin-flag-notifier/admin-flag-notifier.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin-flag-notifier/admin-flag-notifier.user.js b/admin-flag-notifier/admin-flag-notifier.user.js index 14cec08..d5af887 100644 --- a/admin-flag-notifier/admin-flag-notifier.user.js +++ b/admin-flag-notifier/admin-flag-notifier.user.js @@ -5,7 +5,7 @@ // @author Glorfindel // @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 -// @version 0.1 +// @version 0.2 // @match *://*.stackexchange.com/admin/dashboard* // @match *://*.stackoverflow.com/admin/dashboard* // @match *://*.superuser.com/admin/dashboard* @@ -32,7 +32,7 @@ console.log("Current: " + currentFlags); setInterval(function () { - var url = "https://" + host + "/admin/dashboard?filtered=false"; + var url = `https://{host}/admin/dashboard?filtered={document.getElementById("chk-apply-filters").checked}`; console.log("Calling: " + url); $.get(url, function (data) { var updatedTitle = $("").html(data).find("title").text(); From b8537fbf81fb1e2b8a7409c543e274fe12093b25 Mon Sep 17 00:00:00 2001 From: Clemens Lieb Date: Fri, 20 Apr 2018 10:56:26 +0200 Subject: [PATCH 2/3] map inverted behaviour of checkbox --- admin-flag-notifier/admin-flag-notifier.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-flag-notifier/admin-flag-notifier.user.js b/admin-flag-notifier/admin-flag-notifier.user.js index d5af887..c9e920b 100644 --- a/admin-flag-notifier/admin-flag-notifier.user.js +++ b/admin-flag-notifier/admin-flag-notifier.user.js @@ -32,7 +32,7 @@ console.log("Current: " + currentFlags); setInterval(function () { - var url = `https://{host}/admin/dashboard?filtered={document.getElementById("chk-apply-filters").checked}`; + var url = `https://{host}/admin/dashboard?filtered={!document.getElementById("chk-apply-filters").checked}`; console.log("Calling: " + url); $.get(url, function (data) { var updatedTitle = $("").html(data).find("title").text(); From f43fe72d0515f527aa1395b5fd524b4b98495fed Mon Sep 17 00:00:00 2001 From: Glorfindel83 Date: Fri, 20 Apr 2018 20:51:58 +0200 Subject: [PATCH 3/3] Update admin-flag-notifier.user.js --- admin-flag-notifier/admin-flag-notifier.user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin-flag-notifier/admin-flag-notifier.user.js b/admin-flag-notifier/admin-flag-notifier.user.js index c9e920b..f5127a1 100644 --- a/admin-flag-notifier/admin-flag-notifier.user.js +++ b/admin-flag-notifier/admin-flag-notifier.user.js @@ -32,7 +32,7 @@ console.log("Current: " + currentFlags); setInterval(function () { - var url = `https://{host}/admin/dashboard?filtered={!document.getElementById("chk-apply-filters").checked}`; + var url = 'https://' + host + '/admin/dashboard?filtered=' + !document.getElementById("chk-apply-filters").checked; console.log("Calling: " + url); $.get(url, function (data) { var updatedTitle = $("").html(data).find("title").text();