mirror of
https://github.com/danbulant/console-hub
synced 2026-06-16 04:51:12 +00:00
Remove unnecesary check
This commit is contained in:
parent
e39b65860d
commit
e7e4fc4340
1 changed files with 28 additions and 43 deletions
71
html/node.js
71
html/node.js
|
|
@ -1,45 +1,30 @@
|
|||
if(typeof require !== typeof undefined){
|
||||
var wifi, wifiQuality;
|
||||
// In renderer process (web page).
|
||||
const { ipcRenderer } = require('electron')
|
||||
// In renderer process (web page).
|
||||
const { ipcRenderer } = require('electron')
|
||||
|
||||
ipcRenderer.on('wifi', (event, arg) => {
|
||||
wifi = arg;
|
||||
wifi = wifi;
|
||||
})
|
||||
ipcRenderer.on('wifiQuality', (event, arg) => {
|
||||
wifiQuality = arg;
|
||||
wifiQuality = wifiQuality;
|
||||
})
|
||||
ipcRenderer.on('fullscreen', (event, arg) => {
|
||||
console.log("Fullscreen now " + arg);
|
||||
settingMenuItemValues[0] = arg;
|
||||
})
|
||||
function sendFullscreen(bool){
|
||||
console.log("Sending fullscreen " + bool);
|
||||
ipcRenderer.send('fullscreen', bool);
|
||||
}
|
||||
ipcRenderer.send('get-data', 'wifi');
|
||||
ipcRenderer.send('get-data', 'wifiQuality');
|
||||
var files = null;
|
||||
ipcRenderer.on('listFiles', (event, arg) => {
|
||||
console.log(arg);
|
||||
files = arg;
|
||||
refreshFiles();
|
||||
})
|
||||
function sendKeys(arg, arg2){
|
||||
ipcRenderer.send('sendKeys', arg, arg2);
|
||||
return true;
|
||||
}
|
||||
var loc = window.location.pathname;
|
||||
var dir = loc.substring(1, loc.lastIndexOf('/'));//fix file:///, only on node
|
||||
ipcRenderer.send('listFiles', dir);
|
||||
} else {
|
||||
//no NODE integration, propably browser access
|
||||
function sendKeys(arg){
|
||||
return false;
|
||||
}
|
||||
toast('Missing node - features may not be available');
|
||||
$("div:has(#files)").hide();//Disable file system preview
|
||||
mainMenuItems.slice("files");
|
||||
var wifi, wifiQuality;
|
||||
|
||||
ipcRenderer.on('wifi', (event, arg) => {
|
||||
wifi = arg;
|
||||
wifi = wifi;
|
||||
});
|
||||
|
||||
ipcRenderer.on('wifiQuality', (event, arg) => {
|
||||
wifiQuality = arg;
|
||||
wifiQuality = wifiQuality;
|
||||
});
|
||||
|
||||
ipcRenderer.on('fullscreen', (event, arg) => {
|
||||
console.log("Fullscreen now " + arg);
|
||||
settingMenuItemValues[0] = arg;
|
||||
});
|
||||
|
||||
ipcRenderer.send('get-data', 'wifi');
|
||||
ipcRenderer.send('get-data', 'wifiQuality');
|
||||
|
||||
function sendKeys(arg, arg2){
|
||||
ipcRenderer.send('sendKeys', arg, arg2);
|
||||
return true;
|
||||
}
|
||||
var loc = window.location.pathname;
|
||||
var dir = loc.substring(1, loc.lastIndexOf('/'));
|
||||
ipcRenderer.send('listFiles', dir);
|
||||
Loading…
Reference in a new issue