mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-12 08:17:34 +01:00
Moved window.print redefining at top level to prevent naming collision
This commit is contained in:
parent
2be1d5ff15
commit
75de6c665d
@ -4,6 +4,7 @@ import ReactDOM from "react-dom";
|
|||||||
import { TTheme as Theme, ThemeEvents, refreshTheme } from "./Themes/ui/Theme";
|
import { TTheme as Theme, ThemeEvents, refreshTheme } from "./Themes/ui/Theme";
|
||||||
import { LoadingScreen } from "./ui/LoadingScreen";
|
import { LoadingScreen } from "./ui/LoadingScreen";
|
||||||
import { initElectron } from "./Electron";
|
import { initElectron } from "./Electron";
|
||||||
|
import { AlertEvents } from "./ui/React/AlertManager";
|
||||||
initElectron();
|
initElectron();
|
||||||
globalThis["React"] = React;
|
globalThis["React"] = React;
|
||||||
globalThis["ReactDOM"] = ReactDOM;
|
globalThis["ReactDOM"] = ReactDOM;
|
||||||
@ -34,3 +35,9 @@ function rerender(): void {
|
|||||||
return "Your work will be lost.";
|
return "Your work will be lost.";
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
window.print = () => {
|
||||||
|
throw new Error("You accidentally called window.print instead of ns.print");
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user