Skip to content

Commit d767ec1

Browse files
committed
resolved issues when testing extension on Chrome Version 133.0.6943.143 (Official Build) (x86_64) running on MacOS 15.3.1 (24D70)
modified: welcome.js modified: manifest.json
1 parent 1cb9c58 commit d767ec1

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,11 @@ xcode/MarkDownload - Markdown Web Clipper/MarkDownload - Markdown Web Clipper.xc
33
xcode/MarkDownload - Markdown Web Clipper/MarkDownload - Markdown Web Clipper.xcodeproj/xcuserdata
44
.DS_Store
55
node_modules
6+
7+
## IDEs are developer-specific
8+
.vscode/
9+
.idea/
10+
.DS_Store
11+
12+
## information stored locally - saved snapshots/etc
13+
save/

src/manifest.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"128": "icons/appicon-128x128.png"
3939
}
4040
},
41-
"sidebar_action": {
41+
"action": {
4242
"default_title" : "Markdownload",
4343
"default_panel": "sidepanel/welcome.html",
4444
"default_icon": {
@@ -49,7 +49,6 @@
4949
}
5050
},
5151
"background": {
52-
"scripts": ["background/background.js"],
5352
"service_worker": "background/background.js"
5453
},
5554
"browser_specific_settings": {

src/sidepanel/welcome.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ document.getElementById('premissions').addEventListener('click', async() => {
44
location.reload()
55
})
66

7+
// ref: https://stackoverflow.com/questions/64330672/referenceerror-browser-is-not-defined
8+
if (typeof browser === "undefined") {
9+
var browser = chrome;
10+
}
11+
712
browser.permissions.contains(permissions).then((hasPermission) => {
813
if(hasPermission) location.replace(browser.runtime.getURL('/sidepanel/sidepanel.html'))
914
})

0 commit comments

Comments
 (0)