Skip to content

Instantly share code, notes, and snippets.

@J-Gras
Created January 22, 2019 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save J-Gras/3aa74ec479c306d3400891dd05e58af9 to your computer and use it in GitHub Desktop.
Save J-Gras/3aa74ec479c306d3400891dd05e58af9 to your computer and use it in GitHub Desktop.
Toggles between plaintext and sanitized HTML view in Thunderbird.
var pref = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
if(pref.getBoolPref("mailnews.display.prefer_plaintext")){
MsgBodyAllowHTML();
pref.setIntPref('mailnews.display.html_as', 3);
}else
MsgBodyAsPlaintext();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment