var scriptCode = new Array();
scriptCode.push('function mediathekVideoSwitch(videoID) {' );
scriptCode.push(' if(!videoID) {' );
scriptCode.push(' g_flows.reShowLastFlow();' );
scriptCode.push(" $('mediathek_toolbar_init').style.display = 'block';" );
scriptCode.push(" $('mediathek_toolbar_vid').style.display = 'none';" );
scriptCode.push(" $('mediathekPlayerContainer').style.display = 'none';" );
scriptCode.push(" $('mediathekPlayerActual').innerHTML = '';" );
scriptCode.push(" location.hash = '';" );
scriptCode.push(' } else {' );
scriptCode.push(" $('mediathekPlayerActual').innerHTML = '<iframe id=\"ytplayer\" type=\"text/html\" width=\"710\" height=\"440\" src=\"http://www.youtube.com/embed/' + videoID + '\" frameborder=\"0\" allowfullscreen webkitallowfullscreen mozallowfullscreen>';");
scriptCode.push(' g_flows.hideAllFlows();' );
scriptCode.push(" $('mediathek_toolbar_init').style.display = 'none';" );
scriptCode.push(" $('mediathek_toolbar_vid').style.display = 'block';" );
scriptCode.push(" $('mediathekPlayerContainer').style.display = 'block';" );
scriptCode.push(" location.hash = 'video=' + videoID;" );
scriptCode.push(' }' );
scriptCode.push('}' );
var script = document.createElement('script');
script.innerHTML = scriptCode.join('\n');
scriptCode.length = 0;
document.getElementsByTagName('head')[0].appendChild(script);
Ich hab auf die schnelle das UserScript angepasst, um möglichst das selbe zu tun wie die Chrome Erweiterung. Ist das genug? Oder soll es ein richtiges Firefox Add-On sein?
http://userscripts.org/scripts/show/86895
sauber, funzt perfekt!
#