X-Git-Url: https://jasonwoof.com/gitweb/?p=userscripts.git;a=blobdiff_plain;f=duolingo-html5-audio.user.js;fp=duolingo-html5-audio.user.js;h=935d023f44e68f1e8abafcaf3748e269ffa83326;hp=0000000000000000000000000000000000000000;hb=b5965d50ba561eff35b1d741b8ca9d39c460e436;hpb=64c68d613f348ca55e94d3d6d44a0aa7a07aa16a diff --git a/duolingo-html5-audio.user.js b/duolingo-html5-audio.user.js new file mode 100644 index 0000000..935d023 --- /dev/null +++ b/duolingo-html5-audio.user.js @@ -0,0 +1,29 @@ +/* +* Written by JasonWoof 2012 public domain +*/ + +// ==UserScript== +// @name duolingo html5 audio +// @namespace http://patcavit.com/greasemonkey +// @description convert flash player to html5 audio +// @include http://duolingo.com/* +// ==/UserScript== + +(function() +{ + setTimeout(function() { + var $ = window.jQuery; + console.log('tick'); + var speaker = $('#big-speaker'); + speaker.children('div').each(function() { + var el = $(this); + var id = el.attr('id'); + if(id && id.substr(0, 13) == 'speaker-audio' && id.substr(id.length - 6) != 'button') { + var new_el = '
x
'; + speaker.append($(new_el)); + } + }); + }, 5000); +})();