Bookmarklet to render and transpose ABC

Bookmarklet to render and transpose ABC

Hi friends,

when you encounter some ABC snippets somewhere on the internet and want to see the dots (and maybe transpose it to another key), you laboriously have to first open the ABC editor of your choice, create a new tune, and copy/paste it over. Life ain’t easy. :~|

So I wrote a small bookmarklet that renders selected ABC snippets in a modal right on the page… maybe you’ll find it useful too:

https://github.com/m3g4p0p/abc-select-bookmarklet

Unfortunately, browser support isn’t the best right now… in chrome and opera it should work out of the box, but in firefox you’ll have to set some flags in the config. In IE and edge it won’t work at all.

Anyway, bug reports and feature requests are very welcome — either here, or by opening an issue on github directly if you have an account.

All the best
Sebastian

Re: Bookmarklet to render and transpose ABC

Awesome!

Re: Bookmarklet to render and transpose ABC

Trying this in Opera but can’t figure out how to make it work from the instructions given, any advice?

Re: Bookmarklet to render and transpose ABC

Nicely done, sebastian! I wrote a similar bookmarklet many years ago, which took selected ABC and brought it up in the old concertina.net ABC to dots converter, but that one stopped working a few years ago, and yours is much slicker, especially with the transposition, etc!

Re: Bookmarklet to render and transpose ABC

Thanks all for your feedback! :~)

@Tonypid if you followed the instructions that should work… can you give me the opera version are you using, and maybe send me the output from the browser console in a PM (press ctrl+shift+j on windows and linux / cmd+opt+j on Mac)?
I’d be very keen to find out what’s going wrong here!

@Reverend thanks, and yes I actually used your bookmarklet quite heavily — it was extremely useful and certainly part of the motivation for this one! :~) Thinking about it, I really should have mentioned it in the OP…

Re: Bookmarklet to render and transpose ABC

No worries on my part, sebastian! Glad to have been part of the inspiration! I wrote my bookmarklet as an experiment after a discussion on the forums here about bookmarklets, if I remember correctly. I have very little use for dots anyway, so I never really used it much, but I know some other people did. ;-)

Re: Bookmarklet to render and transpose ABC

I don’t understand the instructions, either. I’m using Opera 54.0.2952.64 under Mac OS X 10.12.6 64-bit.
What page should I be on when creating a new bookmark? When pasting the contents of dist/main.bookmarklet in the URL field, the browser doesn’t recognize it as a URL and attempts a Google search for the string. Should it be pasted after something else to direct it to a web page?

Re: Bookmarklet to render and transpose ABC

@GaryAMartin it doesn’t matter on which page you are… if you can only create bookmarks for the current page, you can still right click the bookmark and then edit the address. The contents of the bookmarklet should then be pasted as is — it already starts with "javascript:" (as opposed to "http:" or "mailto:"), which tells the browser to just execute the code rather than redirect somewhere. If the bookmark triggers a google search instead, it sounds like that part is missing…