Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature suggestion] option for enhanced visual awareness #3

Open
ghost opened this issue Sep 4, 2018 · 18 comments
Open

[feature suggestion] option for enhanced visual awareness #3

ghost opened this issue Sep 4, 2018 · 18 comments
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Sep 4, 2018

When browsing I hardly look at the address/tool bar and rather focus on the content window thus in such work flow missing the DCF+ icons (colours). Else having getting used to tilting up my eyes from the content window to one of the bars in search for the DCF+ icons (colours).

I would rather be content to have a more intrusive but enhanced/instant visual awareness with a frame/border (top and each side in the style of red/white or yellow/black hazard tape) placed/injected in the content window .

Suppose that others may prefer the less intrusive icons this could perhaps be a option.

@claustromaniac
Copy link
Owner

claustromaniac commented Sep 4, 2018

Will probably take a while, but I've been considering adding content scripts for another purpose anyway. I'm going to experiment a bit and see what I can do. There are other possibilities that might be worth exploring, too.

@claustromaniac

This comment has been minimized.

@claustromaniac

This comment has been minimized.

@claustromaniac
Copy link
Owner

If you don't find my initial experiment too convincing, we can always use the international warning symbol for radioactive high-voltage laser-emitting biohazards that coat the floor and make it slippery.

@claustromaniac claustromaniac added the enhancement New feature or request label Sep 6, 2018
@ghost
Copy link
Author

ghost commented Sep 6, 2018

I would vote for horizontal and perhaps only 1 at the top

@claustromaniac
Copy link
Owner

claustromaniac commented Sep 6, 2018

I have some bad news.

