add firefly message deleter prototype
authorAndrew Lorimer <andrew@lorimer.id.au>
Thu, 6 Jun 2019 09:01:51 +0000 (19:01 +1000)
committerAndrew Lorimer <andrew@lorimer.id.au>
Thu, 6 Jun 2019 09:01:51 +0000 (19:01 +1000)
firefly-message-deleter.js [new file with mode: 0644]
diff --git a/firefly-message-deleter.js b/firefly-message-deleter.js
new file mode 100644 (file)
index 0000000..2e886fd
--- /dev/null
@@ -0,0 +1,15 @@
+//
+//  firefly-message-deleter.js
+//
+//  Old announcements tend to pile up in Firefly, and this is my solution to
+//  delete them all at once. Run bulkClick() in the browser console. Currently
+//  one has to manually execute the code on each page (typically 10 items/page).
+//  Alternatively, use Greasemonkey/Tampermonkey.
+//
+
+function bulkClick() {
+  for(let e of document.getElementsByClassName("ff-message-close")) {
+    e.click();
+  }
+  location.reload(true);  // 'true' ignores cache
+}