Skip to content

Commit b822e5b

Browse files
committed
fix: improve menu injection
closes #24
1 parent c3b7114 commit b822e5b

File tree

5 files changed

+43
-4
lines changed

5 files changed

+43
-4
lines changed

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"node": ">=16.0.0"
1111
},
1212
"commitlint": {
13-
"extends": ["@commitlint/config-conventional"]
13+
"extends": [
14+
"@commitlint/config-conventional"
15+
]
1416
},
1517
"scripts": {
1618
"build": "turbo run build",
@@ -36,6 +38,11 @@
3638
"turbo": "^1.6.3",
3739
"typescript": "^4.9.4"
3840
},
41+
"pnpm": {
42+
"patchedDependencies": {
43+
44+
}
45+
},
3946
"lint-staged": {
4047
"*.{js,jsx,ts,tsx}": "pnpm exec eslint"
4148
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dist/sentinel.umd.js b/dist/sentinel.umd.js
2+
index 08dcbff40b764a4eabf7990e751c364c4724c885..d5ce9732e2726d9497dc14bcbbcdd155247c3b52 100644
3+
--- a/dist/sentinel.umd.js
4+
+++ b/dist/sentinel.umd.js
5+
@@ -46,7 +46,7 @@ return {
6+
7+
// add stylesheet to document
8+
styleEl = doc.createElement('style');
9+
- head.insertBefore(styleEl, head.firstChild);
10+
+ head.append(styleEl);
11+
styleSheet = styleEl.sheet;
12+
cssRules = styleSheet.cssRules;
13+
}

packages/userscript/src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ function createMenuContainer() {
6262
container.id = 'exporter-menu'
6363
container.className = 'pt-1'
6464

65-
const chatList = document.querySelector('nav > div')
65+
const chatList = document.querySelector('nav > div.overflow-y-auto')
6666
if (chatList) {
6767
chatList.after(container)
6868
sentinel.on('nav > div.overflow-y-auto', (el) => {

patches/[email protected]

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/dist/sentinel.umd.js b/dist/sentinel.umd.js
2+
index 08dcbff40b764a4eabf7990e751c364c4724c885..d5ce9732e2726d9497dc14bcbbcdd155247c3b52 100644
3+
--- a/dist/sentinel.umd.js
4+
+++ b/dist/sentinel.umd.js
5+
@@ -46,7 +46,7 @@ return {
6+
7+
// add stylesheet to document
8+
styleEl = doc.createElement('style');
9+
- head.insertBefore(styleEl, head.firstChild);
10+
+ head.append(styleEl);
11+
styleSheet = styleEl.sheet;
12+
cssRules = styleSheet.cssRules;
13+
}

pnpm-lock.yaml

Lines changed: 8 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)