From 7b3f67073b351acf9366268af2a1e7f4a11d5099 Mon Sep 17 00:00:00 2001 From: Preston Date: Wed, 7 Apr 2021 16:39:14 -0400 Subject: [PATCH] Add consent cookie to fix comments and various problems --- src/main/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/index.js b/src/main/index.js index 1ff88842..093e9923 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -1,4 +1,4 @@ -import { app, BrowserWindow, Menu, ipcMain, screen } from 'electron' +import { app, BrowserWindow, Menu, ipcMain, session, screen } from 'electron' import { productName } from '../../package.json' import Datastore from 'nedb' @@ -248,6 +248,12 @@ function createWindow (useProxy = false, proxyUrl = '') { }) } + mainWindow.webContents.session.cookies.set({ + url: 'https://www.youtube.com', + name: 'CONSENT', + value: 'YES+' + }) + settingsDb.findOne({ _id: 'bounds' }, function (err, doc) {