This repository is only intended for use in the phish.net forum (https://forum.phish.net). The code is written for use as a bookmarklet that quickly enables embedding of [audio]
tag'd audio files from various common streaming sites in the Phish community.
As of May 2020, the following sites are supported:
* SoundCloud changes CLIENT_IDs
associated with accounts from time to time; please create an issue or contact us if SoundCloud embeds stop working and we will update the CLIENT_ID
link on this page, and will replace the CLIENT_ID
in existing comments with the new one.
In order to generate a bookmarklet, view the latest version of the code and follow the instructions in the comments on lines 1-3:
// to make a bookmarklet out of this:
// copy all of this code and paste it into a JavaScript compressor like https://jscompress.com
// then put "javascript:" in front of what it gives you, and save that as the URL for a bookmark.
In other words, copy the latest version of the code and paste it here. Before compressing the code, you will need to replace the CLIENT_ID_GOES_HERE
bit (seen on line 84) with a valid SoundCloud client_id
– SoundCloud streaming will not work without one! Forum users are welcome to use the client_id
of the @PhishHacks account, which can be found here, or if you are clever enough you can figure out a valid client_id
by visiting the URL contained within an embed element for a downloadable track directly (e.g. this URL) and right clicking on the download button and copying the URL from there (which will contain a valid client_id
). Once you've overwritten CLIENT_ID_GOES_HERE
with a valid client_id
at JSCompress, click "Compress JavaScript" and copy the compressed code to your clipboard. Now you're ready to create a new bookmark in your web browser – for the 'Address' or 'URL', type javascript:
then paste in the JSCompress'd version of the code you just compressed. There should not be a space after javascript:
before your pasted code, and there should not be any HTML URL encoding characters present in the pasted address, e.g. %20
instead of a space, %2F
instead of a slash.
NOTE: We can only confirm that this bookmarklet works in the following browsers:
- Chrome
- Opera
- Firefox (but must have recent builds – old versions do not support bookmarklets)
- Brave
Using this bookmarklet is (purposefully) remarkably simple. Once you have set it up properly, head to the streaming site of choice and start playing the song you want to embed. (NOTE: for SoundCloud embedding to work, you must be playing from the SoundCloud song page, not the universal player at the bottom of your SoundCloud browsing session. In other words, clicking play here will work, but clicking play here will not.) Once your track is playing, simply click your bookmarklet once – you will either get a message that the tag has been copied to the clipboard, or that it wasn't able to be copied. If it doesn't work, you could be using an outdated web browser, or you may not have waited for the page to load, or there may be another issue. If you are sure the issue is with the bookmarklet code and not on your end, go ahead and create an issue on this repository and we'll see if we can troubleshoot for you. Assuming you get a confirmatory alert that the tag was copied to your clipboard, simply paste it into a comment box on phish.net without modifying anything between the [audio]
tags – tweaking the title of the track won't affect anything (unless you inadvertantly mess up one of the [tag]
s), but please don't be a jerk and mislabel something to mislead people into playing something they don't want to hear.
@ucpete was playing around on phish.net one day in early 2017, when he guessed that an [audio]
tag might work, so he tested it in the forum. People's minds were blown, including his pal (and much better software developer) @sevenpounds, who quickly wrote a one-line bookmarklet to make the process a little easier. Shortly thereafter, Xander added functionality for other sites, Pete added the functionality to automatically put the [audio]
tag into the user's clipboard to save an error prone step, and from there it's blossomed into a powerful, elegant, user-friendly tool for phish.net forum users. Stay tuned more changes: some may be cosmetic tweaks, while others may be adding additional streaming sites.