more .js wrongly removed

This commit is contained in:
Olivier Gagnon 2018-06-26 13:38:55 -04:00
parent 40b29ea3c0
commit 50a1e83b55
3 changed files with 4 additions and 4 deletions

@ -71,7 +71,7 @@ function _getScriptUrls(script, scripts, seen) {
// Replace every import statement with an import to a blob url containing
// the corresponding script. E.g.
//
// import {foo} from "bar";
// import {foo} from "bar.js";
//
// becomes
//

@ -189,7 +189,7 @@ function runScriptsLoop() {
//If it isn't running, start the script
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == false) {
let p = null; // p is the script's result promise.
if (workerScripts[i].name.endsWith("") || workerScripts[i].name.endsWith(".ns")) {
if (workerScripts[i].name.endsWith(".js") || workerScripts[i].name.endsWith(".ns")) {
p = startJsScript(workerScripts[i]);
} else {
try {

@ -47,7 +47,7 @@ var keybindings = {
};
function isScriptFilename(f) {
return f.endsWith("") || f.endsWith(".script") || f.endsWith(".ns");
return f.endsWith(".js") || f.endsWith(".script") || f.endsWith(".ns");
}
var scriptEditorRamCheck = null, scriptEditorRamText = null;
@ -714,7 +714,7 @@ function calculateRamUsage(codeCopy) {
}
Script.prototype.download = function() {
var filename = this.filename + "";
var filename = this.filename + ".js";
var file = new Blob([this.code], {type: 'text/plain'});
if (window.navigator.msSaveOrOpenBlob) {// IE10+
window.navigator.msSaveOrOpenBlob(file, filename);