summaryrefslogtreecommitdiff
path: root/roundcubemail/program/js/tiny_mce/plugins/media/jscripts
diff options
context:
space:
mode:
authorestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-10 16:33:50 +0000
committerestadtherr <estadtherr@208e9e7b-5314-0410-a742-e7e81cd9613c>2007-12-10 16:33:50 +0000
commita7aaf57b0c34311ceb8a5cf7a4b0b9fd11042f91 (patch)
tree7cc805098345e4a35743d24520d996ffe3f14ba8 /roundcubemail/program/js/tiny_mce/plugins/media/jscripts
parent7a790a51bb6acd65b193660367c8af3629256907 (diff)
upgrade TinyMCE version to latest
git-svn-id: https://svn.roundcube.net/trunk@939 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js/tiny_mce/plugins/media/jscripts')
-rw-r--r--roundcubemail/program/js/tiny_mce/plugins/media/jscripts/media.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/roundcubemail/program/js/tiny_mce/plugins/media/jscripts/media.js b/roundcubemail/program/js/tiny_mce/plugins/media/jscripts/media.js
index 691a8bdbd..3c0073a59 100644
--- a/roundcubemail/program/js/tiny_mce/plugins/media/jscripts/media.js
+++ b/roundcubemail/program/js/tiny_mce/plugins/media/jscripts/media.js
@@ -280,10 +280,14 @@ function getType(v) {
fo = tinyMCE.getParam("media_types", "flash=swf;shockwave=dcr;qt=mov,qt,mpg,mp3,mp4,mpeg;shockwave=dcr;wmp=avi,wmv,wm,asf,asx,wmx,wvx;rmp=rm,ra,ram").split(';');
// YouTube
- if (v.indexOf('http://www.youtube.com/watch?v=') == 0) {
+ if (v.indexOf('http://www.youtube.com/watch?v=') == 0 || v.indexOf('http://youtube.com/watch?v=') == 0) {
f.width.value = '425';
f.height.value = '350';
- f.src.value = 'http://www.youtube.com/v/' + v.substring('http://www.youtube.com/watch?v='.length);
+
+ v = v.replace('http://youtube.com/watch?v=', '');
+ v = v.replace('http://www.youtube.com/watch?v=', '');
+
+ f.src.value = 'http://www.youtube.com/v/' + v;
return 'flash';
}