Readit News logoReadit News
joosters · 3 years ago
This is my most useful bookmark, I use it everywhere (it's even practical on an iphone)

So many sites have a top banner that disappears as you scroll down a page, but as soon as you scroll upwards even a little bit, it pops up again. This is immensely frustrating because I tend to read at the top of a page and scroll down as I'm reading. So if I scroll down slightly too far and then correct myself, the banner will instantly obscure the bit of the text I'm trying to read. It's very satisfying to be able to click on the bookmark and fix the site's crap design!

ravenstine · 3 years ago
One of the banes of my existence! There's no place for these stupid effing banners when browsers have inertia scrolling and infinite-scrolling sites have fixed headers (or footers) visible all the time. Maybe I wouldn't be so frustrated if the tolerance for what makes a header reappear wasn't ~3px, which is what I often perceive it to be. It totally misunderstands human behavior, which isn't to read an article word by word all the way through like a robot but to reread things to better comprehend them and jump around an article to make sense of connected ideas.
panarky · 3 years ago
Also useful for nuking paywall overlays. Works great at The Atlantic, one click and you're in.
svnpenn · 3 years ago
Yes, yes, yes! I am so sick of sites putting fixed top bar, and fixed side bars as well. Add "clever" bar animation in as well, and you get the awful UX we have today. Classic case of people inventing a problem to solve.
Kerrick · 3 years ago
It's not just the awful UX of today. It's the awful UX of yesteryear, except this time it's the website owner's fault. https://i.stack.imgur.com/pOAAU.jpg
darepublic · 3 years ago
For some ui, fixed sidebar is fine imo. The headers that scroll down with you, on the other hand, can go extinct
gumby · 3 years ago
Or those stupid floating bars that cover the top of the screen, so when you press space to scroll a line or two is obscured. What are they thinking?
Lio · 3 years ago
I've heard them called "vanity flaps", which seems to describe them perfectly.

I guess they're useful when the content is of low quality but you're desperate to keep eyes on the name of your site.

I hate them.

About the only thing worse than self-hiding vanity flap is a floating side bar using a slow animation to slide back into your field of view, just terrible.

wruza · 3 years ago
I believe this is a collective failure. First, developers praise the web/html/css ways to do things and want nothing more. Then they meet a complex layout problem (page-scrolling of an element which is partially covered) and find no solution, because they got what they wanted and nothing more. Nobody reports it as a bug or a FR, or it gets scrutinized as “Do we really need it? Here is a complex way to do that, incompatible with most designs, but doable, right?” and then gets closed as inactive, cause nothing adequate can be commented upon it. Developers develop selective blindness to very obvious layout bugs. The cycle repeats.

So many hours spent on nothing when a simple `viewport-offset-{top,…}: 20px` could solve it once and for all. Instead we will support global nonsense described in the article for years, despite it stays nonsense at any angle.

OneLeggedCat · 3 years ago
> on an iphone

I was so happy to discover this. Went and tried it on Firefox on iPhone... Nope. Apparently it works on all other browsers on iPhone. Just not Firefox. Sigh. I found that the bug report for doing javascript bookmarks was already filed years ago, and Mozilla just ignores it. Mozilla has a bizarre decision making structure.

NaturalPhallacy · 3 years ago
Why are front end developers like this?
dreamcompiler · 3 years ago
I suspect most of them are not like this. But their customer is not you; it's the website manager. And that manager gets promoted not by providing a great user experience but by shoving the company's name into your face as much as possible. (And also by maximizing conversions, ad clicks, and engagement. Oof. Writing that sentence makes me want to throw up.)
sethherr · 3 years ago
I'm an enthusiastic supporter of auto-hiding headers and have added them to sites. I don't understand the hate? It's easy to scroll back down again and have the header re-hide (ie overscroll when you see it happening and then scroll down).

To me, this is better usability. I agree - fixed headers obscure the page and it's bad. But simultaneously, it's nice to be able to access the header and navigation instantly. This seems like a good compromise?

NotPractical · 3 years ago
Interesting that `javascript:` bookmarklets work on iPhones, given Apple's track record of locking everything down. Neat!

Browser extensions are still notoriously difficult to get on mobile for some reason (even on Android, which is open source-ish). So far the best method I've found for injecting JS into sites on Android is the Bromite [1] browser, a Chromium fork that allows you to install userscripts (which are like "diet" extensions). It also enhances privacy and comes with an adblocker.

[1] https://www.bromite.org/

emptyparadise · 3 years ago
Safari on iOS has support for browser extensions, I think there are extensions for user scripts as well.
_V_ · 3 years ago
Honestly I have uBlock set in a way that blocks most of this stuff by default. I have several "steps" of permissivity:

1) (default) block all JS completely

