Skip to content

Commit 3801ba5

Browse files
committed
extensions v2: now an extension is a (main, preload) pair in a dedicated folder, which can contain any useful file
1 parent 87a8393 commit 3801ba5

File tree

24 files changed

+516
-68
lines changed

24 files changed

+516
-68
lines changed

extensions_main/autostart.js renamed to .extensions_main/autostart.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
const fs = require('fs');
2-
const path = require('../lib/path2');
2+
const path = require('../../lib/path2');
33
const { notStrictEqual } = require('assert');
44
const { LINUX_AUTOSTART_DIR } = require('../lib/Constants')
55

66
// WARNING: THIS SCRIPT WILL CHANGE THE MACHINE'S STARTUP BEHAVIOUR.
77
// TO DISABLE REMOVE .desktop FILE
88
// WILL TAKE EFFECT ONLY ON BUILD MODE, NOT ON DEV MODE
9-
class Autostarter extends require('../lib/BaseModule')
9+
class Autostarter extends require('../../lib/BaseModule')
1010
{
1111
MODULE_NAME = "autostart";
1212

File renamed without changes.

extensions_main/keys-checker.js renamed to .extensions_main/keys-checker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class LocalKeysCheck extends require('../lib/BaseModule')
2525
async getLocalKey()
2626
{
2727
this.log(this.tab.webContents.getURL(), 'is trying to access local keys info');
28-
return {machine_id: this.machine_id};
28+
return {machine_id: this.machine_id, structure_id: [4,5,6,7]};
2929
}
3030
}
3131

.extensions_main/splash-screen.js

Whitespace-only changes.
File renamed without changes.

extensions_main/window-events.js renamed to .extensions_main/window-events.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const { app, globalShortcut } = require('electron');
22
const {checkActiveModules} = require('../main')
33

44
// Sample Module. Plase copy-paste this file into new module's main folder
5-
class WindowSetup extends require('../lib/BaseModule')
5+
class WindowSetup extends require('../../lib/BaseModule')
66
{
77
MODULE_NAME = "window-events"; // MUST be the same as file name (required to access conf file)
88

File renamed without changes.

extensions_preload/electronAPI.js renamed to .extensions_preload/electronAPI.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
const { contextBridge, ipcRenderer } = require('electron');
22

3+
getKeyPlease()
4+
{
5+
ipcRenderer.invoke('get-key').then(keys => {return keys.machine_id});
6+
}
7+
38
contextBridge.exposeInMainWorld('electronAPI', {
49
readFile: (filePath) => ipcRenderer.invoke('read-file', filePath),
510
getLocalKey: () => ipcRenderer.invoke('get-key'),
File renamed without changes.

config.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,6 @@
5454
"lel": {"enabled": true, "extension": "touch-utils"}
5555
},
5656
"APIevents": {"dblclick": {}}
57-
},
58-
"long_press":
59-
{
60-
"enabled": true,
61-
"time_delay": 500,
62-
"extension": "long-press",
63-
"APIevents": {"pointerdown": {}, "contextmenu": {}}
6457
}
6558
}
6659
},
@@ -96,6 +89,11 @@
9689
{
9790
"desktop_filename": "webpage-accessor.desktop",
9891
"extension": "autostart"
92+
},
93+
"splashscreen":
94+
{
95+
"enabled": true,
96+
"extension": "splashscreen"
9997
}
10098
}
10199
}

0 commit comments

Comments
 (0)