aboutsummaryrefslogtreecommitdiff
path: root/index.js
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2025-04-20 01:41:37 -0400
committerAndrew Lee <andrew@alee14.me>2025-04-20 01:41:37 -0400
commit2d0d99fb779969e2772fc710a14a1814489cc316 (patch)
tree6ef6751e31c76e5abb1324e4f8e5e71a34431577 /index.js
downloadalaska-client-2d0d99fb779969e2772fc710a14a1814489cc316.tar.gz
alaska-client-2d0d99fb779969e2772fc710a14a1814489cc316.tar.bz2
alaska-client-2d0d99fb779969e2772fc710a14a1814489cc316.zip
Initial commit
Diffstat (limited to 'index.js')
-rw-r--r--index.js32
1 files changed, 32 insertions, 0 deletions
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..eea3425
--- /dev/null
+++ b/index.js
@@ -0,0 +1,32 @@
+const { app, BrowserWindow } = require('electron')
+const path = require('path')
+
+// Specify flash path, supposing it is placed in the same directory with main.js.
+let pluginName
+switch (process.platform) {
+ case 'win32':
+ pluginName = 'plugin/pepflashplayer.dll'
+ break
+ case 'darwin':
+ pluginName = 'plugin/PepperFlashPlayer.plugin'
+ break
+ case 'linux':
+ pluginName = 'plugin/libpepflashplayer.so'
+ break
+}
+app.commandLine.appendSwitch('ppapi-flash-path', path.join(__dirname, pluginName))
+
+// Optional: Specify flash version, for example, v17.0.0.169
+app.commandLine.appendSwitch('ppapi-flash-version', '17.0.0.169')
+
+app.whenReady().then(() => {
+ const win = new BrowserWindow({
+ width: 800,
+ height: 600,
+ webPreferences: {
+ plugins: true
+ }
+
+ win.loadURL(`https://${__dirname}`)
+ // Something else
+})