no one's sure what devops really means
This commit is contained in:
parent
5789eb88a2
commit
fbdeb5dc7b
3 changed files with 35 additions and 3 deletions
7
main.js
7
main.js
|
@ -3,10 +3,9 @@ const {app, BrowserWindow, session, ipcMain} = require('electron')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const fetch = require("cross-fetch")
|
const fetch = require("cross-fetch")
|
||||||
const { ElectronChromeExtensions } = require('electron-chrome-extensions')
|
const { ElectronChromeExtensions } = require('electron-chrome-extensions')
|
||||||
const { ElectronBlocker } = require('@cliqz/adblocker-electron');
|
const { ElectronBlocker } = require('@ghostery/adblocker-electron');
|
||||||
const http = require('http');
|
const http = require('http');
|
||||||
const { createProxy } = require('proxy');
|
const { createProxy } = require('proxy');
|
||||||
const extensions = new ElectronChromeExtensions()
|
|
||||||
|
|
||||||
ipcMain.on('windowmaker', (event, arg) => {
|
ipcMain.on('windowmaker', (event, arg) => {
|
||||||
createWindow();
|
createWindow();
|
||||||
|
@ -16,6 +15,7 @@ const proxy = createProxy(http.createServer());
|
||||||
proxy.listen(3129)
|
proxy.listen(3129)
|
||||||
//Function to enable AD Blocking...
|
//Function to enable AD Blocking...
|
||||||
let blocker = undefined
|
let blocker = undefined
|
||||||
|
let extensions = undefined
|
||||||
async function enableGoodies(s) {
|
async function enableGoodies(s) {
|
||||||
blocker = await ElectronBlocker.fromLists(fetch, [
|
blocker = await ElectronBlocker.fromLists(fetch, [
|
||||||
'https://easylist.to/easylist/easylist.txt',
|
'https://easylist.to/easylist/easylist.txt',
|
||||||
|
@ -178,7 +178,7 @@ app.whenReady().then(() => {
|
||||||
// for applications and their menu bar to stay active until the user quits
|
// for applications and their menu bar to stay active until the user quits
|
||||||
// explicitly with Cmd + Q.
|
// explicitly with Cmd + Q.
|
||||||
app.on('window-all-closed', function () {
|
app.on('window-all-closed', function () {
|
||||||
if (process.platform !== 'darwin') app.quit()
|
if (process.platform !== 'darwin') { app.quit() }
|
||||||
})
|
})
|
||||||
|
|
||||||
// In this file you can include the rest of your app's specific main process
|
// In this file you can include the rest of your app's specific main process
|
||||||
|
@ -186,6 +186,7 @@ app.on('window-all-closed', function () {
|
||||||
|
|
||||||
// Set DNS
|
// Set DNS
|
||||||
app.on('ready', () => {
|
app.on('ready', () => {
|
||||||
|
extensions = new ElectronChromeExtensions()
|
||||||
app.configureHostResolver({
|
app.configureHostResolver({
|
||||||
mode: 'secure',
|
mode: 'secure',
|
||||||
dohServers: [
|
dohServers: [
|
||||||
|
|
30
package-lock.json
generated
30
package-lock.json
generated
|
@ -10,6 +10,7 @@
|
||||||
"license": "SPL-R5",
|
"license": "SPL-R5",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cliqz/adblocker-electron": "^1.31.3",
|
"@cliqz/adblocker-electron": "^1.31.3",
|
||||||
|
"@ghostery/adblocker": "^2.1.1",
|
||||||
"cross-fetch": "^3.1.5",
|
"cross-fetch": "^3.1.5",
|
||||||
"electron-chrome-extensions": "^3.10.0",
|
"electron-chrome-extensions": "^3.10.0",
|
||||||
"electron-squirrel-startup": "^1.0.1",
|
"electron-squirrel-startup": "^1.0.1",
|
||||||
|
@ -824,6 +825,35 @@
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@ghostery/adblocker": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ghostery/adblocker/-/adblocker-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-FL4yWrpNTCmtbAfeLotUoo94ZyNqHdZpZRo4Qlk0guPzDGcOtW4/c84UzS9D/Z9Z4H3nWSCrW0q38pjwAbDykA==",
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@ghostery/adblocker-content": "^2.1.1",
|
||||||
|
"@ghostery/adblocker-extended-selectors": "^2.1.1",
|
||||||
|
"@remusao/guess-url-type": "^1.3.0",
|
||||||
|
"@remusao/small": "^1.2.1",
|
||||||
|
"@remusao/smaz": "^1.9.1",
|
||||||
|
"tldts-experimental": "^6.0.14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@ghostery/adblocker-content": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ghostery/adblocker-content/-/adblocker-content-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-1DKHmPnlQleXapaL36xZOwwZmpdbjMP/IcWdTTzyriyCDIFlSwBDT1DJ3xg0TK61ahZMEwz1MnTGM6X99z/5rQ==",
|
||||||
|
"license": "MPL-2.0",
|
||||||
|
"dependencies": {
|
||||||
|
"@ghostery/adblocker-extended-selectors": "^2.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@ghostery/adblocker-extended-selectors": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@ghostery/adblocker-extended-selectors/-/adblocker-extended-selectors-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-jEHjU2CarS2MtRYfm/6iTKMS1DVzepuwXSMKg1zTyHl+u4ZKvKNYFK7plD0nUlL5a8akyRkYwLheXnKsW3nChQ==",
|
||||||
|
"license": "MPL-2.0"
|
||||||
|
},
|
||||||
"node_modules/@isaacs/cliui": {
|
"node_modules/@isaacs/cliui": {
|
||||||
"version": "8.0.2",
|
"version": "8.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cliqz/adblocker-electron": "^1.31.3",
|
"@cliqz/adblocker-electron": "^1.31.3",
|
||||||
|
"@ghostery/adblocker": "^2.1.1",
|
||||||
"cross-fetch": "^3.1.5",
|
"cross-fetch": "^3.1.5",
|
||||||
"electron-chrome-extensions": "^3.10.0",
|
"electron-chrome-extensions": "^3.10.0",
|
||||||
"electron-squirrel-startup": "^1.0.1",
|
"electron-squirrel-startup": "^1.0.1",
|
||||||
|
|
Loading…
Reference in a new issue