src/Extension/audience-display.background.js
/**
 * Called when the browser action is clicked.  Runs selectitem.js if 
 * needed.
 */
Called when the browser action is clicked.
Called when the browser action is clicked .
function onBrowserActionClicked(tab) {
    if (active[tab.id] == false) {
        if (isInvalidUrl(tab.url)) {
            alert("Audience Display only works (for now) in the Live Chat from YouTube.");
            return;
        }
        setActive(tab.id, true);
        chrome.tabs.executeScript(tab.id, { code: "activateMessage();" });
    }
}
function onBrowserActionClicked ( tab ) { if ( active [ tab . id ] == false ) { if ( isInvalidUrl ( tab . url ) ) { alert ( "Audience Display only works (for now) in the Live Chat from YouTube." ) ; return ; } setActive ( tab . id , true ) ; chrome . tabs . executeScript ( tab . id , { code : "activateMessage();" } ) ; } }
Called when the browser action is clicked.
Called when the browser action is clicked .