We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0897b4d commit 7d84d6bCopy full SHA for 7d84d6b
client/index.js
@@ -7,7 +7,7 @@ if (typeof __resourceQuery === "string" && __resourceQuery) {
7
urlParts = url.parse(__resourceQuery.substr(1));
8
} else {
9
// Else, get the url from the <script> this file was called with.
10
- var scriptElements = document.getElementsByTagName("script");
+ var scriptElements = document.scripts;
11
var scriptHost = scriptElements[scriptElements.length-1].getAttribute("src");
12
scriptHost = scriptHost && scriptHost.replace(/\/[^\/]+$/, "");
13
urlParts = url.parse((scriptHost ? scriptHost : "/"), false, true);
0 commit comments