onupdate.js
/**
* Initialize DevRuler at page load time (status = 'complete'),
* executing `devruler.js` script which is responsable to
* instanciate the command receiver.
* @param {string} id of the current tab
* @param {object} info of the current tab
* @param {object} current tab
*/
Initialize DevRuler at page load time (status = 'complete'),
executing `devruler.js` script which is responsable to
instanciate the command receiver.
Initialize DevRuler at page load time ( status = ' complete ' ) executing ` devruler . js ` script which is responsable to instanciate the command receiver .
function initializeRuler(id, info, tab) {
  if (info.status == "complete") {
    browser.tabs.executeScript({file: "/content_scripts/devruler.js"})
      .then(function() {
        const gettingStoredSettings = browser.storage.local.get();
        gettingStoredSettings.then(function(settings) {
          resetSettingsTabs(settings);
          if (settings.tabs && (settings.tabs instanceof Map)) {
            if (settings.tabs.has(id)) {
              updateOnLoad(settings.tabs.get(id), id);
            }
          } else {
            browser.storage.local.set({ tabs: new Map() });
          }
        }).catch(onError);
      }).catch(reportExecuteScriptError)
  }
}
function initializeRuler ( id , info , tab ) { if ( info . status == "complete" ) { browser . tabs . executeScript ( { file : "/content_scripts/devruler.js" } ) . then ( function ( ) { const gettingStoredSettings = browser . storage . local . get ( ) ; gettingStoredSettings . then ( function ( settings ) { resetSettingsTabs ( settings ) ; if ( settings . tabs && ( settings . tabs instanceof Map ) ) { if ( settings . tabs . has ( id ) ) { updateOnLoad ( settings . tabs . get ( id ) , id ) ; } } else { browser . storage . local . set ( { tabs : new Map ( ) } ) ; } } ) . catch ( onError ) ; } ) . catch ( reportExecuteScriptError ) } }
Initialize DevRuler at page load time (status = 'complete'),
executing `devruler.js` script which is responsable to
instanciate the command receiver.
Initialize DevRuler at page load time ( status = ' complete ' ) executing ` devruler . js ` script which is responsable to instanciate the command receiver .