But times change, and bookmarklets are mostly dead. They’re not all dead yet. I expect I’ll still be able to use simple ones, like pinboard.in‘s, for a long time to come. But a new security regime limits the scope of what bookmarklets can do, and is forcing developers to create browser extensions instead — extensions that must be created and deployed differently for each browser.
So the realm of web applications that extend the browser is now becoming as balkanized as the realm of mobile apps. Developers target the dominant platform first — currently, that’s Chrome — and then port their extensions to other browsers as and when they can.
There’s another way to add behavior to a web page, though. You can send the page through an intermediate server (a proxy) that injects that behavior as the bookmarklet or extension would do. The Hypothesis proxy is via.hypothes.is, and you can use it to activate annotation for any web page — including this one — like so:
The nice thing about this combo URL is that you can share the annotated page along with its annotation layer. Of course there are tradeoffs:
– Properly rewriting all the URLs in the proxied page is a tricky business.
– You can’t annotate pages behind paywalls (as you can with our bookmarklet and Chrome extension).
– You still need a way to activate the annotation layer for the current page. (You can use a bookmarklet to redirect to the proxy, but … sigh.)
The upshot is that we’re struggling to simplify the decision tree that Hypothesis users must traverse. You want to activate annotation for your current page? If in Chrome, install the extension, otherwise for Firefox or Safari or IE use the bookmarklet, unless the page enforces Content Security Policy, in which case use the proxy, unless the page is behind a paywall, in which case, sorry, you’re out of luck.
And that’s just for the desktop! Mobile browsers make things even crazier. I’m able to perform the gymnastics required to use the Hypothesis bookmarklet on my Windows Phone, on my iPhone, and (most acrobatically) on my Android tablet, and I really need to document those procedures, but it’s so depressing I’ve avoided doing so.
What seems most promising, for mobile browsers, is to add Hypothesis as an option that shows up when you ask to Share a web page. Activating annotation for the current page isn’t really Sharing, but the Share mechanism looks like the sanest way to redirect through the proxy, which in turn looks like the sanest way to activate the annotation layer in mobile browsers.
It looks reasonably straightforward to create an Android app that shows up when you Share a page and broadcasts the intent to view the proxied version of that page. Things look a bit more complex on iOS. Should there be a Safari-specific extension that redirects to the proxy? A system-wide Share extension that Chrome could also use? Both?
Of course activating Hypothesis on the mobile browser is only half the battle. As a sidebar-based app we manage pretty well on the desktop and large tablets, but are uncomfortable on smaller screens. If we’re routing through a proxy anyway, maybe the proxy should also do a Readability-style rewrite to simplify the page. We’re good at fuzzy anchoring and can anchor annotations to different representations of the “same” document.
There’s lots to do, and while bookmarklets will continue to help us do it, their era is over. Browsers are more standards-compliant than ever, which makes our mission to bring an annotation layer to the web easier than it would have been five or ten years ago. But browsers are now also less easily extensible and that’s a new challenge.