popup/ruler_popup.js
/**
* Listen for clicks on the buttons, and send the 
* appropriate message to the content script in the page.
*/
Listen for clicks on the buttons, and send the
appropriate message to the content script in the page.
Listen for clicks on the buttons and send the appropriate message to the content script in the page .
function listenForClicks() {
  document.addEventListener("click", (e) => {
    storeSettings();
    if (e.target.id == 'ruler-state') {
      toggleRuler(e.target.checked);
    } else if (e.target.id == 'bsb-state') {
      toggleBreakpoints(e.target.checked);
    } else if (e.target.id == 'open-options') {
      e.preventDefault();
      browser.runtime.openOptionsPage();
    }
  });
}
function listenForClicks ( ) { document . addEventListener ( "click" , ( e ) => { storeSettings ( ) ; if ( e . target . id == 'ruler-state' ) { toggleRuler ( e . target . checked ) ; } else if ( e . target . id == 'bsb-state' ) { toggleBreakpoints ( e . target . checked ) ; } else if ( e . target . id == 'open-options' ) { e . preventDefault ( ) ; browser . runtime . openOptionsPage ( ) ; } } ) ; }
Listen for clicks on the buttons, and send the
appropriate message to the content script in the page.
Listen for clicks on the buttons and send the appropriate message to the content script in the page .