From 2540b23c26f79ed8b223d6ec8b00ca4bfc76e7ef Mon Sep 17 00:00:00 2001 From: Fabio Varesano Date: Sun, 18 Jun 2006 14:16:10 +0000 Subject: Added file video.js for javascript functions. Contains several Internet Explorer workarounds. --- video.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 video.js (limited to 'video.js') diff --git a/video.js b/video.js new file mode 100644 index 0000000..d4d5e11 --- /dev/null +++ b/video.js @@ -0,0 +1,38 @@ +// $Id$ +/** + * @file + * This file contains some useful functions which fixes different + * Internet Explorer strange behaviours. + * This file is inclueded at each video play. + * See functions video_play and theme_video_get_script on video.module + * file for more informations. + * + * @author Fabio Varesano +*/ + +//We do this code only on Internet Explorer. +if (document.all) { + + // Fix for the "Click to interact with ActiveX control" message on IE + var objects = document.getElementsByTagName( 'object' ); + for ( var i = 0; i < objects.length; i++ ) { + var obj = objects[ i ]; + var clone = obj.cloneNode( true ); + var parent = obj .parentNode; + var sibling = obj .nextSibling; + parent.removeChild( obj ); + parent.insertBefore( clone, sibling ); + clone.outerHTML = clone.outerHTML; + } + + + function InsertQuicktimeVideo(vidfile, height, width) + { + document.writeln(''); + document.writeln(''); + document.writeln(''); + document.writeln(''); + document.writeln('\n'); + } + +} -- cgit v1.2.3