UNPKG

@kitten-science/kitten-scientists

Version:

Add-on for the wonderful incremental browser game: https://kittensgame.com/web/

17 lines 877 B
import { isNil } from "@oliversalzburg/js-utils/data/nil.js"; import { redirectErrorsToConsole } from "@oliversalzburg/js-utils/errors/console.js"; import { InvalidOperationError } from "@oliversalzburg/js-utils/errors/InvalidOperationError.js"; (async () => { const existingLoader = document.querySelector("#ks-loader-singleton"); if (!isNil(existingLoader)) { throw new InvalidOperationError("The Kitten Science script loader was already created. This is unexpected."); } if (typeof GM !== "undefined") { const nodeScript = document.createElement("script"); nodeScript.id = "ks-loader-singleton"; nodeScript.textContent = PAYLOAD; nodeScript.type = "application/javascript"; document.body.appendChild(nodeScript); } })().catch(redirectErrorsToConsole(console)); //# sourceMappingURL=entrypoint-loader.js.map