mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 17:53:55 +01: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
|
||||
// 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);
|
||||
|
Loading…
Reference in New Issue
Block a user