Skip to content

Commit 64c02ab

Browse files
committed
Add patches for csp bypass and titlebar icon fix
1 parent 330f164 commit 64c02ab

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

patches/enhancer-csp-bypass.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- pkg/loader.js 2021-08-15 22:42:27.706648462 +0200
2+
+++ pkg/loader.new.js 2021-08-15 22:42:44.389331997 +0200
3+
@@ -42,6 +42,7 @@
4+
allowServiceWorkers: true,
5+
supportFetchAPI: true,
6+
corsEnabled: true,
7+
+ bypassCSP: true,
8+
},
9+
},
10+
{
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
--- mods/core/render.js 2021-08-15 22:49:21.087926244 +0200
2+
+++ mods/core/render.new.js 2021-08-15 22:49:54.986617806 +0200
3+
@@ -708,7 +708,7 @@
4+
},
5+
React.createElement('span', {
6+
dangerouslySetInnerHTML: {
7+
- __html: (title.img || '') + (title.text || 'notion.so'),
8+
+ __html: (title.img || '').replace('notion://', 'https://') + (title.text || 'notion.so'),
9+
},
10+
}),
11+
React.createElement(

scripts/enhance-src.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ log "Applying enhancer patches..."
4040
patch -p0 --binary < "${WORKSPACE_DIR}/patches/enhancer-query-selector-fix.patch"
4141
patch -p0 --binary < "${WORKSPACE_DIR}/patches/enhancer-urlhelper-fix.patch"
4242
patch -p0 --binary < "${WORKSPACE_DIR}/patches/enhancer-paths.patch"
43+
patch -p0 --binary < "${WORKSPACE_DIR}/patches/enhancer-titlebar-icons-fix.patch"
44+
patch -p0 --binary < "${WORKSPACE_DIR}/patches/enhancer-csp-bypass.patch"
4345
popd > /dev/null
4446

4547
log "Injecting enhancer loader..."

0 commit comments

Comments
 (0)