function tryMuteTab(tab, tabId) {
		var mutedCause = null;

		// Chrome's muted API changed in v46
		if (typeof tab.mutedCause !== 'undefined') // v < 46
			mutedCause = tab.mutedCause;
		else if (typeof tab.mutedInfo !== 'undefined') // v >= 46
			mutedCause = tab.mutedInfo.reason;

		// Don't change current muted state if it was modified by user
		if (mutedCause !== "user") {
			if (!settingsLoaded) {
				document.addEventListener('settingsLoaded', function f() {
					toggleMute(tab, tabId);
					document.removeEventListener('settingsLoaded', f, false);
				}, false);
			} else {
				toggleMute(tab, tabId);
			}
		}
	}
// Try to mute a tab (wait until url patterns are loaded from storage).
Try to mute a tab (wait until url patterns are loaded from storage).
Try to mute a tab ( wait until url patterns are loaded from storage ) .
function tryMuteTab(tab, tabId) {
		var mutedCause = null;
		if (typeof tab.mutedCause !== 'undefined') 
			mutedCause = tab.mutedCause;
		else if (typeof tab.mutedInfo !== 'undefined') 
			mutedCause = tab.mutedInfo.reason;
		if (mutedCause !== "user") {
			if (!settingsLoaded) {
				document.addEventListener('settingsLoaded', function f() {
					toggleMute(tab, tabId);
					document.removeEventListener('settingsLoaded', f, false);
				}, false);
			} else {
				toggleMute(tab, tabId);
			}
		}
	}
function tryMuteTab ( tab , tabId ) { var mutedCause = null ; if ( typeof tab . mutedCause !== 'undefined' ) mutedCause = tab . mutedCause ; else if ( typeof tab . mutedInfo !== 'undefined' ) mutedCause = tab . mutedInfo . reason ; if ( mutedCause !== "user" ) { if ( ! settingsLoaded ) { document . addEventListener ( 'settingsLoaded' , function f ( ) { toggleMute ( tab , tabId ) ; document . removeEventListener ( 'settingsLoaded' , f , false ) ; } , false ) ; } else { toggleMute ( tab , tabId ) ; } } }
Try to mute a tab (wait until url patterns are loaded from storage).
Try to mute a tab ( wait until url patterns are loaded from storage ) .
// Chrome's muted API changed in v46 // v < 46 // v >= 46 // Don't change current muted state if it was modified by user