Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block moekhalil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
moekhalil / getSiteVars.js
Created Feb 25, 2019
Extract a websites custom global variables. Very not-tested.
View getSiteVars.js
const getSiteVars = () => {
const blankWindow ='about:blank');
const defaultKeys = Object.keys(blankWindow);
return Object
.reduce((all, key) =>
blankWindow.hasOwnProperty(key) ? all : { ...all, [key]: window[key]}
, {}
You can’t perform that action at this time.