| import InternalKillSwitchWatcher from '../killSwitch/internalKillSwitchWatcher.js'; |
| export const KILL_SWITCH = 'killswitch_xhrproxy'; |
| export const KILL_SWITCH_LOCALSTORAGE_KEY = 'TWPTKillSwitchXHRProxyEnabled'; |
| export const KILL_SWITCH_LOCALSTORAGE_VALUE = 'true'; |
| export default class XHRProxyKillSwitchHandler { |
| new InternalKillSwitchWatcher(KILL_SWITCH, this.onChange, true); |
| window.localStorage.setItem( |
| KILL_SWITCH_LOCALSTORAGE_KEY, KILL_SWITCH_LOCALSTORAGE_VALUE); |
| window.localStorage.removeItem(KILL_SWITCH_LOCALSTORAGE_KEY); |