Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions extension/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
- manifest version: both chrome and firefox store versions are on manifest v3 now

# Icon
Icon is from https://www.freepik.com/icon/unicorn_14284894, scaled a bit up with `convert unicorn.png -resize 110% -gravity center -background none -extent 128x128 unicorn2.png`

# permissions used
See main `README.md`.

Expand Down
6 changes: 0 additions & 6 deletions extension/generate_manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,6 @@ export function generateManifest({
content_scripts.push({"matches": ["<all_urls>"], "js": ["selenium_bridge.js"]})
}

// FIXME ugh...
// this will basically require "Reads data on all sites" permission
// and seems like all other methods for detecting it (e.g. listener on popup page/offscreen page don't work reliably)
// https://stackoverflow.com/a/77806811/706389/
content_scripts.push({"matches": ["<all_urls>"], "js": ["detect_dark_mode.js"]})

const manifest = {
name: pkg.name + (release ? '' : ' [dev]'),
version: pkg.version,
Expand Down
1 change: 0 additions & 1 deletion extension/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,5 @@ export default [
path.join(srcDir, 'background.ts'),
path.join(srcDir, 'options_page.ts'),
path.join(srcDir, 'popup.ts'),
path.join(srcDir, 'detect_dark_mode.ts'),
]),
]
7 changes: 0 additions & 7 deletions extension/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,13 +186,6 @@ browser.runtime.onMessage.addListener((_message: unknown, sender: Runtime.Messag
})
return true // means 'async response'
}
if (message.method == 'DARK_MODE') {
const icon_path = message.hasDarkMode ? 'img/unicorn_dark.png' : 'img/unicorn.png'

// manifest v2 doesn't have browser.action
const action = browser.action ? browser.action : browser.browserAction
action.setIcon({path: icon_path})
}
})


Expand Down
10 changes: 0 additions & 10 deletions extension/src/detect_dark_mode.ts

This file was deleted.

Binary file modified extension/src/img/unicorn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed extension/src/img/unicorn_dark.png
Binary file not shown.