popup/ruler_popup.js
/**
* Toggle Ruler taking account of the popup entry checkbox
* @param {bool} state
*/
Toggle Ruler taking account of the popup entry checkbox
Toggle Ruler taking account of the popup entry checkbox
function toggleRuler(state) {
  if (state) {
    browser.tabs.query({active: true, currentWindow: true})
      .then(sendShowRuler)
      .catch(onError);
  } else {
    browser.tabs.query({active: true, currentWindow: true})
      .then(reset)
      .catch(onError);
  }
}
function toggleRuler ( state ) { if ( state ) { browser . tabs . query ( { active : true , currentWindow : true } ) . then ( sendShowRuler ) . catch ( onError ) ; } else { browser . tabs . query ( { active : true , currentWindow : true } ) . then ( reset ) . catch ( onError ) ; } }
Toggle Ruler taking account of the popup entry checkbox
Toggle Ruler taking account of the popup entry checkbox