Sha256: 6e8ad1ba5a8332a4763f6b39c8a9cdeb4c5705204e70dc887603b2a6795d1f92

Contents?: true

Size: 1.9 KB

Versions: 17

Compression:

Stored size: 1.9 KB

Contents

tinyMCEPopup.requireLangPack();var YoutubeDialog={init:function(){var a=document.forms[0];a.youtubeURL.value=tinyMCEPopup.editor.selection.getContent({format:"text"});$(".share-embed-size-list li.share-embed-size").each(function(){$(this).click(function(){$("li.share-embed-size").removeClass("selected");$(this).addClass("selected")})})},insert:function(){var a=$("#youtubeURL").val();if(a===null){tinyMCEPopup.close();return}var b,c,d,e,f;c=a.match("[\\?&]v=([^&#]*)");b=$.trim(c===null?a:c[1]);if(b===""){tinyMCEPopup.close();return}d=$("li.selected label input").attr("data-width");e=$("li.selected label input").attr("data-height");if(d==-1&&e==-1){d=$("input.share-embed-size-custom-width").val();e=$("input.share-embed-size-custom-height").val()}if(d==""||d=="undefined"||e==""||e=="undefined"){alert("Error: No size selected");tinyMCEPopup.close();return}f=$("input[name='yType']:checked").val();if(f==""||f=="undefined"){alert("Error: No type selected");tinyMCEPopup.close();return}var g='<iframe width="'+d+'" height="'+e+'" src="http://www.youtube.com/embed/'+b+'?wmode=transparent" frameborder="0" allowfullscreen></iframe>';var h='\n        <object width="'+d+'" height="'+e+'">\n\n            <param name="movie" value="http://www.youtube.com/v/'+b+'?version=3&hl=en_US"></param>\n\n            <param name="allowFullScreen" value="true"></param>\n\n            <param name="allowscriptaccess" value="always"></param>\n\n            <param name="wmode" value="transparent"></param>\n\n            <embed src="http://www.youtube.com/v/'+b+'?version=3&hl=en_US" type="application/x-shockwave-flash" width="'+d+'" height="'+e+'" allowscriptaccess="always" allowfullscreen="true"></embed>\n\n        </object>';if(f=="iframe"){tinyMCEPopup.editor.execCommand("mceInsertContent",false,g)}else{tinyMCEPopup.editor.execCommand("mceInsertContent",false,h)}tinyMCEPopup.close()}};tinyMCEPopup.onInit.add(YoutubeDialog.init,YoutubeDialog)

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
camaleon_cms-1.0.4 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-1.0.3 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-1.0.2 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-1.0.1 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-1.0 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.2.1 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.2.0 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.9 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.8 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.7 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.6 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.5 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.4 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.3 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.1.2 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.0.2 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js
camaleon_cms-0.0.1 app/assets/stylesheets/tinymce/plugins/youtubeIframe/js/scripts.js