mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-10 15:39:01 +00:00
improve titlebar selectors + syntax errors
This commit is contained in:
parent
8dfb764199
commit
ded4323544
@ -118,7 +118,7 @@ try:
|
|||||||
f' ...linking to {os.path.join(".", "resources", "user.css")}')
|
f' ...linking to {os.path.join(".", "resources", "user.css")}')
|
||||||
with open(os.path.join(__dirname__, 'resources', 'preload.js'), 'r', encoding='UTF-8') as insert:
|
with open(os.path.join(__dirname__, 'resources', 'preload.js'), 'r', encoding='UTF-8') as insert:
|
||||||
append.write(insert.read().replace(
|
append.write(insert.read().replace(
|
||||||
'☃☃☃assets☃☃☃', os.path.join(enhancer_folder, 'resources').replace('\\', '/'))
|
'☃☃☃assets☃☃☃', os.path.join(enhancer_folder, 'resources').replace('\\', '/')))
|
||||||
else:
|
else:
|
||||||
print(
|
print(
|
||||||
f' * {os.path.join(filepath, "app","renderer","preload.js")} was not found: step skipped.')
|
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")}')
|
f' ...adjusting drag area for frameless window in {os.path.join(filepath, "app", "renderer", "index.js")}')
|
||||||
content = content.read()
|
content = content.read()
|
||||||
loc = content.rfind('dragRegionStyle')
|
loc = content.rfind('dragRegionStyle')
|
||||||
content=content[:loc] + content[loc:]
|
content = content[:loc] + content[loc:] \
|
||||||
.replace('top: 0', 'top: 1', 1)
|
.replace('top: 0', 'top: 1', 1) \
|
||||||
.replace('height: 34', 'height: 10', 1)
|
.replace('height: 34', 'height: 10', 1)
|
||||||
with open(os.path.join(filepath, "app", "renderer", "index.js"), 'w', encoding='UTF-8') as write:
|
with open(os.path.join(filepath, "app", "renderer", "index.js"), 'w', encoding='UTF-8') as write:
|
||||||
write.write(content)
|
write.write(content)
|
||||||
|
@ -61,7 +61,9 @@ require('electron').remote.getGlobal('setTimeout')(() => {
|
|||||||
.appendChild(buttons);
|
.appendChild(buttons);
|
||||||
document
|
document
|
||||||
.querySelector('.notion-history-back-button')
|
.querySelector('.notion-history-back-button')
|
||||||
.parentElement.nextSibling.classList.add('notion-topbar-breadcrumb');
|
.parentElement.nextElementSibling.classList.add(
|
||||||
|
'notion-topbar-breadcrumb'
|
||||||
|
);
|
||||||
document
|
document
|
||||||
.querySelector('.notion-topbar-share-menu')
|
.querySelector('.notion-topbar-share-menu')
|
||||||
.parentElement.classList.add('notion-topbar-actions');
|
.parentElement.classList.add('notion-topbar-actions');
|
||||||
|
Loading…
Reference in New Issue
Block a user