This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code blocks alphabetized by state | |
const states = [ | |
{ min: 35000, max: 36999, code: 'AL', long: 'Alabama' }, | |
{ min: 99500, max: 99999, code: 'AK', long: 'Alaska' }, | |
{ min: 85000, max: 86999, code: 'AZ', long: 'Arizona' }, | |
{ min: 71600, max: 72999, code: 'AR', long: 'Arkansas' }, | |
{ min: 90000, max: 96699, code: 'CA', long: 'California' }, | |
{ min: 80000, max: 81999, code: 'CO', long: 'Colorado' }, | |
{ min: 6000, max: 6999, code: 'CT', long: 'Connecticut' }, | |
{ min: 19700, max: 19999, code: 'DE', long: 'Deleware' }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const delay = (retryCount: number, delayMultiplier: number) => | |
new Promise((resolve) => setTimeout(resolve, delayMultiplier * retryCount)); | |
export const exponentialBackOff = async <T>( | |
callback: () => Promise<T>, | |
options: { maxRetries: number; delayMultiplier: number } = { | |
maxRetries: 3, | |
delayMultiplier: 500, | |
}, | |
retryCount = 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.openToky = function openToky(number) { | |
const title = 'Toky'; | |
const w=300; | |
const h=500; | |
const _options = 'scrollbars=no,resizable=no'; | |
const url = 'https://app.toky.co/business/dialer#?call='+number; | |
// Fixes dual-screen position Most browsers Firefox | |
const dualScreenLeft = window.scareenLeft != undefined ? window.screenLeft : screen.left; | |
const dualScreenTop = window.screenTop != undefined ? window.screenTop : screen.top; | |
const width = window.innerWidth ? window.innerWidth : document.documentElement.clientWidth ? document.documentElement.clientWidth : screen.width; |
OlderNewer