Hacker News new | past | comments | ask | show | jobs | submit login
Use Bookmarklets on Chrome on Android (2020) (kinlan.me)
38 points by danuker on Oct 2, 2022 | hide | past | favorite | 19 comments



Alas, many sites have Content-Security Policies, which doesn't block bookmarklets outright, but keeps them from functioning in basic ways: often CSP prevents contact with other sites.

So you can modify the page, yes. But you can't submit content to other domains. You can't load more code. This double-dooms kick-ass awesome extensions like Hypothes.is[1], the brilliant Web Annotation tool/bookmarklet: the bookmarklet can't load the rest of the code needed to launch the experience, and the bookmarklet can't send those annotations the user makes to the user's destination.

I've seen very little interest when issues are raised about doing anything to help Bookmarklets[1]. Browsers seemingly don't care about these users & are fine with Bookmarklets being left to rot away. Meanwhile Chrome on Android still has no other means for users to extend/augment/enhance their own web experience, as Chrome has said repeatedly Extensions will not be supported on mobile, leaving users with nothing.

[1] https://web.hypothes.is/help/installing-the-bookmarklet/

[2] https://github.com/w3c/webappsec-csp/issues/444


This is doubly frustrating when the spec explicitly says CSP shouldn't interfere with bookmarklets.

> Policy enforced on a resource SHOULD NOT interfere with the operation of user-agent features like addons, extensions, or bookmarklets.

https://www.w3.org/TR/CSP/#extensions


The user-agent not doing what the user wants is not a user-agent.

I recently wanted to edit a Firefox theme to highlight the active tab more strongly.

Surprise! To install extensions not signed by Mozilla, you need Firefox Developer Edition.

Because a configuration option would make it too easy.


I feel bookmarklets are so underrated. I get that apps and extensions - when available - can provide a better experience but bookmarklets work to avoid having to install yet another app/extension.


This is awesome! I wish I had seen it years ago.

I also wish the Chrome team would finally do something about the miserable bookmarking functionality in all versions of Chrome. There's no reason for it to be so featureless. Just adding some simple tweaks would make it so much more useful:

Sortable table:

  - Name
  - Summary (Same as presented in a search)
  - Date added, 
  - Last date visited, 
  - Domain
  - Path, 
  - Thumbnail / favicon
  - Meta data: published, author, opengraph/Twitter info metadata, feed.
  - Editable Notes
Additional basic features:

  - Quick list of most recent bookmarks
  - Quick List of most used bookmarks
  - Duplication detection
  - Embedded videos for YouTube vids
  - Online access for editing and management, sharing and broken/dead link detection.
Throw some ads in there as well if that's what Google is worried about. It's just a huge oversight on their part to ignore such a fundamental feature for over a decade. Same for Mozilla.

There's already so much data stored about your browsing activity, this is just a matter of UI, not any major internal dev effort.

Interesting internal pages:

  - chrome://site-engagement/
  - chrome://media-engagement/
  - chrome://offline-internals/
  - chrome://snippets-internals/


Every time i see someone's bookmarks, its a huge unending unsorted list. Have we all given up on bookmarks? And what's Pocket?


My bookmark file has hashtags, dates, and summaries, so I can grep it (or isearch it in Emacs). That's enough to be extremely useful.


   - chrome://accessibility
   - chrome://dino 
   - chrome://discards


While I love this trick: this is yet another reason that I use Firefox on Android, and am so baffled and enraged that they broke extensions so badly. This seems like it may be mere inches away from a bugfix getting rid of it.

Modifying websites is one of the absolute best things about websites. You don't have to put up with sites' nonsense.


Performance and stability are still godawful on Firefox Android though.


Author here. Hello.

Bookmarklets are a massively under used feature. I love them :)


I was surprised to find out that Kill-sticky works with this method.

It was recently featured on HN: https://news.ycombinator.com/item?id=32998091


You used to be able to use a Chrome Mobile bookmarklet to trigger view source, which was kind of handy, but it got broken several years back unfortunately.


add this page as a bookmark then click edit to change to JavaScript url. try squarefree.com for some bookmarklets better than manifest v3.


Is a bookmarklet the same as pasting Javascript in to the browser console?


Pretty much


Does Chrome on Android have a browser console?


This seems convenient, but now I worry scammers will use this as another way of getting people to run arbitrary JavaScript on the client's device. 'Instructions' on how to do {x}, but it's also siphoning cookies off to an undisclosed backend.


This is the worry a lot of people have. The only real saving grace is that copying in JS to the address bar doesn't execute the code, and it's a bit of a pain to get bookmarklets bookmarked.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: