Server IP : 192.64.118.117 / Your IP : 3.16.157.168 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/mobilecreationz.com/wp-content/plugins/wptubeskin/js/ |
Upload File : |
(function(){ tinymce.PluginManager.add( 'youtube_skin', function( editor, url ) { // Add a button that opens a window editor.addButton( 'youtube_skin_button', { title: 'WP Tube Skin', icon: true, image : '../wp-content/plugins/wptubeskin/Images/glyphicons_008_film.png', onclick: function() { var width = jQuery(window).width(), H = jQuery(window).height(), W = ( 720 < width ) ? 720 : width; W = W - 80; H = H - 84; tb_show( 'WP Tube Skin', '#TB_inline?width=' + W + '&height=' + H + '&inlineId=mygallery-form' ); } } ); } ); jQuery(function(){ var form = jQuery('<div id="mygallery-form"><table id="mygallery-table" class="form-table" style=" margin-left:10px">\ <tr>\ <td align="left" colspan="2" height="36px"><input type="text" name="src" id="awsm_vidurl" value="enter youtube URL" style="width:370px;" onfocus="if(this.value==\'enter youtube URL\')this.value=\'\';" onblur="if(this.value == \'\'){this.value =\'enter youtube URL\'}" />\ </td>\ </tr>\ <tr>\ <td align="left" width="285"><input type="radio" name="play" id="awsm_play_set1" value="1" checked="checked" /> autoplay</td>\ <td align="left" style="padding-top:4px;">Style: <select style="width:220px" name="skins" id="awsm_skins">\ <option value="1">Tablet 2 (black)</option>\ <option value="2">Tablet 2 (white)</option>\ <option value="5">Phone 5 (black)</option>\ <option value="6">Phone 5 (white)</option>\ <option value="7">Laptop Air</option>\ <option value="9">Desktop Computer</option>\ <option value="12">Nexus 4</option>\ <option value="13">HD LCD TV</option>\ <option value="16">PC Monitor</option>\ <option value="17">Shadow</option>\ </select>\ </td>\ </tr>\ <tr>\ <td align="left" style="line-height: 0; padding-top: 0px; padding-bottom: 20px;"><input type="radio" name="play" id="awsm_play_set2" value="0" /> do not autoplay</td>\ <td><a href="#" id="mypreview" style="padding-left: 43px; color:#0066FF;">preview video styles</a></td>\ </tr>\ <tr>\ <td align="left" colspan="2" width="300"><input type="radio" name="hide" id="awsm_ctr_set1" value="0" checked="checked" /> hide controls</td>\ </tr>\ <tr>\ <td align="left" colspan="2" style="line-height: 0; padding-top: 0px; padding-bottom: 20px;"><input type="radio" name="hide" id="awsm_ctr_set2" value="1" /> do not hide</td>\ </tr>\ <tr>\ <td align="left" colspan="2"><strong>Video size</strong></td>\ </tr>\ <tr>\ <td align="left" colspan="2"><input type="radio" name="size" id="awsm_vid_size1" value="1" checked="checked" /> small</td>\ </tr>\ <tr>\ <td align="left" colspan="2" style="line-height: 0; padding-top: 0px;"><input type="radio" name="size" id="awsm_vid_size2" value="2" /> medium</td>\ </tr>\ <tr>\ <td align="left" colspan="2" style="padding-top: 0px;" class="large_size"><input type="radio" name="size" id="awsm_vid_size3" value="3" /> large</td>\ </tr>\ </table>\ <p class="submit my-submit-btn" style="margin-left:30px; margin-top:0">\ <input type="button" id="mygallery-submit" class="button-primary" value="Insert" name="submit" />\ </p>\ </div>'); var table = form.find('table'); form.appendTo('body').hide(); form.find('#mygallery-submit').click(function(){ var options = { 'src' : '', 'play' : '', 'hide' : '', 'skins' : '', 'size' : '' }; var shortcode = '[awsmvid '; for( var index in options) { var value = table.find('#mygallery-' + index).val(); if(jQuery(":input[name="+index+"]").attr('type') == 'radio') { value = jQuery(":input[name="+index+"]:checked").val(); shortcode += index + '="' + value + '" '; } else if(jQuery(":input[name="+index+"]").attr('type') == 'text') { tmp = jQuery(":input[name="+index+"]").val(); if(tmp.indexOf('https://www.youtube.com/embed/') > -1){ value1 = tmp.replace("https://www.youtube.com/embed/",""); }else if(tmp.indexOf('http://www.youtube.com/embed/') > -1){ value1 = tmp.replace("http://www.youtube.com/embed/",""); }else if(tmp.indexOf('http://www.youtube.com/watch?v=') > -1){ value1 = tmp.replace("http://www.youtube.com/watch?v=",""); }else if(tmp.indexOf('https://www.youtube.com/watch?v=') > -1){ value1 = tmp.replace("https://www.youtube.com/watch?v=",""); }else{ value1 = tmp; } } else { value = jQuery("select[name="+index+"] option:selected").val(); shortcode += index + '="' + value + '" '; } } shortcode += ']' + value1 + '[/awsmvid]'; tinyMCE.activeEditor.execCommand('mceInsertContent', 0, shortcode); tb_remove(); }); }); })()