Skip to content

Commit 3f60d1b

Browse files
committed
Use path of main js file
1 parent e43f210 commit 3f60d1b

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

easycoder/easycoder-min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

easycoder/easycoder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3913,7 +3913,8 @@ const EasyCoder = {
39133913
console.log(`${Date.now() - this.timestamp} ms: Load ${path}/easycoder/plugins.js`);
39143914
const script = document.createElement(`script`);
39153915
let location = document.scripts[0].src;
3916-
script.src = `${window.location.origin}${path}/easycoder/plugins.js?ver=${this.version}`;
3916+
location = location.substring(0, location.indexOf(`/easycoder.js`));
3917+
script.src = `${location}/plugins.js?ver=${this.version}`;
39173918
script.type = `text/javascript`;
39183919
script.onload = () => {
39193920
EasyCoder_Plugins.getGlobalPlugins(

easycoder/easycoder.zip

63 Bytes
Binary file not shown.

js/easycoder/Main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ const EasyCoder = {
422422
console.log(`${Date.now() - this.timestamp} ms: Load ${path}/easycoder/plugins.js`);
423423
const script = document.createElement(`script`);
424424
let location = document.scripts[0].src;
425-
script.src = `${window.location.origin}${path}/easycoder/plugins.js?ver=${this.version}`;
425+
location = location.substring(0, location.indexOf(`/easycoder.js`));
426+
script.src = `${location}/plugins.js?ver=${this.version}`;
426427
script.type = `text/javascript`;
427428
script.onload = () => {
428429
EasyCoder_Plugins.getGlobalPlugins(

0 commit comments

Comments
 (0)