bugfix: 修复windows下读取插件preload.js位置问题;

ref:搜索插件不区分大消息
This commit is contained in:
muwoo
2021-09-22 15:38:52 +08:00
parent e9fa7b2276
commit 1c893542b9
4 changed files with 5 additions and 5 deletions

View File

@@ -22,7 +22,7 @@ function getQueryVariable(variable) {
if (location.href.indexOf('targetFile') > -1) {
filePath = decodeURIComponent(getQueryVariable('targetFile'));
} else {
filePath = process.platform === 'win32' ? location.pathname.split(':')[1] : location.pathname.replace('file://', '');
filePath = process.platform === 'win32' ? location.pathname.replace('/', '') : location.pathname.replace('file://', '');
}
const {ipcRenderer, nativeImage, clipboard, remote, shell} = require('electron');