2) Block 3rd party js

3) Permit all js (rare)

If the web fails to render in (1) and I do not necessarily need anything on that web I can get elsewhere, I just leave the web. F that web and F that creator. If I have to (webshop etc) I usualy just enable (2) which works most of the time. (3) is basically only for special webs like banking etc which is just PITA to debug as you have to be logging in constantly etc.

Websites today are just full of unnecessary crap and are downright unusable when on slower connection like 3G. Most of the webs now require your browser to download 2M of JS to have "slide out menus" or some other stupid stuff. uBlock is a must, because without that you will run out of data plan almost instantly.

And to make things worse, Chromium-based browsers will make adblocking much harder with Manifest v3. As soon as this happens, I will go to Firefox. And after that probably Links (unironically).

Btw spinning up a docker to shrink 1 JS function to a oneliner is perfectly capturing the essence of what's wrong with web nowdays :-D

DavideNL · 3 years ago
Yea, it's amazing how much faster everything is when blocking 3rd party javascript with uBlock Origin by default.

I expected many websites would stop working, surprisingly though many sites work times, and i simply: - hit my shortcut to set uBlock Origin to "relax" mode whenever needed - exclude a few CDN's - use a different browser (in private mode) for shopping and such

zagrebian · 3 years ago
Why are you waiting to switch to Firefox?
mgaunard · 3 years ago
Limited data plans? Do you live in the past?
Saris · 3 years ago
Every cell provider in the US still has them.
acabal · 3 years ago
I use this all the time, it's invaluable. I also use it to remove sticky headers, which I find to be deeply annoying because they waste space and often break keyboard scrolling by scrolling the next few lines of text under the header.

In Firefox I've assigned it a keyword shortcut, so I can type `ctrl + l` to select the address bar, then `ks` `<enter>` to execute the JS without having to click.

krick · 3 years ago
Thanks for the keyword tip, IDK why I never used it.
jakzurr · 3 years ago
Same. Showed my sister, and we've both been using for about a year. Works more often than not. (OMG what a relief.)
ryandrake · 3 years ago
I feel I'm getting close to the point where I'm just going to start disabling CSS and JS for normal web browsing, only whitelisting certain sites that 1. I have to use and 2. Simply don't work at all without CSS/JS. IMO browsers have abandoned their role as the "user's agent" and handed over entirely too much control over style, presentation and function to web developers. The fact that you need plugins, extensions, adblocks, bookmarklets, and so on, just to regain this control should be troubling but I guess progress has to march on.

I know I'm in the tiny minority here and firmly in the "yelling at the clouds" territory, but I really wish we could go back to the simpler times of the web being hyperTEXT documents linked together and that's it.

nnmg · 3 years ago
You're not alone, I use noscript on firefox for exactly that. It makes some websites unusable, but for normal browsing, that's what I use. If the website is unusable after allowing a few scripts, then I don't want to be there. It is horrifying when you see how much JS some websites try to pull in.
hrbf · 3 years ago
Many “content” sites are so annoying to use now that I almost reflexively click the “Reader” view and/or save it to Instapaper. If that doesn’t work, I abandon the site.
bityard · 3 years ago
Developers: I would pay for a firefox or chrome extension that lets you just toggle the whole browsing session or tab into reader mode
omgmajk · 3 years ago
Sometimes I use Pocket for this purpose, if a site is obnoxious I tend to just click save and head over there to read. It's annoying but I haven't found a better solution for me on the phone yet.
zajio1am · 3 years ago
I am already doing that (with NoScript), since browsers started supporting video, but not supporting reliable way to stop autoplay.

