mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-09-20 21:08:34 +02:00
more .js wrongly removed
This commit is contained in:
parent
40b29ea3c0
commit
50a1e83b55
@ -71,7 +71,7 @@ function _getScriptUrls(script, scripts, seen) {
|
|||||||
// Replace every import statement with an import to a blob url containing
|
// Replace every import statement with an import to a blob url containing
|
||||||
// the corresponding script. E.g.
|
// the corresponding script. E.g.
|
||||||
//
|
//
|
||||||
// import {foo} from "bar";
|
// import {foo} from "bar.js";
|
||||||
//
|
//
|
||||||
// becomes
|
// becomes
|
||||||
//
|
//
|
||||||
|
@ -189,7 +189,7 @@ function runScriptsLoop() {
|
|||||||
//If it isn't running, start the script
|
//If it isn't running, start the script
|
||||||
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == false) {
|
if (workerScripts[i].running == false && workerScripts[i].env.stopFlag == false) {
|
||||||
let p = null; // p is the script's result promise.
|
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]);
|
p = startJsScript(workerScripts[i]);
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
|
@ -47,7 +47,7 @@ var keybindings = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function isScriptFilename(f) {
|
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;
|
var scriptEditorRamCheck = null, scriptEditorRamText = null;
|
||||||
@ -714,7 +714,7 @@ function calculateRamUsage(codeCopy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Script.prototype.download = function() {
|
Script.prototype.download = function() {
|
||||||
var filename = this.filename + "";
|
var filename = this.filename + ".js";
|
||||||
var file = new Blob([this.code], {type: 'text/plain'});
|
var file = new Blob([this.code], {type: 'text/plain'});
|
||||||
if (window.navigator.msSaveOrOpenBlob) {// IE10+
|
if (window.navigator.msSaveOrOpenBlob) {// IE10+
|
||||||
window.navigator.msSaveOrOpenBlob(file, filename);
|
window.navigator.msSaveOrOpenBlob(file, filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user