Skip to content

Commit 9156509

Browse files
authored
Merge pull request #3 from easycoder/dev
Dev
2 parents 43da2aa + f46db1e commit 9156509

File tree

5 files changed

+21
-15
lines changed

5 files changed

+21
-15
lines changed

easycoder/easycoder-min.js

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

easycoder/easycoder.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3912,8 +3912,11 @@ const EasyCoder = {
39123912
},
39133913

39143914
loadPluginJs: function(path) {
3915-
let location = document.scripts[0].src;
3916-
location = location.substring(0, location.indexOf(`/easycoder.js`));
3915+
let location = path;
3916+
if (!location) {
3917+
location = document.scripts[0].src;
3918+
location = location.substring(0, location.indexOf(`/easycoder.js`));
3919+
}
39173920
console.log(`${Date.now() - this.timestamp} ms: Load ${location}/plugins.js`);
39183921
const script = document.createElement(`script`);
39193922
script.src = `${location}/plugins.js?ver=${this.version}`;
@@ -3929,7 +3932,7 @@ const EasyCoder = {
39293932
};
39303933
script.onerror = () => {
39313934
if (path) {
3932-
this.loadPluginJs(path.slice(0, path.lastIndexOf(`/`)));
3935+
this.loadPluginJs(null);
39333936
} else {
39343937
this.reportError({
39353938
message: `Can't load plugins.js`
@@ -3950,7 +3953,7 @@ const EasyCoder = {
39503953
pathname = ``;
39513954
}
39523955
if (typeof EasyCoder_Plugins === `undefined`) {
3953-
this.loadPluginJs(pathname);
3956+
this.loadPluginJs(`${window.location.href}plugins.js`);
39543957
} else {
39553958
this.pluginsPath = pathname;
39563959
EasyCoder_Plugins.getGlobalPlugins(

easycoder/easycoder.zip

53 Bytes
Binary file not shown.

js/easycoder/Main.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,11 @@ const EasyCoder = {
421421
},
422422

423423
loadPluginJs: function(path) {
424-
let location = document.scripts[0].src;
425-
location = location.substring(0, location.indexOf(`/easycoder.js`));
424+
let location = path;
425+
if (!location) {
426+
location = document.scripts[0].src;
427+
location = location.substring(0, location.indexOf(`/easycoder.js`));
428+
}
426429
console.log(`${Date.now() - this.timestamp} ms: Load ${location}/plugins.js`);
427430
const script = document.createElement(`script`);
428431
script.src = `${location}/plugins.js?ver=${this.version}`;
@@ -438,7 +441,7 @@ const EasyCoder = {
438441
};
439442
script.onerror = () => {
440443
if (path) {
441-
this.loadPluginJs(path.slice(0, path.lastIndexOf(`/`)));
444+
this.loadPluginJs(null);
442445
} else {
443446
this.reportError({
444447
message: `Can't load plugins.js`
@@ -459,7 +462,7 @@ const EasyCoder = {
459462
pathname = ``;
460463
}
461464
if (typeof EasyCoder_Plugins === `undefined`) {
462-
this.loadPluginJs(pathname);
465+
this.loadPluginJs(`${window.location.href}plugins.js`);
463466
} else {
464467
this.pluginsPath = pathname;
465468
EasyCoder_Plugins.getGlobalPlugins(

resources/md/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Once you have edit access to an empty server directory, create an `index.html` f
2626
</html>
2727
```
2828

29-
If all is well, when you type the URL of the site into your browser the message **Hello, world!** should appear at the top of the window.
29+
If all is well, when you type the URL of the site into your browser the message **Hello, world!** should appear in a popup message window.
3030

3131
The upper half of the file is the _HEAD_ of the document. In here is a call to load the ~ec~ JavaScript engine that we'll be using instead of regular JavaScript. It's called from a _Content Delivery Network_ that takes files from the main source-code repository for ~ec~. Don't worry if this is all a bit too technical; it's not necessary to understand in order to use it.
3232

0 commit comments

Comments
 (0)