OTOH, i see why things like adblocking is extension. That makes browser neutral with regard to content, while different plugins can bring different policies.

musicale · 3 years ago
> video, but not supporting reliable way to stop autoplay

It's an almost incredible situation. Firefox and Safari have a setting to stop autoplay, but much of the time it doesn't actually work, and Chrome doesn't even seem to have a setting.

It's also amazing how when enough users decide that they hate some obnoxious web site behavior (pop-up windows, autoplaying video, etc.) enough to block it, the web site designer's response isn't "maybe we should be less obnoxious" but "how can we circumvent the user's preferences?"

mrguyorama · 3 years ago
Firefox has never failed to stop autoplay for me. I don't have it set to stop all autoplay, because I watch an extreme amount of Youtube, but any tab that opens in the background or isn't focused has never failed to "Autoplay Blocked"
kevin_thibedeau · 3 years ago
Firefox has about:config settings to disable autoplay.
coldpie · 3 years ago
Just use NoScript. It's designed for exactly that, and it's great. Permanently allowlist the sites you use frequently, temporarily allowlist stuff as needed until the site starts working. It sucks, but leagues it's better than the unfiltered web.
marginalia_nu · 3 years ago
Might wanna check out the gemini protocol[1]. Although while it's a nice place to visit, it I think it takes it a bit too far in the other direction.

[1] https://gemini.circumlunar.space/

dopidopHN · 3 years ago
Yeah I thought of those guys while reading this comment section.

Gemini site and hubs do have a didactic to flavor; not that different from the old web.

Except the old web was yearning for more bell and whistle. Dynamic element. Gemini made anything not text illegal

peanut_worm · 3 years ago
Seems kind of pointless. Browsers are basically just virtual machines that run web applications at this point. I can’t even think of any plain text and image websites besides my own.
dotancohen · 3 years ago

  > I can’t even think of any plain text and
  > image websites besides my own.
Ycombinator has a great news aggregation website that is text only. You can find a link to it from the top of this page.

krick · 3 years ago
Exactly. I never understood all these "I don't enable js" comments. You kinda usually don't need to disable js on sites that are usable without js. And if you feel the urge to disable it, it is most likely that without js it's an empty page anyway.
sefrost · 3 years ago
Hacker News?
GoblinSlayer · 3 years ago
Most sites are plain text with only a few exceptions like youtube. And even then video doesn't need javascript.
marginalia_nu · 3 years ago
There are plenty, you're using the wrong navigational tools ;-)
permo-w · 3 years ago
slightly unrelated, but I would really like to be able to block google’s cookies on every website except google. I do not want them tracking me across the web, but they make their site unusable if you block cookies. I tried using different search engines, but was less than impressed by any of them
aembleton · 3 years ago
uMatrix was good for this as you could block cookies. I do this in uBO, but it is a little more complicated. I block all third party JS with the following line:

  *$script,redirect=noop.js,3p
and then allow google.com for google sites such as google.co.uk with:

  @@||google.*$domain=google.\*
All of this is in my annoyances filter list: https://github.com/aembleton/Arthurs-Annoyances/blob/master/...

stjohnswarts · 3 years ago
just use multicontainers for this in firefox. There is no equivalent in safari or chrome though.
userbinator · 3 years ago
I use JS whitelisting but haven't gotten to the point of CSS off by default yet; I suppose on the majority of sites I come across, the CSS hasn't been bad enough to warrant it.
frogperson · 3 years ago
i think it would be cool to start over with a whole new markup language. Probably keep http, but html and css and javascript are out the door. The new "browser" could be more like a container/sandboxed thing that fetches some markup and code and does who knows what.
GoblinSlayer · 3 years ago
That's the idea I have. Once abusive web standards are out, it shouldn't be a difficult task to write a browser.
ryanianian · 3 years ago
Browsers were able to fight window.open popups back in the day by intercepting/blocking the window.open API. This was, iirc, one of the killer features of firefox back in the day. But cat and mouse: websites are now abusing CSS to recreate the popup experience.

Bookmarklets like this are helpful (and this is a great successor), but bookmarklets are very difficult to install and use for the average internet user. I could not figure out how to install this on my iPhone without using desktop Safari to sync bookmarks.

Is there any hope of browsers being able to combat popup modals and other sticky gross things in an automated (and on by default) way that doesn't totally break sites that require sticky items for navigation or other, non-hostile features?

aaaaaaaaaaab · 3 years ago
One way or another, the endgame is going to be websites which are nothing but a fullscreen WebGL canvas driven by webassembly.

Things will steadily devolve for users from that point.

Then we’ll need about ten years for the next generation of hypermedia to surface, which hopefully won’t have Turing-complete scripting on principle. But I’m not sure whether developers are smart enough to avoid repeating the same mistakes again and again…

aendruk · 3 years ago
That may just be the day I stop using the web. I can picture it now: Me, neo-luddite, weathered and bitter, strung between the maw of capitalism and the precious tranquility of my crafted world.
dreamcompiler · 3 years ago
That already happened with Flash. It took 20 years to kill it but it's finally dead.
postalrat · 3 years ago
Why a canvas with webassembly? Just a single video element with everything rendered on the server gives them the most control.
aendruk · 3 years ago
There’s a motion to add first class support for in-page popups. Ironically that could take us back to the good old days of having a consistent target to block.

https://news.ycombinator.com/item?id=32599583

dreamcompiler · 3 years ago
I've often wondered if just blocking everything on the page with z-index>0 would work. I will eventually get around to trying it.
Nextgrid · 3 years ago
The problem is not technical - there's already a supercharged version of the old popup blocker: uBlock Origin, and it is permissively licensed such that any browser can embed it by default.

The problem is commercial - companies that make browsers have gone all-in on "growth & engagement" and the "attention economy" and rely on the web being terrible to make their money, either directly (Google, Edge) or indirectly (Mozilla, funded by Google and thus unlikely to bite the hand that feeds).

Browser makers have given up on serving their users because it turns out you make more money by exploiting them.

farisjarrah · 3 years ago
You can add this on iphone by adding another webpage as a bookmark using the share menu in safari and then going back and editing the bookmark so its what you want it to be.
bsimpson · 3 years ago
It's wild that you have to set up Docker to contribute to 600 characters of JavaScript.

It's like building a robot to pass the butter.

yosito · 3 years ago
You're one of those people who just grabs an unwrapped stick of butter and chucks it at the other end of the table, aren't you?
bsimpson · 3 years ago
I like the feeling on my hands.
krick · 3 years ago
You don't really have to. It's just minification and stuff, just a build step, I suppose the owner could do that as well, if your contribution has any value, but you didn't do it properly. Do you know a better way to build/minify js? Perhaps you have all these npm packages installed on your PC already? I don't, and I don't want to. If Dockerfile wasn't included I'd have to make my own just to run any fucking build-tools it requires to make a bookmarklet (which I most likely wouldn't bother to do). And, yeah, it requires them, this is not some optional stuff that author did just to be fancy.

You could set up some CI to make automatic builds after merging to master, but that still wouldn't solve the problem of contributor wanting to test what he wrote.

bsimpson · 3 years ago
I've never used Docker (nor make). From the outside, it feels like some heavy VM thing for building isolated systems in the cloud. It's not something I'm used to seeing in the client-side ecosystem.

I just took a second look at the repo, and realized there's no package.json. Typically, an open-source JavaScript project would have one. It would enumerate the dependencies and how they work together to generate the final output.

