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", emptyText: "Leave blank for default user agent",
}, },
{ {
xtype: 'textfield' xtype: "textfield",
,fieldLabel: 'List of Chrome extensions paths comma seperated (needs to relaunch)' fieldLabel:
,labelAlign: 'top' "List of Chrome extensions paths comma seperated (needs to relaunch)",
,name: 'extension_paths' labelAlign: "top",
,value: config.extension_paths name: "extension_paths",
,width: 360 value: config.extension_paths,
,emptyText: '/path/to/extension1, /path/to/extension2' width: 360,
}, emptyText: "/path/to/extension1, /path/to/extension2",
},
{ {
xtype: "fieldset", xtype: "fieldset",
title: locale["preferences[24]"], 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 // This method will be called when Electron has finished
// initialization and is ready to create browser windows. // initialization and is ready to create browser windows.
app.on('ready', function() { app.on("ready", function () {
config.get('master_password') ? createMasterPasswordWindow() : createWindow(); config.get("master_password") ? createMasterPasswordWindow() : createWindow();
// Load Chrome extensions // Load Chrome extensions
const rawExtensionPaths = config.get('extension_paths') const rawExtensionPaths = config.get("extension_paths");
if(rawExtensionPaths) { if (rawExtensionPaths) {
const extentionPaths = rawExtensionPaths.split(',').map(path => path.trim()) const extentionPaths = rawExtensionPaths
extentionPaths.forEach(path => console.log('Extension added: ', BrowserWindow.addExtension(path))) .split(",")
} .map((path) => path.trim());
extentionPaths.forEach((path) =>
console.log("Extension added: ", BrowserWindow.addExtension(path))
);
}
}); });
// Quit when all windows are closed. // Quit when all windows are closed.
app.on("window-all-closed", function () { app.on("window-all-closed", function () {

Loading…
Cancel
Save