Hacker News new | ask | show | jobs
by Piskvorrr 3017 days ago
Sites have been replacing the actual API request with a HTML5 overlay, precisely because of this - only when clicking "notify me" does the actual permission get requested, with the requisite dialog.

(The rationale is "once the permission is denied, there's no way to bring it up again; a dismissed HTML5 box can be brought up again an infinite number of times")

As for me, I went for WebAPI Manager, which blocks most of the annoyances (Vibrate API? Never saw anyone outside malvertising use that), while still allowing me to manually whitelist sites.

6 comments

I actually came up with a decent use for the vibrate function on this control [0]. It's a clickwheel type interface for picking an altitude. When the number changes it triggers the vibrate function making it easier to use the interface without looking.

[0] https://i.imgur.com/aiFFzLP.png

edit:

I've linked a demo below with the following caveat, this demo was set up exclusively as a mobile interface and still needs plenty of work. One of the issues is the clickwheel size is initialized as a percentage of the screen height when the page loads. So if you resize the window significantly or switch to mobile mode in dev tools, you must refresh the page to get the clickwheel size to adjust accordingly.

https://faa-aviation-data-portal.github.io/pirep/pirepMobile...

Good thing Firefox is working on that too: https://news.ycombinator.com/item?id=16574228
That's how it was meant to be implemented, you trigger the request in response to user action.

The direct and immediate one is laziness, and I wonder what the success rate of that is.

Right. This is also the current standard approach for asking for iOS push permissions. Without intermediary dialog, the app can't try again.
And as app builders you have to explain people how to enable the permission anyways if people try to e.g. use their current location. Luckily since a few versions now, iOS allows apps to directly open a certain settings page, e.g. location services.
But if user decline native dialog once, it will not be asked again (at least for location services). So intermediary dialog won't help on iOS.
Same dark pattern as phone apps that ask for permission with their own dialog then bring up real one or ones that ask for a rating but only send you to real app store rating system if you'll rate them highly.
Been trying to decide whether to do this myself, this really a dark pattern?

We're not asking until until they try to use the feature that requires location, but are using the additional pop-up. Rationale being that they probably want to allow it or they wouldnt be using app, and making it so they dont mistakenly deny and have to mess with setting is really more of a convenience.

But ya it does seem to go against the OS defined behavior.

I usually disable JS and white list the sites that actually deserve it.