Like many other beginners, I assumed that if I injected new elements into the DOM (like these bars), Firefox would have my back covered on the aspect of security. As it turns out, such a practice is not safe because page scripts can interact with DOM elements injected by extensions (i.e. they're not completely isolated). This is Bad.

Some addon developers prefer to ignore this fact, but I prefer to do the responsible thing and just drop this idea, at least until the devs at Mozilla give me some API to do this safely.

References:


Fortunately, there are alternatives. Unfortunately, there aren't many.

But there is an interesting one that is not on that list: the recently-added theme API.
I'm afraid it's either that or showing system notifications... but I think that programmatically changing the color theme of the browser UI itself not only is a safer alternative to injecting intrusive elements, it may also give a more prominent visual cue without being intrusive at all. I'd say it's worth a shot, at least.

@claustromaniac
Copy link
Owner

A little update:

I have toyed around with the theme API, and I have to say it's pretty cool. It is kind of limited, and it doesn't get along with native themes (dark and light), but it can be made to work with other extensions that add custom themes. I'll probably implement a new version for testing soon and ask for feedback here before I decide what to do with it.

@claustromaniac
Copy link
Owner

claustromaniac commented Oct 7, 2018

Another update: I postponed this issue for a while because the Theme API exists only from v58 onwards, and there were more pressing matters to take care of first.

My plan is to implement a set of themes, one for each color (default, orange, red, purple), and add an option to change them dynamically when appropriate. The default theme would be one similar (maybe even identical) to Firefox default theme, but the extension would only use it if the user didn't install a custom theme. If the user did install a custom theme, the default should be that custom theme.

A far less complex alternative that is still on the table would be to use system notifications. I could allow the user to enable them only for individual states. So you could get notified only when the status is RED, for example.

As I am typing this, I came up with something else that sounds like it might be worth a shot: maybe I can automatically display the popup (without the user clicking on any icons) when something is detected. For this to be effective, I would have to make some changes to have the popup update in real time, which would be a worthwhile improvement anyway. There is a significant drawback to this approach, though: if the user clicks anywhere while the page loads, the popup will disappear immediately... hm 🙄

@ghost
Copy link
Author

ghost commented Oct 7, 2018

My plan is to implement a set of themes, one for each color (default, orange, red, purple), and add an option to change them dynamically when appropriate.

Running FF Nightly and having experimented with https://color.firefox.com I would likely not favour theme changing for the reason of having the OS and FF dark themed and introducing a change in the luminosity, which comes inherently with a colour change, would be rather sort of (environmentally) disturbing/intrusive.
It would probably be less so with a light themed OS/FF.


use system notifications

would that work consistently on different OS?

And then it would be something outside the browser window and eventually trigger a sound alert too in case the system notification are linked to a sound alert.

From my perspective I would find this likely rather (environmentally) bothersome.


automatically display the popup

That sounds most appealing to me, as an option (perhaps non-default).
With a (sub-)option to collapse/fade the pop-up after X seconds. And perhaps not for resources like css, media (images, video, audio) and fonts - but that is perhaps too much of efforts to invest.

drawback to this approach, though: if the user clicks anywhere while the page loads, the popup will disappear immediately

But in any case it would have popped up and served (initially) its intended purpose of enhanced visual awareness

@claustromaniac
Copy link
Owner

claustromaniac commented Oct 8, 2018

That sounds most appealing to me, as an option (perhaps non-default).

Definitely non-default.

With a (sub-)option to collapse/fade the pop-up after X seconds. And perhaps not for resources like css, media (images, video, audio) and fonts - but that is perhaps too much of efforts to invest.

I think a good way to do this would be to make the popup appear only the first time a resource is detected as coming from an edge node when you navigate to a given page. I have yet to confirm that I can actually do this, though.

EDIT: Can't do this either 😩 .

you can't open the popup programmatically from an extension's JavaScript; it can be opened only in response to a user action.


There are many extensions that use system notifications, and they work consistenly regardless of the OS. I can make notifications disappear automatically to make them less annoying. Given that the alternative is the Theme API, which would be far more complex to work with, I'd say it's worth a try.

@ghost
Copy link
Author

ghost commented Oct 8, 2018

😞 , system 🔔 is not for me, neither would be theme colouring

@ghost
Copy link
Author

ghost commented Oct 10, 2018

came across this WX https://addons.mozilla.org/en-US/firefox/addon/pericles/ which serves sort of an transparent and collapsible overlay in the browser window

@claustromaniac
Copy link
Owner

claustromaniac commented Oct 10, 2018

It injects DOM elements, which is the same approach I was going to use first. It's not safe. Any website can use Javascript to detect those elements, therefore they make it easier for them to identify you, and there might be other risks involved. If such risks are acceptable to you, I am willing to implement what I was going to implement originally in #3 (comment).

@ghost
Copy link
Author

ghost commented Oct 10, 2018

Ach well, I liked the idea of such collapsible overlay and hoped that with a same-origin policy a layer of isolation is achievable.

But of course safety before 🍬

@ajvsol
Copy link

ajvsol commented Jan 30, 2019

The Toolbar API will land sometime in the next few versions of Firefox, that would more than likely work for these purposes.

@ghost
Copy link

ghost commented Feb 25, 2019

I sometimes use Animated PNGs when replacing some extensions' toolbar icons. These display correctly on Firefox, not sure all browsers support them, surprised not to see them more often (maybe because they could bother some users). Example:

apng

@Mikaela
Copy link

Mikaela commented Feb 25, 2019

I think I would be one of bothered users and I would consider it as accessibility issue.

@ghost
Copy link

ghost commented Feb 26, 2019

@Mikaela ,

I think I would be one of bothered users and I would consider it as accessibility issue.

The suggestion is an answer to an enhanced visual awareness. Also the animated icon remains only as long as the site is opened contrarily to my above animated E example.

Anyway it's often possible to modify an extension's toolbar icons, and even urlbar icons.

For True Sight for instance:

In userConfig.css (located in [USERPROFILE]/config)
and, in this example, a subfolder named [USERPROFILE]/config/UserData

/* TRUE SIGHT - Toolbar button */
#detect-cloudflare-pa_cm_org-browser-action[tooltiptext="True Sight"] {
list-style-image: url(UserData/TrueSight-TBAR-0.png) !important;}
#detect-cloudflare-pa_cm_org-browser-action[tooltiptext="External resources were served by a CDN."] {
list-style-image: url(UserData/TrueSight-TBAR-1.png) !important;}
#detect-cloudflare-pa_cm_org-browser-action[tooltiptext="Multiple CDNs detected on this page!"] {
list-style-image: url(UserData/TrueSight-TBAR-2.png) !important;}
#detect-cloudflare-pa_cm_org-browser-action[tooltiptext="This page was served by a CDN!"] {
list-style-image: url(UserData/TrueSight-TBAR-3.png) !important;}
/* TRUE SIGHT - Urlbar button */
#main-window .urlbar-icon[id*="detect-cloudflare-pa_cm_org"][tooltiptext="External resources were served by a CDN."] {
list-style-image: url(UserData/TrueSight-UBAR-1.png) !important;}
#main-window .urlbar-icon[id*="detect-cloudflare-pa_cm_org"][tooltiptext="Multiple CDNs detected on this page!"] {
list-style-image: url(UserData/TrueSight-UBAR-2.png) !important;}
#main-window .urlbar-icon[id*="detect-cloudflare-pa_cm_org"][tooltiptext="This page was served by a CDN!"] {
list-style-image: url(UserData/TrueSight-UBAR-3.png) !important;}

From there on the user can craft his own icons and copy them to [USERPROFILE]/config/UserData
That's what I do for 90% of my 47 Firefox extensions (those handling a toolbar/urlbar icon) given that default button icons are, IMO, most often (not always) hardly perceptible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants