src/drivers/webextension/js/driver.js
function getOption(name, defaultValue = null) {
  return new Promise(async (resolve, reject) => {
    let value = defaultValue;

    try {
      const option = await browser.storage.local.get(name);

      if (option[name] !== undefined) {
        value = option[name];
      }
    } catch (error) {
      wappalyzer.log(error.message, 'driver', 'error');

      return reject(error.message);
    }

    return resolve(value);
  });
}
function getOption(name, defaultValue = null) {
  return new Promise(async (resolve, reject) => {
    let value = defaultValue;

    try {
      const option = await browser.storage.local.get(name);

      if (option[name] !== undefined) {
        value = option[name];
      }
    } catch (error) {
      wappalyzer.log(error.message, 'driver', 'error');

      return reject(error.message);
    }

    return resolve(value);
  });
}
function getOption ( name , defaultValue = null ) { return new Promise ( async ( resolve , reject ) => { let value = defaultValue ; try { const option = await browser . storage . local . get ( name ) ; if ( option [ name ] !== undefined ) { value = option [ name ] ; } } catch ( error ) { wappalyzer . log ( error . message , 'driver' , 'error' ) ; return reject ( error . message ) ; } return resolve ( value ) ; } ) ; }
Get a value from localStorage
Get a value from localStorage