diff --git a/manifest.json b/manifest.json index d2da82063..3824b4fe2 100644 --- a/manifest.json +++ b/manifest.json @@ -17,13 +17,16 @@ ], "browser_action": { + "browser_style": true, "default_icon": "icons/ipfs-logo-off.svg", "default_title": "IPFS Gateway Redirect", "default_popup": "popup/button-menu.html" }, "web_accessible_resources": [ - "data/linkify-demo.html" + "data/linkify-demo.html", + "icons/ipfs-logo-on.svg", + "icons/ipfs-logo-off.svg" ] } diff --git a/popup/button-menu.css b/popup/button-menu.css new file mode 100644 index 000000000..d9cfb1816 --- /dev/null +++ b/popup/button-menu.css @@ -0,0 +1,55 @@ +p > img { + vertical-align: middle; +} + +ul { + list-style-type: none; + margin: 0; + padding: 0.25rem; +} + +li { + padding: 0.5rem; + cursor: default; + display:block; + max-height:2rem; + text-overflow: ellipsis; + overflow: auto; +} +li.header { + font-weight: bold; +} +li.action { + color: #222; + background: rgba(238, 238, 238, 0.5); + cursor: pointer; +} + +li.action:hover { + background: rgba(133, 222, 222, 0.75); + color: #000; +} + +li.action:active { + background: rgba(74, 158, 161, 0.8); + color: #fff; +} + +#gateway-status { + padding: 0.5rem; + min-height: 3em; +} +#gateway-status > li { + font-variant: small-caps; + padding: 0; +} +#gateway-status > li > span:nth-of-type(2) { + display: inline-block; + float: right; +} + + +#icon { + width: 5rem; + height: 5rem; +} diff --git a/popup/button-menu.html b/popup/button-menu.html index 1b5616ff8..c7013c1b3 100644 --- a/popup/button-menu.html +++ b/popup/button-menu.html @@ -2,98 +2,38 @@ - + - + diff --git a/popup/button-menu.js b/popup/button-menu.js index 62befec29..6b5fdc30f 100644 --- a/popup/button-menu.js +++ b/popup/button-menu.js @@ -15,7 +15,7 @@ function showIf (id, condition) { } function setIconState (enable) { - getById('icon').src = enable ? 'ipfs-logo-on.svg' : 'ipfs-logo-off.svg' + getById('icon').src = '../icons/' + (enable ? 'ipfs-logo-on.svg' : 'ipfs-logo-off.svg') } // incoming