
Loading…
Legacy (non Australis) toolbar button #1321
+324
−65
Collaborator
AlexVallat
commented
AlexVallat
added
some commits
1 check passed
Details
continuous-integration/travis-ci/pr
The Travis CI build passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This page is out of date. Refresh to see the latest.
Showing
with
324 additions
and 65 deletions.
42
platform/firefox/css/legacy-toolbar-button.css
| @@ -0,0 +1,42 @@ | ||
| +#uBlock-legacy-button { | ||
| + list-style-image: url('../img/browsericons/icon-large.svg'); | ||
| +} | ||
| +#uBlock-legacy-button.off { | ||
| + list-style-image: url('../img/browsericons/icon-large-off.svg'); | ||
| +} | ||
| + | ||
| +toolbar[iconsize="small"] #uBlock-legacy-button { | ||
| + list-style-image: url('../img/browsericons/icon16.svg'); | ||
| +} | ||
| +toolbar[iconsize="small"] #uBlock-legacy-button.off { | ||
| + list-style-image: url('../img/browsericons/icon16-off.svg'); | ||
| +} | ||
| +#uBlock-legacy-button[badge]::before { | ||
| + position: fixed; | ||
| + margin-top: -2px; | ||
| + padding: 1px 2px; | ||
| + font-size: 9px; | ||
| + font-weight: bold; | ||
| + color: #fff; | ||
| + background: #666; | ||
| + content: attr(badge); | ||
| +} | ||
| +/* This hack required because if the before content changes it de-pops the popup (without firing any events). So just hide it instead. Note, can't actually *hide* it, or the same thing happens. '*/ | ||
| +#uBlock-legacy-button[badge=""]::before { | ||
| + padding: 0; | ||
| +} | ||
| + | ||
| +/* Override off state when in palette */ | ||
| +toolbarpaletteitem #uBlock-legacy-button.off { | ||
| + list-style-image: url('../img/browsericons/icon-large.svg'); | ||
| +} | ||
| + | ||
| +/* Override badge when in palette */ | ||
| +toolbarpaletteitem #uBlock-legacy-button[badge]::before { | ||
| + content: none; | ||
| +} | ||
| + | ||
| +/* Prevent pale moon from showing the arrow underneath the button */ | ||
| +#uBlock-legacy-button .toolbarbutton-menu-dropmarker { | ||
| + -moz-box-orient: horizontal; | ||
| +} |
16
platform/firefox/frameModule.js
12
platform/firefox/img/browsericons/icon-large-off.svg
| @@ -0,0 +1,12 @@ | ||
| +<?xml version="1.0" encoding="utf-8"?> | ||
| +<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
| +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
| + width="24px" height="24px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> | ||
| +<path fill="#808080" d="M15.7,4.2c-1.3-1.3-2.6-2.6-3.9-3.9C11.6,0.1,11.3,0,11,0C9,0,7,0,5,0C4.6,0,4.4,0.1,4.2,0.3 | ||
| + C2.9,1.6,1.6,2.9,0.3,4.2C0.1,4.4,0,4.6,0,4.9C0,7,0,9,0,11c0,0.3,0.1,0.6,0.3,0.8c1.3,1.3,2.6,2.6,3.8,3.8C4.4,15.9,4.7,16,5,16 | ||
| + c1,0,2,0,3,0c1,0,2,0,3,0c0.3,0,0.5,0,0.8-0.3c1.3-1.3,2.6-2.6,3.9-3.9c0.2-0.2,0.3-0.4,0.3-0.7C16,9,16,7,16,4.9 | ||
| + C16,4.6,15.9,4.4,15.7,4.2z"/> | ||
| +<path fill="#FFFFFF" d="M10.8,8c0,1,0,2,0,3c0,0.4-0.1,0.6-0.5,0.7C9.5,11.8,8.8,12,8.1,12c-1.6,0-2.5-0.7-2.7-2.3 | ||
| + C5.1,8,5.3,6.3,5.2,4.7c0-0.3,0.1-0.3,0.4-0.3c1-0.1,1.1-0.1,1.1,1c0,1.1,0,2.2,0,3.3c0,1.5,0.6,1.9,2.1,1.8c0.4,0,0.5-0.2,0.5-0.6 | ||
| + c0-1.6,0-3.3,0-4.9c0-0.6,0.2-0.7,0.8-0.7c0.5,0,0.8,0,0.7,0.7C10.7,6,10.8,7,10.8,8z"/> | ||
| +</svg> |
12
platform/firefox/img/browsericons/icon-large.svg
| @@ -0,0 +1,12 @@ | ||
| +<?xml version="1.0" encoding="utf-8"?> | ||
| +<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> | ||
| +<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" | ||
| + width="24px" height="24px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve"> | ||
| +<path fill="#800000" d="M15.7,4.2c-1.3-1.3-2.6-2.6-3.9-3.9C11.6,0.1,11.3,0,11,0C9,0,7,0,5,0C4.6,0,4.4,0.1,4.2,0.3 | ||
| + C2.9,1.6,1.6,2.9,0.3,4.2C0.1,4.4,0,4.6,0,4.9C0,7,0,9,0,11c0,0.3,0.1,0.6,0.3,0.8c1.3,1.3,2.6,2.6,3.8,3.8C4.4,15.9,4.7,16,5,16 | ||
| + c1,0,2,0,3,0c1,0,2,0,3,0c0.3,0,0.5,0,0.8-0.3c1.3-1.3,2.6-2.6,3.9-3.9c0.2-0.2,0.3-0.4,0.3-0.7C16,9,16,7,16,4.9 | ||
| + C16,4.6,15.9,4.4,15.7,4.2z"/> | ||
| +<path fill="#FFFFFF" d="M10.8,8c0,1,0,2,0,3c0,0.4-0.1,0.6-0.5,0.7C9.5,11.8,8.8,12,8.1,12c-1.6,0-2.5-0.7-2.7-2.3 | ||
| + C5.1,8,5.3,6.3,5.2,4.7c0-0.3,0.1-0.3,0.4-0.3c1-0.1,1.1-0.1,1.1,1c0,1.1,0,2.2,0,3.3c0,1.5,0.6,1.9,2.1,1.8c0.4,0,0.5-0.2,0.5-0.6 | ||
| + c0-1.6,0-3.3,0-4.9c0-0.6,0.2-0.7,0.8-0.7c0.5,0,0.8,0,0.7,0.7C10.7,6,10.8,7,10.8,8z"/> | ||
| +</svg> |
290
platform/firefox/vapi-background.js
17
platform/firefox/vapi-common.js
This change adds support for a non-Australis toolbar button, for Firefox variants such as PaleMoon and SeaMonkey. See #1315 for details, discussion and testing.
All of the changes are in Firefox specific code, so unless any objections are raised I intend to merge this pull request shortly.