Created
August 17, 2020 17:55
-
-
Save samternent/8fc20c10aacb5ac5559deb8928b1d3e3 to your computer and use it in GitHub Desktop.
This file contains 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
export async function globalScope() { | |
lazyLoadCss(); | |
Object.assign(window, { | |
loadStartTime: new Date(), | |
initialData: window.initialData !== '[CF:initialData]' | |
? window.initialData | |
: { | |
'v/1/settings/branding.json': { | |
branding: { | |
theme: { | |
color: '#ff00cc', | |
}, | |
}, | |
}, | |
'account.json': {}, | |
}, | |
defaultFilters: window.defaultFilters !== '[CF:defaultFilters]' | |
? window.defaultFilters | |
: {}, | |
validFilters: window.validFilters !== '[CF:validFilters]' | |
? window.validFilters | |
: {}, | |
// This needs to be stripped out ASAP | |
// It is a temporary fix for a bug caused by LastPass | |
XMLHttpRequestSend: typeof XMLHttpRequest !== 'undefined' && XMLHttpRequest.prototype && XMLHttpRequest.prototype.send, | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment