From b5965d50ba561eff35b1d741b8ca9d39c460e436 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Sat, 24 Mar 2012 17:32:27 -0400 Subject: [PATCH] duolingo-html5-audio started --- duolingo-html5-audio.user.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 duolingo-html5-audio.user.js 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); +})(); -- 1.7.10.4