Browse Source

Format dec0929

pull/3163/head
prettifier[bot] 4 years ago committed by GitHub
parent
commit
6985f1b118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      app/view/preferences/Preferences.js
  2. 22
      electron/main.js

17
app/view/preferences/Preferences.js

@ -316,14 +316,15 @@ Ext.define("Rambox.view.preferences.Preferences", {
emptyText: "Leave blank for default user agent",
},
{
xtype: 'textfield'
,fieldLabel: 'List of Chrome extensions paths comma seperated (needs to relaunch)'
,labelAlign: 'top'
,name: 'extension_paths'
,value: config.extension_paths
,width: 360
,emptyText: '/path/to/extension1, /path/to/extension2'
},
xtype: "textfield",
fieldLabel:
"List of Chrome extensions paths comma seperated (needs to relaunch)",
labelAlign: "top",
name: "extension_paths",
value: config.extension_paths,
width: 360,
emptyText: "/path/to/extension1, /path/to/extension2",
},
{
xtype: "fieldset",
title: locale["preferences[24]"],

22
electron/main.js

@ -773,15 +773,19 @@ if (config.get("disable_gpu")) app.disableHardwareAcceleration();
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
app.on('ready', function() {
config.get('master_password') ? createMasterPasswordWindow() : createWindow();
// Load Chrome extensions
const rawExtensionPaths = config.get('extension_paths')
if(rawExtensionPaths) {
const extentionPaths = rawExtensionPaths.split(',').map(path => path.trim())
extentionPaths.forEach(path => console.log('Extension added: ', BrowserWindow.addExtension(path)))
}
app.on("ready", function () {
config.get("master_password") ? createMasterPasswordWindow() : createWindow();
// Load Chrome extensions
const rawExtensionPaths = config.get("extension_paths");
if (rawExtensionPaths) {
const extentionPaths = rawExtensionPaths
.split(",")
.map((path) => path.trim());
extentionPaths.forEach((path) =>
console.log("Extension added: ", BrowserWindow.addExtension(path))
);
}
});
// Quit when all windows are closed.
app.on("window-all-closed", function () {

Loading…
Cancel
Save