Show HN: A Firefox extension to add latency to distracting webpages
addons.mozilla.org
addons.mozilla.org
Even if the extension's source code is available on GitHub, there is no guarantee that the code hosted at addons.mozilla.org corresponds to the same one found on GitHub; and even if I (or someone else) could verify that the code is indeed the same, and that there is nothing malicious in it right now, there is no guarantee this will still be the case in future (silent) updates.
To be clear, this is more of a criticism to Mozilla Firefox's security model, not to this particular extension.
Any extension that's listed on the web stores have to be reviewed for malicious code, and they must do what the listing say they do. So if your browser extension has your passwords, then that extension would be considered a password manager.
The extension probably listens to the IPs of well-known time wasting websites like HN or reddit, then adds a latency to the browsing. Same with an ad blocker -- they know every site you visit but only to compare them with their blacklist of advertising IP addresses.
Of course, you have to trust they aren't doing anything else with that info, which you can probably assume you're mostly safe if you don't need an account to use the extension.
https://support.mozilla.org/en-US/kb/recommended-extensions-...
[0] https://extensionworkshop.com/documentation/publish/submitti...
most of the relevant code is in https://github.com/OskarDamkjaer/FirefoxDelayWebpage/blob/ma...
URL: http://some.site.tld/ [ INSECURE GET:1 POST:2]
URL: https://some.other.tld/ [ SECURE GET:3 POST:2 ]
Maybe in about:networking have a tab for logging / debugging all addons?You can literally just save them from addons.mozilla.org and look inside - it's js so it's not compiled, and obfuscated code is against Mozilla policy.
Automatic updates are optional too.
Microsoft Application Inspector might be handy for some superficial profiling - https://github.com/microsoft/ApplicationInspector
You can submit obfuscated code as long as you also upload non-obfuscated code to Mozilla. Not sure if that separate code upload is public or not...
Only reviewers have access to the source code, unless you configure the listing to make the code public.
Basically, if the addon wants to interact with any kind of urls, this message is unavoidable. Which means that even if the addon doesn't require to access any data of the websites, as long as it wants to be triggered for any websites, this message is not going to be avoidable.
https://extensionworkshop.com/documentation/develop/request-... has more information.
I do agree with you though. What is surprising is that technically, this should be fairly easy to solve:
- own the CI system (to make sure the sources match the built versions)
- make sources (the ones that went into build) clearly visible
- disable silent updates
I'm assuming this permission has no need to read the body of network responses, inject anything into the responses, read cookies etc.
However, it probably has no option than to request the "read and change all network data" permission because there is nothing weaker that will let it do what it needs to do.
Making sources available isn't a scalable option to help with this in my opinion. Who is going to be doing thorough security audits of every extension + every update?
It's a fair comment, but this extension works by injecting javascript into every page the browser loads. If this capability were removed or even changed, it would break a ton of existing extensions (and compatibility with the many extensions written for Chrome).
Given the nature of javascript and the web, once you can run a bit of javascript on a page, you can do just about anything, so the phrasing "can access data" sounds scary but it is accurate. Of course, "can" doesn't mean "does", hence all the other commenters suggesting auditing the code.
Speaking of auditing extension code, I like https://addons.mozilla.org/en-US/firefox/addon/crxviewer/
To make any headway on this, you would need to start considering how to prohibit JavaScript from transmitting page content to remote servers if it's been modified by an addon, but that would then break all JavaScript modified by adblockers, and so there's not any easy solution there either.
If you can think of a valid security model here that isn't vulnerable to today's arbitrary JavaScript execution issues, I think you'd find a willing audience. Chrome tried to solve this by nailing down what extensions can do, and the adblockers all flipped out because they won't be able to run arbitrary JavaScript in-page anymore. It remains unclear how this can ever be solved.
> Even if the extension's source code is available on GitHub, there is no guarantee that the code hosted at addons.mozilla.org corresponds to the same one found on GitHub; and even if I (or someone else) could verify that the code is indeed the same, and that there is nothing malicious in it right now, there is no guarantee this will still be the case in future (silent) updates.
> To be clear, this is more of a criticism to Mozilla Firefox's security model, not to this particular extension.
Uhhh... yeah
body { filter: grayscale(100%); }
(only gotcha is position: fixed; elements breaking in Firefox?)
It feels a lot easier to focus on what I'm reading and to not be sucked in or distracted by websites. I bet psychologically color activates reward systems that may not be as healthy for digital content.
I actually liked it so much that I used accessibility options to make my entire computer and phone grayscale. So far it's great! Also has better performance than a CSS filter for stuff like video.
hs.hotkey.bind({"cmd", "ctrl", "alt"}, "c", function()
hs.osascript.applescript([[
tell application "System Preferences"
reveal anchor "Seeing_Display" of pane id "com.apple.preference.universalaccess"
end tell
tell application "System Events" to tell process "System Preferences"
repeat while not (exists of checkbox "Use grayscale" of group 1 of window "Accessibility")
delay 0.1
end repeat
set theCheckbox to checkbox "Use grayscale" of group 1 of window "Accessibility"
tell theCheckbox
# If the checkbox is not checked, check it to turn grayscale on
if not (its value as boolean) then
set checked to true
click theCheckbox
else # else turn grayscale off
set checked to false
click theCheckbox
end if
end tell
end tell
tell application "System Preferences"
quit
end tell
]])
end)Imagine if you had to use a printer to print out your facebook feed when you wanted to see it. Then, in order to interact, you had to write on that paper the comments, likes, etc. that you wanted to transmit and scan it back into the system. That mode of interaction seems "primitive" compared to the way we use things on our phones, but I think carries with it a lot of nice advantages like introducing time buffers for your mind to catch up to your impulses.
It would be nice (from my experience) to make the delay variable - - this stops people "Learning" ways of avoiding the always fixed length delay.
• Chrome's "throttling" feature: https://helpdeskgeek.com/networking/simulate-slow-internet-c...
• Whole-computer "make my network stack worse" utilities:
• • macOS's Network Link Conditioner: https://nshipster.com/network-link-conditioner/
• • clumsy (for Windows): http://jagt.github.io/clumsy/index.html
• • dummynet (for Linux): http://info.iet.unipi.it/~luigi/dummynet/
• A naughty SOCKS5 proxy (multiplatform): https://github.com/Shopify/toxiproxy
I've found greater success in just observing my impulses. While I'm working, I might get a desire to type the "hn" keyword into my URL bar (guess where it goes). But because I've noticed this before it happened, I can choose to not do it. If I find myself "idling" on such distractions without realizing, then that means it's time to do something else. Get back to work. Take a break and relax. Get off the screen entirely. Anything else, just don't idle. This seems to get easier with practice.
But good websites (ie, not web apps) will load instantly and unimpeaded. And as a side effect you're protected from most browser exploits since the vast majority require executing JS.
A small reminder.. it's easy to end up in scrolling mode.
The behavior curve is interesting. It is for me now practically an autonomous unconscious behavior to open Reddit or HN. StayFocusd would figuratively provide the "slap" to make me consciously realize what I was doing, so going through the steps of disabling it was a conscious, deliberate decision, which was enough to prevent that from happening.
I use the poorly named extension Monastery for the delay timer.
https://addons.mozilla.org/en-US/firefox/addon/monastery/?sr...
"After years of trying various methods, I broke this habit by pitting my impatience against my laziness. I decoupled the action and the neurological reward by setting up a simple 30-second delay I had to wait through, in which I couldn't do anything else, before any new page or chat client would load (and only allowed one to run at once). The urge to check all those sites magically vanished -- and my 'productive' computer use was unaffected."