Piperka blog


This time I'll be talking about bookmarklets. In short, they're browser bookmarks with a bit of javascript embedded in them to pass your current page to another site. Strictly speaking they're not a site feature at all but a browser one but sites provide the targets for them. Plenty of sites beyond Piperka use them and I certainly didn't invent them. In Piperka's case, it's a way to pass an archive page to Piperka to try and set a bookmark with one click.

Piperka has had instructions for setting up a bookmarklet since its beginning though I took them offline along with the new backend code launch in February. I've readded them and there's a link to that page on the updates page now. The reason I didn't promote them for a while was that I did a change some years ago where Piperka started to ask for confirmation after using a bookmarklet. It was all for user protection in case some other site tried to silently use your session to manipulate your user data.

It was still pretty suboptimal to have Piperka nag with an extra step whenever you used a bookmarklet. I wasn't happy with how the bookmarklets worked and didn't want to drop the CSRF protection either. Bookmarklets are back and I've added a user specific token in them to allow setting bookmarks again with a single click. Even if you had a bookmarklet defined already you may want to grab the new one. It's a small thing but my focus just was elsewhere until now.

I've also added a new bookmarklet, for going from an archive page directly to Piperka Reader. I've also added the option to launch Reader from the updates page. Reader with it content embedding is a bit apart from the traditional way of how Piperka operates and I'm still somewhat leery to bring it to closer user attention. It's useful but I suppose it's more invasive from comic authors' standpoint when compared to just taking people to their sites. If any authors read this then I'd like to hear your thoughts on the matter. I'll certainly add a blacklist for its usage if someone objects.

Other than bookmarklets, I've done some long standing code cleanups and fixed some minor issues that have been nagging for a long time. Like adding the missing second upmost tick to the readers history charts on info pages and a sanity check for making the readers list clickable when it wouldn't display anything. Piperka Map is once again updating as it had frozen in early 2017 when comics' amount hit the multiple of a buffer size and it encountered an uninitialised pointer in an array. A very C-like bug indeed. Also, I fixed the map to properly use the full browser window. Kudos to Firefox developers, my SVG map implementation was downright sluggish back when I last looked at it and it was almost as good as Chrome now.

I've edited the outgoing links sections for comics. Google Plus is gone and Ko-fi was added.

All some pretty small things that have been waiting for that moment of attention until now. I'm not done yet. I'll be focusing on some new feature development next and I'll let you know more when I have something to show.

submit to reddit
Thu, 08 Nov 2018 12:54:20 UTC