Skip to content

Instantly share code, notes, and snippets.

@emanuele6
Created February 16, 2024 18:45
Show Gist options
  • Save emanuele6/223d7d4961196649df855d79c64f2adb to your computer and use it in GitHub Desktop.
Save emanuele6/223d7d4961196649df855d79c64f2adb to your computer and use it in GitHub Desktop.
qutebrowser greasemonkey userscript that adds a "Select All" button to the "basic HTML" gmail client <https://mail.google.com/mail/u/0/h/>
// ==UserScript==
// @name select all button on GMail basic HTML client
// @include /^https?://mail\.google\.com/mail/u/0/h/.*/
// ==/UserScript==
const inputs = document.querySelector("form[name='f'] table tr td")
if (inputs) {
const selectall = document.createElement("input");
selectall.type = "checkbox";
selectall.onchange = function(e) {
document.querySelectorAll("table.th input[type='checkbox']")
.forEach(i => i.checked = e.target.checked);
};
inputs.prepend(selectall);
}
@emanuele6
Copy link
Author

I wrote this script a ~4 months ago, and it works great; it is very convenient, and it works reliably on all the pages including search results, spam, bin, etc.

Unfortunately, Google announced that it is going to discontinue the "basic HTML" client this month (February 2024), so it probably won't be useful for very long. :(

Description Screenshot
Without userscript screenshotwithout
With userscript screenshotwith
With userscript
After click
screenshotwithselected

@emanuele6
Copy link
Author

I was just reading my email, and I have noticed that today, 2024-03-14, the gmail basic HTML client stopped working, probably either at midnight localtime (24m ago) or midnight UTC (1h24m ago).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment