chrome/content/dkim.js
/*
	 * Sets visibility of DKIM header, DKIM statusbar panel and DKIM tooltip
	 * based on current state and preferences.
	 *
	 * Gets called every time the current state changes.
	 */
Sets visibility of DKIM header, DKIM statusbar panel and DKIM tooltip
based on current state and preferences.

Gets called every time the current state changes.
Sets visibility of DKIM header DKIM statusbar panel and DKIM tooltip based on current state and preferences . Gets called every time the current state changes .
function Display_setCollapsed(state) {
		function setDKIMFromTooltip(headerBox) {
			var emailDisplayButton = headerBox.emailAddresses.getElementsByClassName("emaillabel")[0];
			if (emailDisplayButton) {
				emailDisplayButton.tooltip = "dkim-verifier-header-tooltip-from";
				emailDisplayButton.setAttribute("tooltiptextSaved", 
					emailDisplayButton.getAttribute("tooltiptext")
				);
				emailDisplayButton.removeAttribute("tooltiptext");
			}
		}
		function removeDKIMFromTooltip(headerBox) {
			var emailDisplayButton = headerBox.emailAddresses.getElementsByClassName("emaillabel")[0];
			if (emailDisplayButton) {
				if (emailDisplayButton.tooltip === "dkim-verifier-header-tooltip-from") {
					emailDisplayButton.tooltip = "";
					emailDisplayButton.setAttribute("tooltiptext", 
						emailDisplayButton.getAttribute("tooltiptextSaved")
					);
				}
			}
		}
		if (prefs.getIntPref("showDKIMHeader") >= state ) {
			if (row.collapsed === true) {
				row.collapsed = false;
				syncGridColumnWidths();
			}
		} else {
			if (row.collapsed === false) {
				row.collapsed = true;
				syncGridColumnWidths();
			}
		}
		if (prefs.getIntPref("showDKIMStatusbarpanel") >= state ) {
			statusbarPanel.hidden = false;
		} else {
			statusbarPanel.hidden = true;
		}
		if (prefs.getIntPref("showDKIMFromTooltip") >= state ) {
			setDKIMFromTooltip(expandedFromBox);
			if (collapsed1LfromBox) {
				setDKIMFromTooltip(collapsed1LfromBox);
			}
			if (collapsed2LfromBox) {
				setDKIMFromTooltip(collapsed2LfromBox);
			}
		} else {
			removeDKIMFromTooltip(expandedFromBox);
			if (collapsed1LfromBox) {
				removeDKIMFromTooltip(collapsed1LfromBox);
			}
			if (collapsed2LfromBox) {
				removeDKIMFromTooltip(collapsed2LfromBox);
			}
		}
	}
function Display_setCollapsed ( state ) { function setDKIMFromTooltip ( headerBox ) { var emailDisplayButton = headerBox . emailAddresses . getElementsByClassName ( "emaillabel" ) [ 0 ] ; if ( emailDisplayButton ) { emailDisplayButton . tooltip = "dkim-verifier-header-tooltip-from" ; emailDisplayButton . setAttribute ( "tooltiptextSaved" , emailDisplayButton . getAttribute ( "tooltiptext" ) ) ; emailDisplayButton . removeAttribute ( "tooltiptext" ) ; } } function removeDKIMFromTooltip ( headerBox ) { var emailDisplayButton = headerBox . emailAddresses . getElementsByClassName ( "emaillabel" ) [ 0 ] ; if ( emailDisplayButton ) { if ( emailDisplayButton . tooltip === "dkim-verifier-header-tooltip-from" ) { emailDisplayButton . tooltip = "" ; emailDisplayButton . setAttribute ( "tooltiptext" , emailDisplayButton . getAttribute ( "tooltiptextSaved" ) ) ; } } } if ( prefs . getIntPref ( "showDKIMHeader" ) >= state ) { if ( row . collapsed === true ) { row . collapsed = false ; syncGridColumnWidths ( ) ; } } else { if ( row . collapsed === false ) { row . collapsed = true ; syncGridColumnWidths ( ) ; } } if ( prefs . getIntPref ( "showDKIMStatusbarpanel" ) >= state ) { statusbarPanel . hidden = false ; } else { statusbarPanel . hidden = true ; } if ( prefs . getIntPref ( "showDKIMFromTooltip" ) >= state ) { setDKIMFromTooltip ( expandedFromBox ) ; if ( collapsed1LfromBox ) { setDKIMFromTooltip ( collapsed1LfromBox ) ; } if ( collapsed2LfromBox ) { setDKIMFromTooltip ( collapsed2LfromBox ) ; } } else { removeDKIMFromTooltip ( expandedFromBox ) ; if ( collapsed1LfromBox ) { removeDKIMFromTooltip ( collapsed1LfromBox ) ; } if ( collapsed2LfromBox ) { removeDKIMFromTooltip ( collapsed2LfromBox ) ; } } }
Sets visibility of DKIM header, DKIM statusbar panel and DKIM tooltip
 based on current state and preferences.
Sets visibility of DKIM header DKIM statusbar panel and DKIM tooltip based on current state and preferences .
// DKIM header // show DKIM header // don't show DKIM header // DKIM statusbar panel // show DKIM statusbar panel // don't show DKIM statusbar panel // DKIM tooltip for From header // show tooltip for From header // for CompactHeader addon // don't show tooltip for From header // for CompactHeader addon