Skip to content

Instantly share code, notes, and snippets.

@suchipi
Last active February 3, 2022 17:01
Show Gist options
  • Save suchipi/506331b9955ac2ffc13884be24c0eec0 to your computer and use it in GitHub Desktop.
Save suchipi/506331b9955ac2ffc13884be24c0eec0 to your computer and use it in GitHub Desktop.
(function() {
var global = (
typeof globalThis !== "undefined" ? globalThis :
typeof global !== "undefined" ? global :
typeof window !== "undefined" ? window :
typeof self !== "undefined" ? self :
typeof this === "object" ? this :
new Function("return this")()
);
var name = document.getAttribute(document.currentScript, "name");
global[name] = global[name] || {};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment