[Release] Milestone 10

Anything about browser themes, both Full Themes and Lightweight Themes (personas) should go here.

Moderators: FranklinDM, Lootyhoof

User avatar
New Tobin Paradigm
Off-Topic Sheriff
Off-Topic Sheriff
Posts: 7197
Joined: 2012-10-09, 19:37
Location: Insulting you on the internet.

Re: [Release] Milestone 10

Post by New Tobin Paradigm » 2020-05-21, 18:34

No it isn't. Just a broken toolbar image.
Image
- thEre iS No wAY oUt of HErE.. iT'll bE DArK sOON.. -
https://binaryoutcast.com/ | Freenode #binaryoutcast | http://thereisonlyxul.org/

KlarkKentThe3rd
Lunatic
Lunatic
Posts: 253
Joined: 2018-04-20, 20:31

Re: [Release] Milestone 10

Post by KlarkKentThe3rd » 2020-05-21, 18:42

Looks like this is caused by Pure URL.

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 228
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-05-22, 07:27

Can't reproduce the issue on Windows:
Annotation 2020-05-22 151948.png
Annotation 2020-05-22 151948.png (3.12 KiB) Viewed 80 times
I'm not entirely sure (and might be wrong) about what causes this, but it might have something to do with how Pure URL defines its toolbar image by using the `image` attribute instead of styling it through CSS.

User avatar
moonbat
Board Warrior
Board Warrior
Posts: 1324
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-05-22, 12:05

FranklinDM wrote:
2020-05-22, 07:27
I'm not entirely sure (and might be wrong) about what causes this, but it might have something to do with how Pure URL defines its toolbar image by using the `image` attribute instead of styling it through CSS.
Pure URL has always used CSS 'list-style-image' to set the button image - as in the CSS here, browser overlay here.

Edit - I found the problem, I'm dynamically setting the image directly depending on if the extension is turned on or not. Is there a way to do that with CSS?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 19.3 Xfce x64 on HP i5 laptop with 4 GB RAM, always latest versions of PM & Basilisk unless specified.

User avatar
FranklinDM
Add-ons Team
Add-ons Team
Posts: 228
Joined: 2017-01-14, 02:40
Location: Manila, Philippines
Contact:

Re: [Release] Milestone 10

Post by FranklinDM » 2020-05-22, 15:07

You can set a state attribute in the toolbar button itself to track whether the extension is enabled. There are also other methods that could be used to achieve this such as updating the toolbar button's class, etc.

JS Pseudo-code:

Code: Select all

var tb = document.getElementById("button-pureurl4pm");
tb.removeAttribute("state");
if (!extensionIsEnabled) {
  tb.setAttribute("state", "disabled");
}
In CSS:

Code: Select all

#button-pureurl4pm {
  list-style-image: url("chrome://pureurl4pm/skin/icon-green.png");
}
#button-pureurl4pm[state="disabled"] {
  list-style-image: url("chrome://pureurl4pm/skin/icon-red.png");
}

User avatar
moonbat
Board Warrior
Board Warrior
Posts: 1324
Joined: 2015-12-09, 15:45

Re: [Release] Milestone 10

Post by moonbat » 2020-05-22, 18:21

Thanks :thumbup:
I was using Javascript to set style.listStyleImage with the image file but This is the Way, as the Mandalorian would say ;)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 19.3 Xfce x64 on HP i5 laptop with 4 GB RAM, always latest versions of PM & Basilisk unless specified.

Post Reply