Skip to content

Commit

Permalink
feat: adjust colors
Browse files Browse the repository at this point in the history
  • Loading branch information
test123456789012345 committed May 30, 2020
1 parent b79a161 commit b3f2e2b
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 10 deletions.
Binary file added assets/icon-48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icon-disabled.png
Binary file not shown.
8 changes: 8 additions & 0 deletions assets/icon-disabled.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/icon.png
Binary file not shown.
13 changes: 13 additions & 0 deletions assets/icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 7 additions & 6 deletions assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,7 @@ $background-light: rgba(#000, .07);
}

@include selector('a') {
color: purple !important;
text-decoration: underline !important;
color: saturate(#191FCC, 10%) !important;
}

@include selector('button', 'input[type=submit]') {
Expand Down Expand Up @@ -179,7 +178,9 @@ h4, h5, h6 {
background: $background-light !important;
}

@include selector('[title]') {
// annotations

/*@include selector('[title]') {
position: relative !important;
&:before {
Expand All @@ -189,8 +190,8 @@ h4, h5, h6 {
padding: .25rem .5rem !important;
margin-right: .25rem !important;
}
}
}*/

@include selector('img:not([alt])', 'img[alt]:not([alt=""])') {
/*@include selector('img:not([alt])', 'img[alt]:not([alt=""])') {
border: 4px dashed red !important;
}
}*/
2 changes: 1 addition & 1 deletion background.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { property } from '@dword-design/functions'

const update = enabled =>
browser.browserAction.setIcon({
path: `assets/${enabled ? 'icon.png' : 'icon-disabled.png'}`,
path: `assets/icon${enabled ? '' : '-disabled'}.svg`,
})

browser.storage.onChanged.addListener((changes, area) => {
Expand Down
6 changes: 5 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"name": "Accessible View",
"browser_action": {
"default_icon": "assets/icon.png"
"default_icon": "assets/icon.svg"
},
"default_icon": {
"48": "assets/icon-48.png",
"96": "icon-96.png"
},
"permissions": [
"storage"
Expand Down
5 changes: 3 additions & 2 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import styleCode from './assets/style.scss'

const toggle = enabled => {
let style = document.querySelector('style.accessibility-mode')
if (!enabled && style) {
if (style) {
style.remove()
} else if (enabled && !style) {
}
if (enabled) {
style = document.createElement('style')
style.classList.add('accessibility-mode')
style.type = 'text/css'
Expand Down

0 comments on commit b3f2e2b

Please sign in to comment.