mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-05 13:19:03 +00:00
force resource path to use /
This commit is contained in:
parent
6cedb7790a
commit
8dfb764199
@ -13,7 +13,7 @@ from shutil import copyfile, rmtree
|
||||
from time import sleep
|
||||
|
||||
# to smooth the update process
|
||||
enhancer_version = '0.6.1~beta1'
|
||||
enhancer_version = '0.6.1~beta2'
|
||||
|
||||
# for toggling notion visibility
|
||||
hotkey = 'CmdOrCtrl+Shift+A'
|
||||
@ -37,7 +37,7 @@ try:
|
||||
.rstrip().decode('utf-8')[3:].replace('\\', '/') + '/Programs/Notion/resources'
|
||||
drive = enhancer_folder[5].capitalize() if enhancer_folder.startswith(
|
||||
'/mnt/') else 'C'
|
||||
enhancer_folder = drive + ':/' + enhancer_folder[6:]
|
||||
enhancer_folder = drive + ':\\' + enhancer_folder[6:]
|
||||
elif sys.platform == 'win32':
|
||||
filepath = subprocess.run(['echo', '%localappdata%'], shell=True, capture_output=True).stdout \
|
||||
.rstrip().decode('utf-8') + '\\Programs\\Notion\\resources'
|
||||
@ -118,7 +118,7 @@ try:
|
||||
f' ...linking to {os.path.join(".", "resources", "user.css")}')
|
||||
with open(os.path.join(__dirname__, 'resources', 'preload.js'), 'r', encoding='UTF-8') as insert:
|
||||
append.write(insert.read().replace(
|
||||
'☃☃☃assets☃☃☃', enhancer_folder + '/resources'))
|
||||
'☃☃☃assets☃☃☃', os.path.join(enhancer_folder, 'resources').replace('\\', '/'))
|
||||
else:
|
||||
print(
|
||||
f' * {os.path.join(filepath, "app","renderer","preload.js")} was not found: step skipped.')
|
||||
@ -160,8 +160,8 @@ try:
|
||||
f' ...adjusting drag area for frameless window in {os.path.join(filepath, "app", "renderer", "index.js")}')
|
||||
content=content.read()
|
||||
loc=content.rfind('dragRegionStyle')
|
||||
content = content[:loc] + content[loc:] \
|
||||
.replace('top: 0', 'top: 1', 1) \
|
||||
content=content[:loc] + content[loc:]
|
||||
.replace('top: 0', 'top: 1', 1)
|
||||
.replace('height: 34', 'height: 10', 1)
|
||||
with open(os.path.join(filepath, "app", "renderer", "index.js"), 'w', encoding='UTF-8') as write:
|
||||
write.write(content)
|
||||
|
Loading…
Reference in New Issue
Block a user