Skip to content

Rever to current #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Rever to current
  • Loading branch information
graham-trott committed Apr 13, 2020
commit 80de766a3d2e25a4865c65d4b4709f6c703cba60
28 changes: 14 additions & 14 deletions easycoder/easycoder-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 7 additions & 19 deletions easycoder/easycoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -3921,21 +3921,11 @@ const EasyCoder = {
},

loadPluginJs: function(path) {
if (!path) {
path = document.scripts[0].src;
path = path.substring(0, path.indexOf(`/easycoder.js`));
}
this.path = path;
let src = `${path}/easycoder/plugins.js?ver=${this.version}`
console.log(`${Date.now() - this.timestamp} ms: Load ${src}`);
console.log(`${Date.now() - this.timestamp} ms: Load ${path}/easycoder/plugins.js`);
const script = document.createElement(`script`);
script.src = src;
script.src = `${window.location.origin}${path}/easycoder/plugins.js?ver=${this.version}`;
script.type = `text/javascript`;
script.onload = () => {
let path = this.path.substr(window.location.origin.length);
if (path.endsWith(`/`)) {
path = path.slice(0, -1);
}
EasyCoder_Plugins.getGlobalPlugins(
this.timestamp,
path,
Expand All @@ -3946,7 +3936,7 @@ const EasyCoder = {
};
script.onerror = () => {
if (path) {
this.loadPluginJs(null);
this.loadPluginJs(path.slice(0, path.lastIndexOf(`/`)));
} else {
this.reportError({
message: `Can't load plugins.js`
Expand All @@ -3960,14 +3950,12 @@ const EasyCoder = {
start: function(source) {
this.source = source;
this.scriptIndex = 0;
let pathname = window.location.href;
let q = pathname.indexOf('?');
if (q > 0) {
pathname = pathname.substr(0, q);
}
let pathname = window.location.pathname;
if (pathname.endsWith(`/`)) {
pathname = pathname.slice(0, -1);
}
} else {
pathname = ``;
}
if (typeof EasyCoder_Plugins === `undefined`) {
this.loadPluginJs(pathname);
} else {
Expand Down
Binary file modified easycoder/easycoder.zip
Binary file not shown.
26 changes: 7 additions & 19 deletions js/easycoder/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,21 +422,11 @@ const EasyCoder = {
},

loadPluginJs: function(path) {
if (!path) {
path = document.scripts[0].src;
path = path.substring(0, path.indexOf(`/easycoder.js`));
}
this.path = path;
let src = `${path}/easycoder/plugins.js?ver=${this.version}`
console.log(`${Date.now() - this.timestamp} ms: Load ${src}`);
console.log(`${Date.now() - this.timestamp} ms: Load ${path}/easycoder/plugins.js`);
const script = document.createElement(`script`);
script.src = src;
script.src = `${window.location.origin}${path}/easycoder/plugins.js?ver=${this.version}`;
script.type = `text/javascript`;
script.onload = () => {
let path = this.path.substr(window.location.origin.length);
if (path.endsWith(`/`)) {
path = path.slice(0, -1);
}
EasyCoder_Plugins.getGlobalPlugins(
this.timestamp,
path,
Expand All @@ -447,7 +437,7 @@ const EasyCoder = {
};
script.onerror = () => {
if (path) {
this.loadPluginJs(null);
this.loadPluginJs(path.slice(0, path.lastIndexOf(`/`)));
} else {
this.reportError({
message: `Can't load plugins.js`
Expand All @@ -461,14 +451,12 @@ const EasyCoder = {
start: function(source) {
this.source = source;
this.scriptIndex = 0;
let pathname = window.location.href;
let q = pathname.indexOf('?');
if (q > 0) {
pathname = pathname.substr(0, q);
}
let pathname = window.location.pathname;
if (pathname.endsWith(`/`)) {
pathname = pathname.slice(0, -1);
}
} else {
pathname = ``;
}
if (typeof EasyCoder_Plugins === `undefined`) {
this.loadPluginJs(pathname);
} else {
Expand Down