import getCurrentScriptSource from "./getCurrentScriptSource.js"; /** * @param {string} resourceQuery * @returns {{ [key: string]: string | boolean }} */ function parseURL(resourceQuery) { /** @type {{ [key: string]: string }} */ var options = {}; if (typeof resourceQuery === "string" && resourceQuery !== "") { var searchParams = resourceQuery.substr(1).split("&"); for (var i = 0; i < searchParams.length; i++) { var pair = searchParams[i].split("="); options[pair[0]] = decodeURIComponent(pair[1]); } } else { // Else, get the url from the