diff --git a/src/dropdown.html b/src/dropdown.html index fbbc748..e4e7e36 100644 --- a/src/dropdown.html +++ b/src/dropdown.html @@ -39,14 +39,14 @@ <script src="js/wterminal.js"></script>

Then add a script ellement with:
- WTerminal.instalDropdownTerminal(); - Or - new WTerminal("dropdown", null, null); + WTerminal.instalDropdownTerminal();
+ Or
+ new WTerminal("dropdown");

diff --git a/src/js/wterminal.js b/src/js/wterminal.js index cff6d03..356b313 100644 --- a/src/js/wterminal.js +++ b/src/js/wterminal.js @@ -5,7 +5,7 @@ */ class WTerminal { //TERMINAL const - static get VERSION() { return "1.3.2"; }; // terminal version, duh. + static get VERSION() { return "1.3.3"; }; // terminal version, duh. //css & html element relations: static get BACKGROUND_CLASS() { return "wterminal-background"; }; // blurred background div class, contains it all, hides it all. static get CONTAINER_CLASS() { return "wterminal-container"; }; // container div class for all the terminal elements. @@ -198,7 +198,7 @@ class WTerminal { constructor(name, locationId, options) { this.name = name; - this.locationId = location; + this.locationId = locationId; // use name in static storage of terminals WTerminal.terminals[name] = this; // Todo: use options variable ... @@ -276,7 +276,7 @@ class WTerminal { controls.appendChild(btnScrollBottom); container.appendChild(output); container.appendChild(inputForm); - if (locationId === null) { // use location to insert terminal in a div(string id) or dropdown (null) + if (locationId === null || typeof locationId === 'undefined') { // use location to insert terminal in a div(string id) or dropdown (null) const background = WTerminal.createElement('div', { class: WTerminal.BACKGROUND_CLASS, title: "Close terminal" }); this.backgroundEl = background; @@ -1297,7 +1297,7 @@ class WTerminal { if (document.body) { new WTerminal('dropdown', null, null); } else { - window.addEventListener("load", () => new WTerminal('dropdown', null, null)); + window.addEventListener("load", () => new WTerminal('dropdown')); } }