Skip to content

Instantly share code, notes, and snippets.

@guyru
Created April 14, 2015 17:58
Show Gist options
  • Save guyru/0743b86df1923d79720d to your computer and use it in GitHub Desktop.
Save guyru/0743b86df1923d79720d to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Collins download pronunciation links
// @namespace http://www.guyrutenberg.com
// @description Add direct audio controls to Collin's Dictionary pronunciations.
// @include http://www.collinsdictionary.com/dictionary/*
// @version 1.0
// @grant none
// ==/UserScript==
//
//
// Change Log
// ==========
// 1.0: 2015-04-14
// * Initial release
var mp3_url = $('span.pron img').attr('onclick').match(/\/sounds.*mp3/);
$('span.pron').append('<audio controls src="' + mp3_url + '"></audio>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment