extension/src/options_page.js
// not fully correct, need to cancel request; but hopefully ok for now
not fully correct, need to cancel request; but hopefully ok for now
not fully correct need to cancel request ; but hopefully ok for now
function fetchTimeout(url, options, timeout) {
    return new Promise((resolve, reject) => {
        fetch(url, options).then(resolve, reject);
        if (timeout) {
            const e = new Error("Connection timed out");
            setTimeout(reject, timeout, e);
        }
    });
}
function fetchTimeout ( url , options , timeout ) { return new Promise ( ( resolve , reject ) => { fetch ( url , options ) . then ( resolve , reject ) ; if ( timeout ) { const e = new Error ( "Connection timed out" ) ; setTimeout ( reject , timeout , e ) ; } } ) ; }
not fully correct, need to cancel request; but hopefully ok for now
not fully correct need to cancel request ; but hopefully ok for now