lvm / gmail-basic-html-bookmarklets

Bookmarklets for Gmail Basic HTML version :email: :dash:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bookmarklets for Gmail Basic HTML version πŸ“§ πŸ’¨

I prefer the basic version because it's lighter but lacks basic functionalities (selecting manually an entire result page sucks), so let me introduce these bookmarklets in order to offer a better ux.
Just in case you're wondering wtf are they:

Bookmarklets are unobtrusive JavaScripts stored as the URL of a bookmark in a web browser or as a hyperlink on a web page.

(Source: Bookmarklet Wikipedia page)

Note: There's an Github Markup - open issue to allow creating javascript: links on READMEs, meanwhile you can either go to the webpage version of this document or scroll down to know how it's done in your browser).

Inbox

Performs a search using in:inbox is:unread filter.

[πŸ“₯ Inbox](javascript:(function(){document.querySelector("#sbq").value="in:inbox is:unread";document.querySelector("input[name='nvp_site_mail']").click();}());)

javascript: (function() {
  document.querySelector("#sbq").value = "in:inbox is:unread";
  document.querySelector("input[name='nvp_site_mail']").click();
}());

Unread

Performs a search using whatever is in your search box + is:unread filter.

[πŸ“© Unread](javascript:(function(){var sbq=document.querySelector("#sbq");sbq.value=sbq.value+" is:unread";document.querySelector("input[name='nvp_site_mail']").click();}());)

javascript: (function() {
  var sbq = document.querySelector("#sbq");
  sbq.value = sbq.value +" is:unread";
  document.querySelector("input[name='nvp_site_mail']").click();
}());

Select all

Will check every checkbox in the current result page.

[πŸ“• Select All](javascript:(function(){var inp=document.querySelectorAll("tr > td > input");for(var i=0;i<inp.length;i++){inp[i].checked=true;}}());)

javascript: (function() {
  var inp = document.querySelectorAll("tr > td > input");
  for (var i = 0; i < inp.length; i++){ inp[i].checked = true; }
}());

Select unread

Will check only those with white background (ie: unread) checkbox in the current result page.

[πŸ“— Select Unread](javascript:(function(){var inp=document.querySelectorAll("tr[bgcolor='#ffffff'] > td > input");for(var i=0;i<inp.length;i++){inp[i].checked=true;}}());)

javascript: (function() {
  var inp = document.querySelectorAll("tr[bgcolor='#ffffff'] > td > input");
  for (var i = 0; i < inp.length; i++){ inp[i].checked = true; }
}());

Q & A?

These are not working!

I use (and recommend) Firefox and haven't tried on other browsers, so please report it if you found an issue.

How can I add a bookmarklet?

That'll depend on your browser.

LICENSE

See LICENSE

About

Bookmarklets for Gmail Basic HTML version :email: :dash:

License:The Unlicense