blob: ac618ae03bf1c9acdc4186ab7ff800b77df3c241 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
function instrumenEnvironment(webview) {
webview.executeJavaScript(`
(function() {
if(window.electron) {
return;
}
window.electron = { };
})();
`);
}
module.exports = Ferdium =>
class Telegram extends Ferdium {
// https://www.electronjs.org/docs/latest/api/webview-tag/#dom-events
get events() {
return {
'load-commit': 'loadCommit',
};
}
loadCommit(event) {
instrumenEnvironment(event.target);
}
};
|