Skip to content

Commit

Permalink
Fixed issue with electron and child windows open using window.open an…
Browse files Browse the repository at this point in the history
…d invalid module paths again
  • Loading branch information
icewolfz committed Nov 24, 2021
1 parent 40ee6f9 commit a971b5c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 28 deletions.
11 changes: 2 additions & 9 deletions build/characters.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,8 @@
<script type="text/javascript">
if (window.module) module = window.module;
//spell-checker:ignore yazl askonload keypress rgbcolor cmdfont selectpicker commandon prepend tablist tabpanel hellip emoteto ABCDEFGHIJKLMNOPQRSTUVWXYZ
let Settings, library = './js/library';
try {
Settings = require('./js/settings').Settings;
}
catch {
library = './build/js/library';
Settings = require('./build/js/settings').Settings;
}
const { parseTemplate, templatePath, isFileSync, isDirSync, decrypt, encrypt, clone, walkSync } = require(library);
const { parseTemplate, templatePath, isFileSync, isDirSync, decrypt, encrypt, clone, walkSync } = require('./js/library');
const Settings = require('./js/settings').Settings;
const { shell, ipcRenderer } = require('electron');
const path = require('path');
const fs = require('fs');
Expand Down
14 changes: 4 additions & 10 deletions build/code.editor.prefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,10 @@
<script src="../lib/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="../lib/ace/ext-themelist.js" type="text/javascript"></script>
<script type="text/javascript">
//spell-checker:ignore rgbcolor cmdfont selectpicker commandon prepend tablist tabpanel hellip emoteto ABCDEFGHIJKLMNOPQRSTUVWXYZ
let EditorSettings, library = './js/library';
try {
EditorSettings = require('./js/editor/code.editor.settings').EditorSettings;
}
catch {
library = './build/js/library';
EditorSettings = require('./build/js/editor/code.editor.settings').EditorSettings;
}
const { parseTemplate, isDirSync } = require(library);
//spell-checker:ignore rgbcolor cmdfont selectpicker commandon prepend tablist tabpanel hellip emoteto ABCDEFGHIJKLMNOPQRSTUVWXYZ
const { parseTemplate, isDirSync } = require('./js/library.js');
const EditorSettings = require('./js/editor/code.editor.settings').EditorSettings;

const { ipcRenderer, shell } = require('electron');
const path = require('path');
const fs = require('fs-extra');
Expand Down
11 changes: 2 additions & 9 deletions build/immortal.prefs.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,8 @@
<script type="text/javascript">
if (window.module) module = window.module;
//spell-checker:ignore rgbcolor cmdfont selectpicker commandon prepend tablist tabpanel hellip emoteto ABCDEFGHIJKLMNOPQRSTUVWXYZ
let Settings, TempType;
try {
Settings = require('./js/settings').Settings;
TempType = require('./js/types').TempType;
}
catch {
Settings = require('./build/js/settings').Settings;
TempType = require('./build/js/types').TempType;
}
const { TempType } = require('./js/types');
const Settings = require('./js/settings').Settings;

const { ipcRenderer } = require('electron');
const path = require('path');
Expand Down
3 changes: 3 additions & 0 deletions build/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,7 @@ function createWindow() {
loadWindowScripts(w, frameName);
addInputContext(w, set && set.spellchecking);
w.show();
w.reload();
});
w.webContents.on('render-process-gone', (event, details) => {
logError(`${url} render process gone, reason: ${details.reason}, exitCode ${details.exitCode}\n`, true);
Expand Down Expand Up @@ -3888,6 +3889,7 @@ function createNewWindow(name, options) {
if (!options.noInput)
addInputContext(w, global.editorOnly ? (edSet && edSet.spellchecking) : (set && set.spellchecking));
w.show();
w.reload();
});
w.webContents.on('render-process-gone', (event, details) => {
logError(`${url} render process gone, reason: ${details.reason}, exitCode ${details.exitCode}\n`, true);
Expand Down Expand Up @@ -4335,6 +4337,7 @@ function createCodeEditor(show, loading, loaded) {
loadWindowScripts(w, frameName);
addInputContext(w, edSet && edSet.spellchecking);
w.show();
w.reload();
});
w.webContents.on('render-process-gone', (event, details) => {
logError(`${url} render process gone, reason: ${details.reason}, exitCode ${details.exitCode}\n`, true);
Expand Down

0 comments on commit a971b5c

Please sign in to comment.