mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-26 16:07:33 +01:00
ext use base64
This commit is contained in:
parent
795f8b4d2b
commit
88151efa61
46
dist/vendor.bundle.js
vendored
46
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -21,6 +21,7 @@ import { SpecialServers } from "./Server/data/SpecialServers";
|
||||
import { Server } from "./Server/Server";
|
||||
import { Router } from "./ui/GameRoot";
|
||||
import { Page } from "./ui/Router";
|
||||
import { removeLeadingSlash } from "./Terminal/DirectoryHelpers";
|
||||
|
||||
interface Achievement {
|
||||
ID: string;
|
||||
@ -420,6 +421,10 @@ export function initElectron(): void {
|
||||
|
||||
function initWebserver(): void {
|
||||
(document as any).saveFile = function (filename: string, code: string): string {
|
||||
filename = removeLeadingSlash(filename);
|
||||
console.log(code);
|
||||
code = Buffer.from(code, "base64").toString();
|
||||
console.log(code);
|
||||
const home = GetServer("home");
|
||||
if (home === null) return "'home' server not found.";
|
||||
if (home === null) return "Server should not be null but it is.";
|
||||
|
Loading…
Reference in New Issue
Block a user