Skip to content

Instantly share code, notes, and snippets.

@mgamer
Created April 18, 2015 16:00
Show Gist options
  • Save mgamer/731061be3aec016583ae to your computer and use it in GitHub Desktop.
Save mgamer/731061be3aec016583ae to your computer and use it in GitHub Desktop.
Gmail - show trimmed content in current email
(function() {
var clickExpand = function() {
var btns = document.querySelectorAll(".ajR[aria-label='Show trimmed content']");
if (btns.length > 0) {
var btn = btns[btns.length - 1];
btn.click();
}
};
var clickShow = function() {
var btn = document.querySelector(".ata-asJ");
if (btn) {
btn.click();
}
};
setInterval(clickShow, 250);
setInterval(clickExpand, 250);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment