Live data from Hacker News

Userscripts Are Fun and Are Still Very Much Relevant

dutzi.party

91–100 of 145 posts

Re: Userscripts Are Fun and Are Still Very Much Relevant

#91
post #76

Earlier quoted context omitted.

I partly agree. I don't want it to be all or nothing. But the way browsers are set up with the "default search", it somwhat is. Ooooh I would love to be able to custom route searches depending on rules.

Firefox supports this, go into Settings -> Search and set a keyword for the search engine. For example, if you set the keyword for DuckDuckGo to "ddg" and Google to "go", then typing "ddg " into the topbar will search DuckDuckGo, and typing "go " will search Google.

You can set a keyword for any bookmark. Firefox replaces %s with your query. Simply bookmark the search result page of any website, replace the query with %s and set the keyword for the bookmark.

Doesn't have to be search either. For instance, I use it for the nodejs docs, and npm packages too: "https://nodejs.org/api/%s.html" and "https://www.npmjs.com/package/%s". So I can type "node fs" open the fs docs for node, or "npm fs-extra" to look up the docs for "fs-extra" package on npm.

Re: Userscripts Are Fun and Are Still Very Much Relevant

#92
post #55

Earlier quoted context omitted.

Why use a userscript when you can use a search engine that is not from a spyware company? Like Startpage, Qwant, Duckduckgo or Searx? Alleluia, direct links out of the box. For youtube, why not give Invidious a try (ok, it has its downs)? Sometimes, the best solution to "hostile websites" is to not use them in the first place (or use their proxified versions).

I wanted to love DDG. It promises a lot. And it delivers a lot. I love the shortcut codes. But after a few months I had to go back to Google. Two main reasons: 1. Image searches could often return literally zero results for simple terms. 2. I'd look up a term and get non-English Wikipedia articles before the English ones, which often wouldn't even show up.

Translation: you prioritized convenience over privacy.

That's your choice to make and I'm not criticizing your choice, but I do think it's a bit off-base to criticize DDG for this. There's a pretty inherent tradeoff: violating privacy is should allow Google to produce better, more personalized search results if they are at all competent.

I would guess that the vast majority of DDG users don't use DDG because they think it produces better search results. We're using DDG because we're concerned about our own privacy and/or the implications of letting a corporation gather very personal data on every person in our society.

Re: Userscripts Are Fun and Are Still Very Much Relevant

#94
[I posted this as a "Show HN" a few days ago [0]]

I wrote a short JavaScript snippet to export HN Favorites to a CSV file. It scrapes the HTML and navigates from page to page.

Setup and usage instructions are in the file.

Check out https://gabrielsroka.github.io/getHNFavorites.js or to view the source code, see https://github.com/gabrielsroka/gabrielsroka.github.io/blob/...

[0] https://news.ycombinator.com/item?id=22788236

Re: Userscripts Are Fun and Are Still Very Much Relevant

#95
As someone who has made a number of userscripts to improve his experience with various websites (mostly for work), I'm glad they're getting some attention :)

So often simple UI changes like resizing a textbox or adding the ability to collapse comment threads can make a big difference to your experience.

Re: Userscripts Are Fun and Are Still Very Much Relevant

#96
post #87

Earlier quoted context omitted.

I thought web-ext was only for Firefox, and I didn't see anything in the Readme about Chrome?

Looks like it's only in the release notes [1] - I only spotted it recently myself while updating an extension, it's: web-ext run --target chromium [1] https://github.com/mozilla/web-ext/releases

Thank you!

Re: Userscripts Are Fun and Are Still Very Much Relevant

#97
post #88

Strongly agree with the original article, and it's fun to see all the niche use cases that people are mentioning here. But I have a major frustration with user scripts: writing them requires experience with Javascript and reverse engineering websites. This is fine for the HN crowd, but locks out most web users, who can't program at all. I bet that if it were slightly easier to develop user scripts, there'd be 10x as…

[deleted]

Re: Userscripts Are Fun and Are Still Very Much Relevant

#98
post #72

I installed TamperMonkey recently and wrote some scripts to improve my Twitter experience. Very handy. Then it popped up a request for donations screen, which is an understandable approach by the TamperMonkey author, but I became uncomfortable that TamperMonkey was watching everything I did on the web and reporting back to the author, so I uninstalled it.

I saw the same request and it was the trigger for me to donate.

I would have to had the author said something along the lines of "I don't track your browsing history"

Re: Userscripts Are Fun and Are Still Very Much Relevant

#99

What's the security story for userscripts?

On the user's side: Treat userscripts like stuff you paste in the browser console.

In terms of actual tech: GreaseMonkey (and probably also Tamper-/ViolentMonkey) does some sort or isolation between the userscript and the page so that the page can't hijack the userscript. More on that here: https://wiki.greasespot.net/UnsafeWindow

Re: Userscripts Are Fun and Are Still Very Much Relevant

#100

I've spent 9 years maintaining a userscript for a website that now has a new beta in React. Boy, is that a pain in the behind comparatively. I'm pretty sure what I'm doing on the old version of the site won't be possible, but that is yet to be determined.

You may want to check out Social Fixer (socialfixer.com). It's a userscript that manipulates and adds features to Facebook, which is written in React. You may get some ideas from them.
Post reply on HN