As a JavaScript contributor, I expect to be able to type

    yarn
    yarn run build
into any repo to generate the output (and test any changes I've made).

I suspect the interactive web is not the author's primary platform. That's fine - it's his project; he can structure it however he wants. I was just surprised to see an unfamiliar, nontrivial dependency to concatenate a handful of lines into a bookmarklet.

Since you asked "Do you know a better way?" you can port the `npm install` line to a dictionary of dependencies in package.json. You can use wireit in that same file to chain the CLIs together, accomplishing what's currently the ENTRYPOINT line in Dockerfile.

It does the same thing that the current setup does, but it follows the conventions of the ecosystem. This makes it more available to external contributors, because they don't have to learn/install tools like Docker that aren't typically seen in JS.

cxr · 3 years ago
> Do you know a better way to build/minify js? Perhaps you have all these npm packages installed on your PC already?

If only there were some sort of ubiquitous platform—a World Wide one, even—that we could reliably depend on to fetch remote resources and that was especially suited for executing JS. It would need to run the code in a sandbox of, course, to ensure that it's acting in the interests of the user—a sort of "user agent"—and not just executing arbitrary code with full rwx privileges in the interests of the script author.

Maybe in a more perfect world...

Previously: <https://news.ycombinator.com/item?id=24495646>

tempodox · 3 years ago
See my comment on how to make it without Docker:

https://news.ycombinator.com/item?id=33005263

ARandomerDude · 3 years ago
I kill sticky elements with the back button. If a site wants to hassle me, I won't give them attention or ad money.
thih9 · 3 years ago
What sites do you visit that don’t have sticky elements?

I’m curious because I’d love to visit sites like these too. Meanwhile most social media, blogs, news sites and probably most HN submissions too have some.

thehappypm · 3 years ago
This web site
sexy_seedbox · 3 years ago
Even documentation sites using position: sticky for the Table of Contents usefully showing you all the sections and subsections as you scroll?
GoblinSlayer · 3 years ago
Which? At least wikipedia, W3C, IETF, man pages and msdn don't.
userbinator · 3 years ago
I seriously don't understand why some people seem to like position:sticky so much. It's really offensive when the element I'm trying to scroll out of the way refuses to leave and clings to the edge, almost mockingly.

I've had a "replace sticky with relative" filter in my MITM proxy since the day that CSS misfeature showed up in browsers.

deergomoo · 3 years ago
position: sticky; makes tons of sense for web apps. It’s very common to want toolbars or menus always visible. I don’t think anyone in their right mind would claim that, for example, MS Word would be better if you needed to scroll to the top of the document to see any of the controls.
userbinator · 3 years ago
I don’t think anyone in their right mind would claim that, for example, MS Word would be better if you needed to scroll to the top of the document to see any of the controls.

That's position:fixed or perhaps position:absolute, not position:sticky. And honestly, the former two are far less annoying to experience because they're there from the beginning, while the latter trick you into thinking they can be scrolled out of sight, but don't.

retcore · 3 years ago
I'm convinced that position:sticky wouldn't exist if browsers weren't beholden to advertising traffic. Someone needs to create a rival foundation to Mozilla, with some advertising and transaction processing chops, figure out how to sustain enough revenue to tax deduct enough smart promotion, and ideally, I'd personally wish, fork Pale Moon.

The German Zugabeverordnung law was very strict against any "free" commercial offer tied to the obscuring of linked purchases. But instead of being extended to embrace the creation of sponsored funnels providing free entertainment websites, as is probably now long forgotten but fallacious doctrine, the internet instead made "free", "free".

https://marketinglaw.osborneclarke.com/marketing-techniques/...

https://competition-attorneys.de/lawyer/zugabeverordnung-ger...

The law was scrapped in 2004, unlikely [ed] not [/ed] coincidentally with establishing peak web commercial libertarian lobbying, the more political and in earnest post dotbomb.