Skip to content

Commit 0552f76

Browse files
committed
feat: Update description. Open options page when click icon
1 parent 063cf08 commit 0552f76

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

src/js/background.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
chrome.action.onClicked.addListener(() => {
2+
chrome.runtime.openOptionsPage();
3+
});

src/manifest.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "Notion x Excalidraw Helper",
3-
"browser_action": {
4-
"default_icon": "icon.png"
3+
"action": {
4+
"default_icon": "icon.png",
5+
"default_popup": ""
56
},
67
"icons": {
78
"128": "icon.png"
@@ -33,5 +34,8 @@
3334
]
3435
}
3536
],
36-
"options_page": "options.html"
37+
"options_page": "options.html",
38+
"background": {
39+
"service_worker": "background.bundle.js"
40+
}
3741
}

src/options.html

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
display: block;
1919
margin-bottom: 8px;
2020
font-weight: 500;
21+
font-size: 13px;
2122
}
2223
select {
2324
width: 100%;
@@ -47,12 +48,23 @@
4748
.status.show {
4849
opacity: 1;
4950
}
51+
.description {
52+
color: #666;
53+
font-size: 13px;
54+
line-height: 1.4;
55+
margin-top: 4px;
56+
margin-bottom: 8px;
57+
}
5058
</style>
5159
</head>
5260
<body>
5361
<h1>Options</h1>
5462
<div class="option-group">
55-
<label for="scale">Scale</label>
63+
<label for="scale">Scale ratio</label>
64+
<div class="description">
65+
Scale ratio determines the resolution of the embedded PNG, with 1x for standard screens, 2x for high-resolution displays, and 3x for ultra-high-resolution screens.
66+
If you need faster document loading or the image exceeds Notion's limits, you can choose 1x.
67+
</div>
5668
<select id="scale">
5769
<option value="1">1x</option>
5870
<option value="2">2x</option>

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var options = {
1414
entry: {
1515
main: path.join(__dirname, "src", "js", "main.js"),
1616
options: path.join(__dirname, "src", "js", "options.js"),
17+
background: path.join(__dirname, "src", "js", "background.js"),
1718
},
1819
output: {
1920
path: path.join(__dirname, "build"),

0 commit comments

Comments
 (0)