<!DOCTYPE html>
<html>
<title>Clicking on YouTube Embedded Iframe - RJM Programming - June, 2016 - via Google YouTube API https://developers.google.com/youtube/iframe_api_reference</title>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<script type='text/javascript'>
var stduration=0, sdivcbi='', sparedur=-1, okone=1, lastnext=-1, relcount=0, gsugi=-1, pfdone=false, kkpil=[], iload=0, eightthous=2000;
var hgrip='', lasthgriprec='', hgans='', hgcnt=0, lasthgrip='', swin=null;
var startagain=false, psuf='', mletter='m', uletter='U', numericals='', numericalssamecount=0, prevretry='', lastokn=0, thatisit=false, inplaying=false;
var ouraidis='', ouriframeidis='', altplayer=null, isis=[], jsis=[];
var subduration=999999, lastmediao=null, wasmlh='', lastinvl='', xblanks='', kwq=-1, aminytnon=false, wasaminytnon=false, contc=0;
var pvid='', thesewords=[], jonum=-1, kkp=0;
var isnextanswer=location.search.split('nextanswer=')[1] ? decodeURIComponent(location.search.split('nextanswer=')[1].split('&')[0]) : '';
var beenbefore=true;
var wasno='';
var wasdur='';
var wasvid='';
var wasstart=('');
var wasdos=true;
var newdos=true;
var newno=('');
var newdur=('');
var newvid='';
var newstart=('');
var wastitle='';
var newtitle='';
var preloc=null;
var curvaridx=0;
var variants=['cannotenda2','cAnnotenda2','caNnotenda2','canNotenda2','cannOtenda2','cannoTenda2','cannotEnda2','cannoteNda2','cannotenDa2','cannotendA2','cANnotenda2','caNNotenda2','canNOtenda2'];
var variantt=['cannotenda2','cAnnotenda2','caNnotenda2','canNotenda2','cannOtenda2','cannoTenda2','cannotEnda2','cannoteNda2','cannotenDa2','cannotendA2','cANnotenda2','caNNotenda2','canNOtenda2'];
var variantu=['cannotenda2','cAnnotenda2','caNnotenda2','canNotenda2','cannOtenda2','cannoTenda2','cannotEnda2','cannoteNda2','cannotenDa2','cannotendA2','cANnotenda2','caNNotenda2','canNOtenda2'];
var origlenv=eval('' + variants.length);
var mtypes = ["video/mp4","audio/x-aiff","audio/wav","audio/x-wav","audio/x-pn-realaudio","audio/x-mpegurl","audio/x-aiff","audio/mpeg","audio/mid",
"audio/basic","audio/ogg","video/x-sgi-movie","video/x-msvideo","video/quicktime","audio/mp3","video/mp4","video/mpeg",
"video/x-la-asf","video/ogg","video/webm","audio/mp4", "image/jpeg", "image/jpeg", "image/png", "image/gif", "image/bmp", "image/tif", "application/pdf"];
var mexts = [".mp4",".aiff",".wav",".wav",".ram",".m3u",".aiff",".mp3",".rmi",
".snd",".ogg",".movie",".avi",".mov",".mp3",".m4v",".mpeg",
".lsx",".ogv",".webm",".m4a", ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".tif", ".pdf"];
var urld=document.URL.replace('%23http','#http'), thistt='', twords=[], purld='', turld='', playingvaridx=0, lastnx=-1;
thistt='';
if (urld.indexOf('#') != -1) {
//alert('lh=' + decodeURIComponent(('' + location.hash).replace(/^\#/g,'')) + '!');
if (decodeURIComponent(('' + location.hash).replace(/^\#/g,'')).indexOf(' ') == 0 && eval('' + decodeURIComponent(('' + location.hash).replace(/^\#/g,'')).split(' ').length) > 2) {
twords=decodeURIComponent(('' + location.hash).replace(/^\#/g,'')).split(' ');
//alert(twords[eval(-1 + twords.length)]);
thistt=decodeURIComponent(('' + location.hash).replace(/^\#/g,'')).replace(' ' + twords[eval(-1 + twords.length)], '').split(twords[eval(-1 + twords.length)])[0].split('#')[0];
//alert(thistt);
urld=urld.replace(encodeURIComponent(thistt), '').replace(/\#\%20/g,'#').split(encodeURIComponent(twords[eval(-1 + twords.length)]))[0] + encodeURIComponent(twords[eval(-1 + twords.length)]);
//alert(urld);
thistt=thistt.trim();
}
}
var relh='', yeslook=false, conturls=[], contalturls=[], conttitle=[], contstarts=[], contprefixes=[], contsuffixes=[], contdurs=[], curcont=-1;
var butisparent='';
if (urld.indexOf('#data:') != -1 || urld.indexOf('#data' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (urld.indexOf('#http:') != -1 || urld.indexOf('#http' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (urld.indexOf('#https:') != -1 || urld.indexOf('#https' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (urld.indexOf('#//') != -1 || urld.indexOf('#' + encodeURIComponent('//')) != -1) {
yeslook=true;
} else if (urld.indexOf('#../') != -1 || urld.indexOf('#' + encodeURIComponent('../')) != -1) {
yeslook=true;
} else if (urld.indexOf('#/') != -1 || urld.indexOf('#' + encodeURIComponent('/')) != -1) {
yeslook=true;
} else if (urld.indexOf('#www.') != -1 || urld.indexOf('#www' + encodeURIComponent('.')) != -1) {
yeslook=true;
}
if (!yeslook) {
if (window.parent) {
yeslook=stageone('');
}
}
stagetwo('');
if (window.parent) {
ouraidis=parent.location.search.split('theaid=')[1] ? parent.location.search.split('theaid=')[1].split('&')[0] : '';
ouriframeidis=parent.location.search.split('theiframeid=')[1] ? parent.location.search.split('theiframeid=')[1].split('&')[0] : '';
if (('#' + parent.location.hash).indexOf('#inp') != -1 || ('' + parent.location.search.indexOf('&huh')) != -1 || ('' + parent.location.search.indexOf('&hxh')) != -1) {
startagain=true;
if (('#' + parent.location.hash).indexOf('#inp') != -1) {
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).setAttribute('data-loop', 'y');
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).style.fontSize='7px';
}
//ttt.title=('found');
}
if (ouraidis != '' && ouriframeidis != '' && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') == '') {
location.hash='#inp' + ouraidis + '_' + ouriframeidis;
//ttt.title=('Found');
if (('' + parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).getAttribute('data-loop')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
//ttt.title=('FounD');
startagain=true;
} else if (parent.parent.document.getElementById(location.hash.replace(/\#/g,''))) {
//ttt.title=('FoUND');
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).style.fontSize='7px';
if (('' + parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).rows) == "4") {
parent.parent.document.getElementById(location.hash.replace(/\#/g,'')).rows="5";
}
}
}
}
var fauxpas_w=null, fauxmore='', fauxdef='', fauxdefcnt=0, lastfauxdef='';
var parentdocumentURL='';
if (window.parent) {
parentdocumentURL=parent.document.URL;
}
var ttt=document; //sometimes we will use parent.parent.document.title to write to rather than top.document.title
if (window.top) {
ttt=top.document;
if (('' + ttt.title).indexOf('External Javascript ') == 0 || ('' + ttt.URL).replace('/wordpress', '/ITblog').toLowerCase().indexOf('/itblog') != -1) {
ttt=parent.parent.document;
}
}
var etg=false, pwo=null;
var parentvidtitlespassed=[];
var endcnt=-1;
var onestodourl='';
var onespause=20;
var onestodoprefix=location.search.split('andthen=')[1] ? ('&andthen=' + decodeURIComponent(location.search.split('andthen=')[1].split('&')[0])).substring(0,9) : '';
var onestodosuffix=location.search.split('andthen=')[1] ? decodeURIComponent(location.search.split('andthen=')[1].split('&')[0]) : '';
var prevonestodosuffix=onestodosuffix;
var iframegridmode=false;
var urlis='';
var dostumps=true;
var atnextend=false;
var vwidth=640;
var vheight=390;
var hone=1, lookedat=false;
var vidarr;
var one=0;
var nextvidi=-1;
var cntpause=0;
var onepause=0;
var tobechecked=null;
var thistext='';
var nexttext='2';
var nextvid='';
var prevvid='';
var nexturl='';
var prevurl='';
var prepurd='';
var of=' 1 of 1 ';
var cnt=0;
var doseek=0;
var toggle=1, thispt='0';
var secscnt=location.search.split('start=')[1] ? location.search.split('start=')[1].split('&')[0] : 0;
var oursecscnt=secscnt; // for Karaoke purposes ... September, 2016
if (('' + oursecscnt) != '0') {
console.warn('here at non 0');
doseek=eval('' + oursecscnt);
}
var suffix="#t=00m00s";
var presuffix="";
var wo=null;
var yturl='';
var playtime=4000;
var delay=1300;
var vlen=0;
var eventtarget=null;
var duration=-1;
var previd="7o9wvYXR3n0";
var vid="7o9wvYXR3n0";
var play_list_id='';
var hm=2;
var lastplayer='player';
var anymore='';
var yes_esp=false;
var oknow=true;
var gtn="Go to next on the list";
var pgtn="Go to previous on the list";
var kpi=-9;
var player;
var lastlfmcs='';
var lastvolume=-1;
var maxvolume=-1;
var ipbit='';
var wpp=null, wpwp=null;
var comeval='', oktoivid=true, vidarrv=[], vidstarts=[], viddurs=[], vidtitle=[], viddos=[], ivid=0, firstdelay=-1, ismobileplaylistplay=false, firststdone=false, lastshuffle=-1, firstshuffle=false;
var midpre='';
if (('' + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).indexOf('WEBVTT%20FILE%0A%0A') != -1) {
midpre='WEBVTT%20FILE%0A%0A';
}
var prefx='', stimes=[], etimes=[], stimesf=[], etimesf=[], alttimesubtitles=[], altsubtimesubtitles=[], timesubtitles=[], subtimesubtitles=[], cursubi=-1, xhr=null, cursecselapsed=-1.0, enforcedtimeis=-1.0, isnotplaying=true, createdlh='';
if (window.parent.parent) {
if (parent.parent.document.getElementById('srt') && parent.parent.document.getElementById('diaudiov') && parent.parent.document.getElementById('diaudio')) { wpp=window.parent.parent; }
if (parent.parent.document.getElementById('srt') && !parent.parent.document.getElementById('diaudiov') && parent.parent.document.getElementById('diaudio')) { wpwp=window.parent.parent; }
if (parent.parent.document.getElementById('youtubeid') && parent.parent.document.getElementById('srt') && (('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#/g,'') == '' || ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').indexOf('#srt=WEBVTT') != -1)) {
if (parent.parent.document.getElementById('youtubeid').value != '') {
//alert('45 ' + parent.parent.document.getElementById('srt').value);
if (parent.parent.document.getElementById('srt').value.indexOf('WEBVTT') == 0 && parent.parent.document.getElementById('srt').value.indexOf('1~') != -1) {
//location.hash='#srt=1' + encodeURIComponent('' + String.fromCharCode(10) + parent.document.getElementById('srt').value.split('1~')[1].replace(/\~/g, String.fromCharCode(10)));
//alert(parent.parent.document.getElementById('srt').value);
prefx='=1' + encodeURIComponent('' + String.fromCharCode(10) + parent.parent.document.getElementById('srt').value.split('1~')[1].replace(/\~/g, String.fromCharCode(10)) + String.fromCharCode(10)) + '&';
//alert(decodeURIComponent(prefx));
} //else {
//location.hash='#srt=' + encodeURIComponent(parent.document.getElementById('srt').value.replace(/\~/g, String.fromCharCode(10)));
//}
}
}
}
var ingif='', gduration=0;
var gsrt=( ('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).indexOf('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))) != -1 ? processsrt(midpre + '1' + encodeURIComponent(String.fromCharCode(10)) + ('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).split('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))[1].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) ).replace(/\+/g, ' ') : (('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).toLowerCase().replace(encodeURIComponent('.') + 'vtt',encodeURIComponent('.') + 'srt').indexOf(encodeURIComponent('.') + 'srt') != -1 ? processsrt(('' + prefx + location.search + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'')).replace(encodeURIComponent('.') + 'SRT','SRT' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'vtt','vtt' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'VTT','VTT' + encodeURIComponent('.') + 'srt').split(encodeURIComponent('.') + 'srt')[0].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) : ''));
var ggsandc='Subtitle and caption', ggsoc=null, zhr=null;
if (gsrt == '' && window.parent) {
if (parent.document.URL.indexOf('/karaoke_') != -1) {
var parentdocumentURL=parent.document.URL.replace('#WEBVTT', '#srt=WEBVTT');
//alert('HeRe ' + midpre + ' ' + parent.document.URL.slice(-350));
//var xzz=prompt(parent.document.URL,parent.document.URL);
gsrt=( ('' + parentdocumentURL.replace(/^undefined/g,'').replace(/^null/g,'')).indexOf('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))) != -1 ? processsrt(midpre + '1' + encodeURIComponent(String.fromCharCode(10)) + ('' + parentdocumentURL.replace(/^undefined/g,'').replace(/^null/g,'')).split('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))[1].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) ).replace(/\+/g, ' ') : (('' + parentdocumentURL.replace(/^undefined/g,'').replace(/^null/g,'')).toLowerCase().replace(encodeURIComponent('.') + 'vtt',encodeURIComponent('.') + 'srt').indexOf(encodeURIComponent('.') + 'srt') != -1 ? processsrt(('' + parentdocumentURL.replace(/^undefined/g,'').replace(/^null/g,'')).replace(encodeURIComponent('.') + 'SRT','SRT' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'vtt','vtt' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'VTT','VTT' + encodeURIComponent('.') + 'srt').split(encodeURIComponent('.') + 'srt')[0].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) : ''));
}
}
function getcurv() {
return curvaridx;
}
function setcurv(viai) {
if (viai >= eval('' + variants.length)) {
while (viai >= eval('' + variants.length)) {
variants.push(variants[eval(viai % origlenv)]);
variantt.push(variants[eval(viai % origlenv)]);
variantu.push(variants[eval(viai % origlenv)]);
}
}
curvaridx=eval('' + viai);
}
function getvart(viai) {
if (viai >= eval('' + variants.length)) {
while (viai >= eval('' + variants.length)) {
variants.push(variants[eval(viai % origlenv)]);
variantt.push(variants[eval(viai % origlenv)]);
variantu.push(variants[eval(viai % origlenv)]);
}
}
return '' + variantt[viai];
}
function getvaru(viai) {
if (viai >= eval('' + variants.length)) {
while (viai >= eval('' + variants.length)) {
variants.push(variants[eval(viai % origlenv)]);
variantt.push(variants[eval(viai % origlenv)]);
variantu.push(variants[eval(viai % origlenv)]);
}
}
return '' + variantu[viai];
}
function getvars(viai) {
if (viai >= eval('' + variants.length)) {
while (viai >= eval('' + variants.length)) {
variants.push(variants[eval(viai % origlenv)]);
variantt.push(variants[eval(viai % origlenv)]);
variantu.push(variants[eval(viai % origlenv)]);
}
}
return '' + variants[viai];
}
function whichnonyt(sugi) {
if (gsugi >= 0) { sugi=gsugi; gsugi=-1; }
return sugi;
}
function zstateChanged() {
var lastrelcount=relcount;
if (zhr.readyState == 4) {
if (zhr.status == 200) {
if (zhr.response.indexOf('<span>') != -1) {
var thisrelcount='' + zhr.response.split('<span>')[1].split('<')[0];
console.warn('z:' + thisrelcount);
//top.document.title+=thisrelcount;
if (thisrelcount != lastrelcount) { relcount=eval('' + thisrelcount); if (relcount > 0) { monitorplh(); } }
}
}
}
}
function ajaxit() {
//setTimeout(function(){ document.getElementById('ibizzo').src='/HTMLCSS/signature_signature.php?an_i_thingo=&which_i_thingo=&rand=' + Math.floor(Math.random() * 19878654); }, 8000);
zhr = new XMLHttpRequest();
zhr.onreadystatechange=zstateChanged;
zhr.open('get', '/HTMLCSS/signature_signature.php?which_i_thingo=&an_i_thingo=&rand=' + Math.floor(Math.random() * 198786), true);
zhr.send(null);
}
function mapinners(pduis) {
var othh='', ssi=0, huhvb='#';
if (pduis != pduis.replace('%23http','#http').replace(/\#http$/g,'')) {
var pdus=[];
if (pduis.indexOf('&kk') != -1) {
pduis.split('&kk');
ssi=7;
huhvb='nda2';
} else {
pduis.split('&i');
}
for (var ih=1; ih<pdus.length; ih++) {
if (pdus[ih].split('=')[1].substring(ssi).split('&')[0].split('#')[0].indexOf(encodeURIComponent(huhvb)) != -1) {
othh+='#' + pdus[ih].split('=')[1].substring(ssi).split('&')[0].split('#')[0].split(encodeURIComponent(huhb))[1];
}
}
if (othh != '') {
//alert(othh + ' ... ' + (pduis.replace('%23http','#http').replace(/\#http$/g,'') + othh + '#http').slice(-120));
return pduis.replace('%23http','#http').replace(/\#http$/g,'') + othh + '#http';
}
}
return pduis;
}
function stageone(invl) {
if (!yeslook || invl != '') {
if (invl != '') { lastinvl=invl; yeslook=false; } else { lastinvl=''; }
if (invl != '') {
purld=invl.replace('%23http','#http').replace(/\#http$/g,'');
} else {
prepurd=parent.document.URL.replace('%23http','#http').replace(/\#http$/g,'');
purld=mapinners(parent.document.URL).replace('%23http','#http').replace(/\#http$/g,'');
}
thistt='';
if (purld.indexOf('#') != -1) {
//alert('lh=' + decodeURIComponent(('' + location.hash).replace(/^\#/g,'')) + '!');
if (decodeURIComponent(('' + parent.location.hash).replace(/^\#/g,'')).indexOf(' ') == 0 && eval('' + decodeURIComponent(('' + parent.location.hash).replace(/^\#/g,'')).split(' ').length) > 2) {
twords=decodeURIComponent(('' + parent.location.hash).replace(/^\#/g,'')).split(' ');
//alert(twords[eval(-1 + twords.length)]);
thistt=decodeURIComponent(('' + parent.location.hash).replace(/^\#/g,'')).replace(' ' + twords[eval(-1 + twords.length)], '').split(twords[eval(-1 + twords.length)])[0].split('#')[0];
//alert(thistt);
purld=purld.replace(encodeURIComponent(thistt), '').replace(/\#\%20/g,'#').split(encodeURIComponent(twords[eval(-1 + twords.length)]))[0] + encodeURIComponent(twords[eval(-1 + twords.length)]);
//alert(urld);
thistt=thistt.trim();
}
}
if (purld.indexOf('#data:') != -1 || purld.indexOf('#data' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (purld.indexOf('#http:') != -1 || purld.indexOf('#http' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (purld.indexOf('#https:') != -1 || purld.indexOf('#https' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (purld.indexOf('#//') != -1 || purld.indexOf('#' + encodeURIComponent('//')) != -1) {
yeslook=true;
} else if (purld.indexOf('#../') != -1 || purld.indexOf('#' + encodeURIComponent('../')) != -1) {
yeslook=true;
} else if (purld.indexOf('#/') != -1 || purld.indexOf('#' + encodeURIComponent('/')) != -1) {
yeslook=true;
} else if (purld.indexOf('#www.') != -1 || purld.indexOf('#www' + encodeURIComponent('.')) != -1) {
yeslook=true;
}
if (yeslook) {
if (invl == '') {
curcont=0;
} else {
if (curcont == -1) { curcont=0; } else { curcont++ }
}
butisparent='parent.';
} else if (invl == '') {
turld=parent.document.URL.replace('%23http','#http');
thistt='';
if (turld.indexOf('#') != -1) {
//alert('lh=' + decodeURIComponent(('' + location.hash).replace(/^\#/g,'')) + '!');
if (decodeURIComponent(('' + top.location.hash).replace(/^\#/g,'')).indexOf(' ') == 0 && eval('' + decodeURIComponent(('' + top.location.hash).replace(/^\#/g,'')).split(' ').length) > 2) {
twords=decodeURIComponent(('' + top.location.hash).replace(/^\#/g,'')).split(' ');
//alert(twords[eval(-1 + twords.length)]);
thistt=decodeURIComponent(('' + top.location.hash).replace(/^\#/g,'')).replace(' ' + twords[eval(-1 + twords.length)], '').split(twords[eval(-1 + twords.length)])[0].split('#')[0];
//alert(thistt);
turld=turld.replace(encodeURIComponent(thistt), '').replace(/\#\%20/g,'#').split(encodeURIComponent(twords[eval(-1 + twords.length)]))[0] + encodeURIComponent(twords[eval(-1 + twords.length)]);
//alert(urld);
thistt=thistt.trim();
}
}
if (turld.indexOf('#data:') != -1 || turld.indexOf('#data' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (turld.indexOf('#http:') != -1 || turld.indexOf('#http' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (turld.indexOf('#https:') != -1 || turld.indexOf('#https' + encodeURIComponent(':')) != -1) {
yeslook=true;
} else if (turld.indexOf('#//') != -1 || turld.indexOf('#' + encodeURIComponent('//')) != -1) {
yeslook=true;
} else if (turld.indexOf('#../') != -1 || turld.indexOf('#' + encodeURIComponent('../')) != -1) {
yeslook=true;
} else if (turld.indexOf('#/') != -1 || turld.indexOf('#' + encodeURIComponent('/')) != -1) {
yeslook=true;
} else if (turld.indexOf('#www.') != -1 || turld.indexOf('#www' + encodeURIComponent('.')) != -1) {
yeslook=true;
}
if (yeslook) {
curcont=0;
butisparent='top.';
}
}
}
if (yeslook && invl != '') { stagetwo(invl); } else if (invl != '') { if (2 == 5) { alert('why for 2'); } }
return yeslook;
}
function stagetwo(twoinvl) {
if (yeslook) {
curvaridx=0;
if (twoinvl == '') { curcont=0; } else if (curcont == -1) { curcont=0; }
var hashparts=[];
if (butisparent == '') {
//alert('urld=' + urld);
hashparts=urld.split('#');
//alert('hashparts[0]=' + hashparts[0]);
} else if (butisparent.indexOf('parent') == 0) {
hashparts=purld.split('#');
} else if (butisparent.indexOf('top') == 0) {
hashparts=turld.split('#');
}
var jdx=0, defprefixes="", defsuffixes="";
for (var iha=1; iha<hashparts.length; iha++) {
defprefixes=('<iframe style="width:100%;height:100%;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
defsuffixes=('"></iframe>');
hashparts[iha]=titleanalysis(decodeURIComponent(hashparts[iha]));
if (decodeURIComponent(hashparts[iha]).indexOf('data:') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push(decodeURIComponent(hashparts[iha]).replace(/\ /g,'+'));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='' + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+');
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
if (decodeURIComponent(hashparts[iha]).indexOf('data:video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + decodeURIComponent(hashparts[iha]).split('data:')[1].split(';')[0] + '" controls muted autoplay><source id=cont' + iha + ' type="' + decodeURIComponent(hashparts[iha]).split('data:')[1].split(';')[0] + '" src="');
contsuffixes.push('"></source></video>');
} else if (decodeURIComponent(hashparts[iha]).indexOf('data:audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + decodeURIComponent(hashparts[iha]).split('data:')[1].split(';')[0] + '" controls muted autoplay><source id=cont' + iha + ' type="' + decodeURIComponent(hashparts[iha]).split('data:')[1].split(';')[0] + '" src="');
contsuffixes.push('"></source></audio>');
} else if (decodeURIComponent(hashparts[iha]).indexOf('data:image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + decodeURIComponent(hashparts[iha]).split('data:')[1].split(';')[0] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
} else {
contprefixes.push('<iframe style="width:100%;height:100%;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + decodeURIComponent(hashparts[iha]).split('data:')[1].split(';')[0] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></iframe>');
}
} else if (decodeURIComponent(hashparts[iha]).indexOf('http:') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push(decodeURIComponent(hashparts[iha]).replace('http:',''));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='' + decodeURIComponent(hashparts[iha]).replace('http:','');
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
for (jdx=0; jdx<mexts.length; jdx++) {
if (decodeURIComponent(hashparts[iha]).toLowerCase().indexOf(mexts[jdx]) != -1) {
if (mtypes[jdx].indexOf('video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></video>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></audio>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + mtypes[jdx] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
defsuffixes="";
}
}
}
if (defsuffixes != "") {
contprefixes.push(defprefixes);
contsuffixes.push(defsuffixes);
}
} else if (decodeURIComponent(hashparts[iha]).indexOf('https:') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push(decodeURIComponent(hashparts[iha]).replace('https:',''));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='' + decodeURIComponent(hashparts[iha]).replace('https:','');
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
for (jdx=0; jdx<mexts.length; jdx++) {
if (decodeURIComponent(hashparts[iha]).toLowerCase().indexOf(mexts[jdx]) != -1) {
if (mtypes[jdx].indexOf('video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></video>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></audio>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + mtypes[jdx] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
defsuffixes="";
}
}
}
if (defsuffixes != "") {
contprefixes.push(defprefixes);
contsuffixes.push(defsuffixes);
}
} else if (decodeURIComponent(hashparts[iha]).indexOf('//') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push(decodeURIComponent(hashparts[iha]));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='' + decodeURIComponent(hashparts[iha]);
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
for (jdx=0; jdx<mexts.length; jdx++) {
if (decodeURIComponent(hashparts[iha]).toLowerCase().indexOf(mexts[jdx]) != -1) {
if (mtypes[jdx].indexOf('video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></video>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onplay="this.onended=function(){ localended(event.target); };" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></audio>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + mtypes[jdx] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
defsuffixes="";
}
}
}
if (defsuffixes != "") {
contprefixes.push(defprefixes);
contsuffixes.push(defsuffixes);
}
} else if (decodeURIComponent(hashparts[iha]).indexOf('../') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push(decodeURIComponent(hashparts[iha]));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='' + decodeURIComponent(hashparts[iha]);
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
for (jdx=0; jdx<mexts.length; jdx++) {
if (decodeURIComponent(hashparts[iha]).toLowerCase().indexOf(mexts[jdx]) != -1) {
if (mtypes[jdx].indexOf('video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></video>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></audio>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + mtypes[jdx] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
defsuffixes="";
}
}
}
if (defsuffixes != "") {
contprefixes.push(defprefixes);
contsuffixes.push(defsuffixes);
}
} else if (decodeURIComponent(hashparts[iha]).indexOf('/') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push(decodeURIComponent(hashparts[iha]));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='' + decodeURIComponent(hashparts[iha]);
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
for (jdx=0; jdx<mexts.length; jdx++) {
if (decodeURIComponent(hashparts[iha]).toLowerCase().indexOf(mexts[jdx]) != -1) {
if (mtypes[jdx].indexOf('video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></video>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></audio>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + mtypes[jdx] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
defsuffixes="";
}
}
}
if (defsuffixes != "") {
contprefixes.push(defprefixes);
contsuffixes.push(defsuffixes);
}
} else if (decodeURIComponent(hashparts[iha]).indexOf('www.') == 0) {
conttitle.push(thistt);
contstarts.push(0);
contdurs.push(-1);
conturls.push('//' + decodeURIComponent(hashparts[iha]));
contalturls.push('');
variantt[setcurv(curvaridx)]='' + thistt;
variantu[curvaridx]='//' + decodeURIComponent(hashparts[iha]);
curvaridx++;
if (relh.indexOf(hashparts[iha]) == -1) {
relh+='#' + (thistt == '' ? '' : encodeURIComponent(' ' + thistt + ' ')) + hashparts[iha];
}
for (jdx=0; jdx<mexts.length; jdx++) {
if (decodeURIComponent(hashparts[iha]).toLowerCase().indexOf(mexts[jdx]) != -1) {
if (mtypes[jdx].indexOf('video/') == 0) {
contprefixes.push('<video onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=vcont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></video>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('audio/') == 0) {
contprefixes.push('<audio onseeked="myseek(event);" onseeking="myseek(event);" data-dur="-1" onended="localended(this);" onload="event.target.play();" onloadedmetadata="onlcont(this,' + iha + ');" id=acont' + iha + ' type="' + mtypes[jdx] + '" controls muted autoplay><source id=cont' + iha + ' type="' + mtypes[jdx] + '" src="');
contsuffixes.push('"></source></audio>');
defsuffixes="";
} else if (mtypes[jdx].indexOf('image/') == 0) {
contprefixes.push('<img style="width:100%;object-fit:contain;" onload="preloc=this; onlcont(this,' + iha + ');" id=cont' + iha + ' type="' + mtypes[jdx] + '" src="'); // + decodeURIComponent(hashparts[iha]).replace(/\ /g,'+') + '">');
contsuffixes.push('"></img>');
defsuffixes="";
}
}
}
if (defsuffixes != "") {
contprefixes.push(defprefixes);
contsuffixes.push(defsuffixes);
}
}
thistt='';
curvaridx=0;
}
//if (document.getElementById('rhcell') && twoinvl != '') {
// alert(eval('' + contprefixes.length) + ' ' + curcont);
//}
if (document.getElementById('rhcell') && twoinvl != '' && eval('' + contprefixes.length) > curcont) {
player=window.self;
document.getElementById('lhcell').style.display='none';
document.getElementById('rhcell').style.display='table-cell';
document.getElementById('rhcell').innerHTML=contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont];
}
}
if (yeslook && lastinvl == '') { curcont=0; }
if (relh != '') { setTimeout(samepage, 900); }
//}
}
function prefetch(whatgifmaybe) { // thanks to https://stackoverflow.com/questions/69564118/how-to-get-duration-of-gif-image-in-javascript#:~:text=Mainly%20use%20parseGIF()%20%2C%20then,duration%20of%20a%20GIF%20image.
if ((whatgifmaybe.toLowerCase().trim().split('#')[0] + '?').indexOf('.gif?') != -1 || whatgifmaybe.indexOf('data:image/gif') != -1 || whatgifmaybe.indexOf('gif;base64,') == 0) {
ingif=whatgifmaybe;
//document.body.style.cursor='progress';
fetch(whatgifmaybe)
.then(res => res.arrayBuffer())
.then(ab => isGifAnimated(new Uint8Array(ab)))
.then(console.log);
}
}
/** @param {Uint8Array} uint8 */
function isGifAnimated (uint8) { // thanks to https://stackoverflow.com/questions/69564118/how-to-get-duration-of-gif-image-in-javascript#:~:text=Mainly%20use%20parseGIF()%20%2C%20then,duration%20of%20a%20GIF%20image.
let myduration = 0;
for (let xi = 0, len = uint8.length; xi < len; xi++) {
if (uint8[xi] == 0x21
&& uint8[xi + 1] == 0xF9
&& uint8[xi + 2] == 0x04
&& uint8[xi + 7] == 0x00)
{
const xdelay = (uint8[xi + 5] << 8) | (uint8[xi + 4] & 0xFF);
myduration += xdelay < 2 ? 10 : xdelay;
}
}
if (eval(myduration / 100) > 0.11) {
gduration=eval(myduration / 100);
if (jonum >= 0) {
contdurs[whichnonyt(eval(-1 + contstarts.length))]='' + gduration;
document.getElementsByTagName('h1')[0].innerHTML+=' (' + gduration + ' seconds duration)';
}
return eval(myduration / 100);
}
gduration=0;
return 0;
}
function titleanalysis(inde) {
var outde=inde, newwords=[];
if ((outde + 'x').substring(0,1) == ' ') {
newwords=outde.split(' ');
if (eval('' + newwords.length) > 2) {
outde=newwords[eval(-1 + newwords.length)];
thistt=inde.replace(' ' + outde, '').trim();
}
}
return encodeURIComponent(outde);
}
function makeunique(lhsh) {
var noidxs=[], iop=0, jop=0, nothingos=[], outlhsh='';
//alert('in:' + lhsh);
var hpartsare=lhsh.split('#');
if (eval('' + hpartsare.length) > 2) {
for (iop=eval(-1 + eval('' + hpartsare.length)); iop>=0; iop--) {
if (hpartsare[iop].trim() != '') {
if (eval('' + ('#' + lhsh + '#').split('' + hpartsare[iop] + '').length) > 2) {
if (eval('' + ('#' + lhsh + '#').split('' + hpartsare[iop] + '#').length) > 2) {
if (nothingos.indexOf(hpartsare[iop]) == -1) {
nothingos.push(hpartsare[iop]);
noidxs.push(iop);
}
} else if (eval('' + ('#' + lhsh + '#').split('#' + hpartsare[iop] + '').length) > 2) {
if (nothingos.indexOf(hpartsare[iop]) == -1) {
nothingos.push(hpartsare[iop]);
noidxs.push(iop);
}
}
}
}
}
if (eval('' + noidxs.length) > 0) {
if (noidxs.indexOf(0) == -1) { outlhsh='' + hpartsare[0]; }
for (iop=1; iop<hpartsare.length; iop++) {
if (noidxs.indexOf(iop) == -1 && outlhsh.indexOf('#' + hpartsare[iop]) == -1) {
outlhsh+='#' + hpartsare[iop];
}
}
//alert('OUT:' + outlhsh);
return outlhsh;
}
}
//alert('out:' + lhsh);
return lhsh;
}
function hae(outhh) {
if ((outhh + 's').replace(/\#https$/g,'') != (outhh + 's')) {
return outhh;
} else if ((outhh + '#').indexOf('#http#') != -1) {
return (outhh + '#').replace('#http#', '#') + 'http';
}
return outhh;
}
function samepage() {
var washl='', xwasdu='';
if (relh != '') {
relh=makeunique(relh);
if (window.parent) {
if (parent.document.URL.indexOf(relh) == -1) {
washl=('' + parent.location.hash).replace(/^undefined$/g,'').replace(/^null$/g,'');
if (('' + typeof window.parent.mod_docurl) == 'function') {
xwasdu=window.parent.get_docurl();
if (xwasdu.indexOf(relh) == -1) {
if (washl == '') {
window.parent.mod_docurl(xwasdu, hae(xwasdu + relh));
} else if (xwasdu.indexOf(washl) != -1) {
//window.parent.mod_docurl(xwasdu, xwasdu.replace(washl, relh + washl));
window.parent.mod_docurl(xwasdu, xwasdu.replace(washl, hae(washl + relh)));
} else {
window.parent.mod_docurl(xwasdu, hae(xwasdu + relh));
}
}
}
if (('' + typeof window.parent.moddocurl) == 'function') {
xwasdu=window.parent.getdocurl();
if (xwasdu.indexOf(relh) == -1) {
if (washl == '') {
window.parent.moddocurl(xwasdu, hae(xwasdu + relh));
} else if (xwasdu.indexOf(washl) != -1) {
//window.parent.moddocurl(xwasdu, xwasdu.replace(washl, relh + washl));
window.parent.moddocurl(xwasdu, xwasdu.replace(washl, hae(washl + relh)));
} else {
window.parent.moddocurl(xwasdu, hae(xwasdu + relh));
}
}
}
//parent.location.hash=relh + washl;
if (prepurd == purld) { parent.location.hash=hae(washl + relh); }
}
if (window.top) {
if (top.document.URL.indexOf(relh) == -1) {
washl=('' + top.location.hash).replace(/^undefined$/g,'').replace(/^null$/g,'');
if (('' + typeof window.top.mod_docurl) == 'function') {
xwasdu=window.top.get_docurl();
if (xwasdu.indexOf(relh) == -1) {
if (washl == '') {
window.top.mod_docurl(xwasdu, hae(xwasdu + relh));
} else if (xwasdu.indexOf(washl) != -1) {
//window.top.mod_docurl(xwasdu, xwasdu.replace(washl, relh + washl));
window.top.mod_docurl(xwasdu, xwasdu.replace(washl, hae(washl + relh)));
} else {
window.top.mod_docurl(xwasdu, hae(xwasdu + relh));
}
}
}
if (('' + typeof window.top.moddocurl) == 'function') {
xwasdu=window.top.getdocurl();
if (xwasdu.indexOf(relh) == -1) {
if (washl == '') {
window.top.moddocurl(xwasdu, hae(xwasdu + relh));
} else if (xwasdu.indexOf(washl) != -1) {
//window.top.moddocurl(xwasdu, xwasdu.replace(washl, relh + washl));
window.top.moddocurl(xwasdu, xwasdu.replace(washl, hae(washl + relh)));
} else {
window.top.moddocurl(xwasdu, hae(xwasdu + relh));
}
}
}
//top.location.hash=relh + washl;
if (prepurd == purld) { top.location.hash=hae(washl + relh); }
}
}
}
}
}
function mute() {
return true;
}
function unMute() {
return true;
}
function stopVideo() {
return true;
}
function playVideo() {
return true;
}
function seekTo(hms) {
if (lastmediao) {
lastmediao.currentTime='' + hms;
}
}
function myseek(evt) {
var vsdur=('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]).replace(/^undefined/g,'').replace(/^null/g,'');
//parent.document.title='' + evt.target.currentTime + ' vs ' + vsdur;
if (('' + evt.target.getAttribute('data-dur')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
if (('' + evt.target.getAttribute('data-dur')).replace(/^undefined/g,'').replace(/^null/g,'').indexOf('-') != -1) {
if (vsdur != '') {
evt.target.setAttribute('data-dur', '' + vsdur);
}
}
}
if (eval(1 + eval('' + evt.target.currentTime)) >= eval('' + vsdur)) {
//parent.document.title='' + evt.target.currentTime + ' Vs ' + vsdur;
localended(evt.target);
//} else {
// alert(' at ' + evt.target.currentTime + ' out of ' + evt.target.getAttribute('data-dur'));
}
}
function getCurrentTime() {
return eval(-0.5 + eval('' + duration));
}
function unjzero(sugj) {
var inum=0;
var ihuhi=vidarrv.indexOf(variants[playingvaridx]); //curvaridx]); // 'cannotenda2'
if (swin) {
while (swin.document.getElementById('j' + inum)) {
if (inum == ihuhi) {
viddurs[ihuhi]='' + swin.document.getElementById('j' + inum).value.split('.00')[0];
parent.document.getElementById('xx' + inum).style.backgroundColor='palegreen';
parent.document.getElementById('myh1').innerHTML='' + vidtitle[ihuhi];
if (window.top) {
if (top.document.getElementById('td0001')) {
//setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-alt', top.getcura() + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
//}, 2000);
}
}
}
//if (inum == 0) { alert('?' + swin.document.getElementById('j' + inum).value.split('.00')[0]); } // huh
swin.document.getElementById('j' + inum).value=swin.document.getElementById('j' + inum).value.split('.00')[0];
inum++;
}
}
//alert('nextvidi=' + nextvidi);
return sugj;
}
function saveis(towin) {
var inum=0;
var ihuhi=vidarrv.indexOf(variants[curvaridx]); // 'cannotenda2'
swin=towin;
isis=[];
jsis=[];
while (towin.document.getElementById('i' + inum)) {
isis.push(towin.document.getElementById('i' + inum).value);
if (inum == ihuhi) { viddurs[ihuhi]='' + towin.document.getElementById('j' + inum).value.split('.00')[0]; }
jsis.push(towin.document.getElementById('j' + inum).value.split('.00')[0]);
inum++;
}
}
function restoreis(towin) {
var inum=0;
var ihuhi=vidarrv.indexOf(variants[curvaridx]); // 'cannotenda2'
for (var inum=0; inum<isis.length; inum++) {
if (('' + isis[inum]).trim() == '' && ('' + towin.document.getElementById('i' + inum).getAttribute('data-value')).toLowerCase().indexOf('cannotenda2') != '') {
towin.document.getElementById('i' + inum).value='' + towin.document.getElementById('i' + inum).getAttribute('data-value');
} else {
towin.document.getElementById('i' + inum).value=isis[inum];
}
if (inum == ihuhi) { viddurs[ihuhi]='' + jsis[inum]; }
//if (inum == 0) { alert(jsis[inum]); } // huh
towin.document.getElementById('j' + inum).value=jsis[inum];
}
//isis=[];
//jsis=[];
}
function postfeed() {
if (aminytnon && wasaminytnon && kwq >= 0 && swin) {
if (parent.document.getElementById('j' + kwq).value.indexOf('.00') != -1 || swin.document.getElementById('radioif').title == 'Closed' || !swin.getnextwo()) {
//alert('found');
aminytnon=false;
parent.document.getElementById('j' + kwq).value=parent.document.getElementById('j' + kwq).value.split('.00')[0];
kwq=-1;
//playingvideo();
setTimeout(postfeed, 600);
} else {
setTimeout(postfeed, 600);
}
} else {
setTimeout(postfeed, 600);
//alert('surprise');
}
}
function feedoff(intr, compduris, comptitleis) {
var iqw=0;
if (window.parent != window.self) {
if (window.parent.window.opener) {
//alert('vHere ' + ivid);
iqw=0;
while (parent.document.getElementById('i' + iqw)) {
if (parent.document.getElementById('i' + iqw).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + iqw).value.indexOf('|') != -1) {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('|')[1].split('#')[0]);
} else {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('#')[0]);
}
console.warn(vidarrv);
//alert('ivid=' + ivid + ' compduris=' + compduris + ' curvaridx=' + curvaridx + ' vs playingvaridx=' + playingvaridx + ' iqw=' + iqw);
vidarrv[iqw]=variants[curvaridx]; //'cannotenda2';
console.warn(vidarrv);
//alert('Iqw=' + iqw);
kqw=iqw;
}
iqw++;
}
//alert('Here ' + ivid + ' ' + compduris);
saveis(window.parent.window.opener);
//alert('THere ' + ivid + ' ' + compduris);
window.parent.window.opener.nonytopen(ivid, compduris, comptitleis);
//setTimeout(function() { restoreis(window.parent.window.opener); }, 2000);
} else {
iqw=0;
while (parent.document.getElementById('i' + iqw)) {
if (parent.document.getElementById('i' + iqw).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + iqw).value.indexOf('|') != -1) {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('|')[1].split('#')[0]);
} else {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('#')[0]);
}
console.warn(vidarrv);
//alert('ivid=' + ivid + ' compduris=' + compduris + ' Curvaridx=' + curvaridx + ' vs playingvaridx=' + playingvaridx + ' iqw=' + iqw);
vidarrv[iqw]=variants[curvaridx]; //'cannotenda2';
console.warn(vidarrv);
//alert('IqW=' + iqw);
kqw=iqw;
}
iqw++;
}
//alert('gere ' + ivid + ' ' + compduris);
saveis(window.parent);
//alert('Tgere ' + ivid + ' ' + compduris);
parent.nonytopen(ivid, compduris, comptitleis);
//setTimeout(function() { restoreis(window.parent); }, 2000);
}
//} else {
// alert('therE');
}
if (intr) {
wasaminytnon=true;
if (!pfdone) {
pfdone=true;
setTimeout(postfeed, 1600);
}
}
return intr;
}
function prelocalended() {
localended(preloc);
preloc=null;
}
function localended(avo) {
var iqw=0, lastwoin=0;
if (window.parent) {
if (parent.document.URL.indexOf('tbox=') != -1) {
if (window.parent.window.opener) {
iqw=0;
while (parent.document.getElementById('i' + iqw)) {
if (parent.document.getElementById('i' + iqw).value.toLowerCase().indexOf('cannotenda2') != -1) {
console.warn(vidarrv);
if (parent.document.getElementById('i' + iqw).value.indexOf('|') != -1) {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('|')[1].split('#')[0]);
} else {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('#')[0]);
}
console.warn(vidarrv);
//alert('curvaRidx=' + curvaridx + ' vs playingvaridx=' + playingvaridx + ' iqw=' + iqw);
vidarrv[iqw]=variants[curvaridx]; //'cannotenda2';
viddurs[iqw]='' + parent.document.getElementById('j' + iqw).value.split('.00')[0];
//alert('IQW=' + iqw);
}
iqw++;
}
setTimeout(function() { if (parent.window.opener.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0]).value.toLowerCase().indexOf('cannotenda2') != -1 && parent.window.opener.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0]).value.toLowerCase().indexOf(conturls[whichnonyt(eval(-1 + contstarts.length))].toLowerCase()) != -1) { parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00'; parent.mod_a_docurl('?','?dd' + parent.document.URL.split('tbox=')[1].split('&')[0] + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&'); } parent.document.getElementById('mytopspan').innerHTML='You can close me now ... ' + parent.document.getElementById('mytopspan').innerHTML; parent.window.opener.focus(); parent.window.opener.backtobase(); parent.window.opener.focus(); if (parent.window.opener.document.getElementById('xx' + parent.document.URL.split('tbox=')[1].split('&')[0]).outerHTML.indexOf('green') != -1) { duration=-9999; aminytnon=false; if (altplayer) { player=altplayer; } } }, 1000);
if (parent.window.opener.document.getElementById('xx' + parent.document.URL.split('tbox=')[1].split('&')[0]).outerHTML.indexOf('green') != -1) {
setTimeout(function() { aminytnon=false; duration=-9999; if (4 == 6) { playingvideo(); } }, 1100);
}
//window.close();
}
} else if (parent.document.URL.indexOf('/karaoke_youtube_api.htm') != -1) {
iqw=0;
while (parent.document.getElementById('i' + iqw)) {
if (parent.document.getElementById('i' + iqw).value.toLowerCase().indexOf('cannotenda2') != -1) {
//if (lastwoin == 0 && iqw > 0) {
lastwoin=iqw;
//}
console.warn(vidarrv);
if (parent.document.getElementById('i' + iqw).value.indexOf('|') != -1) {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('|')[1].split('#')[0]);
} else {
curvaridx=variants.indexOf(parent.document.getElementById('i' + iqw).value.split('#')[0]);
}
console.warn(vidarrv);
//alert('curvaridX=' + curvaridx + ' vs playingvaridx=' + playingvaridx + ' iqw=' + iqw + ' with ' + parent.document.getElementById('i' + iqw).value.split('#')[0]);
vidarrv[iqw]=variants[curvaridx]; //'cannotenda2';
viddurs[iqw]='' + parent.document.getElementById('j' + iqw).value.split('.00')[0];
//alert('IQw=' + iqw);
}
iqw++;
}
if (('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
if (parent.document.getElementById('xx' + lastwoin).outerHTML.indexOf('green') != -1) {
aminytnon=false;
if (altplayer) {
player=altplayer;
}
duration=-9999;
if (4 == 6) { playingvideo(); } //setTimeout(playingvideo, 800);
}
}
} else if ('blog' != 'blog') {
parent.document.title='Finished ' + avo.outerHTML.substring(1).split(' ')[0];
}
}
}
function onlcont(iois, ionum) {
var waslast=lastmediao, zeroth='0', mediath='-1', imedia=0, jm=0, nogo=false;
var vssrc='';
if (('' + iois.outerHTML).indexOf('<img') == 0) {
if (('' + iois.outerHTML).indexOf('gif') != -1) {
try {
lastmediao=iois;
} catch(hgfjhg) {
lastmediao=waslast;
}
vssrc=('' + iois.outerHTML).split(' src="')[1].split('"')[0];
prefetch(iois.src);
jonum=ionum;
setTimeout(function(){
if (gduration != 0) {
contdurs[whichnonyt(eval(-1 + contstarts.length))]='' + Math.ceil(eval(1 * eval('' + gduration)));
if (window.parent) {
if (parent.window.opener) {
parent.mod_a_docurl('?','?dd' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0] + '=' + Math.ceil(eval(1 * eval('' + gduration))) + '.00' + '&');
}
}
} else {
gduration=25;
contdurs[whichnonyt(eval(-1 + contstarts.length))]='25';
if (window.parent) {
if (parent.window.opener) {
parent.mod_a_docurl('?','?dd' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0] + '=25.00' + '&');
}
}
}
contdurs[whichnonyt(eval(-1 + contstarts.length))]='' + gduration;
fixallparentregarding(ionum, conturls[whichnonyt(eval(-1 + contstarts.length))], ('' + contdurs[whichnonyt(eval(-1 + contstarts.length))] + conttitle[whichnonyt(eval(-1 + contstarts.length))]));
document.getElementsByTagName('h1')[0].innerHTML+=' (' + gduration + ' seconds duration)';
setTimeout(prelocalended, Math.ceil(eval(1000 * eval('' + gduration))));
if (window.parent) {
if (parent.document.URL.indexOf('tbox=') != -1) {
zeroth=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
if (parent.document.getElementById('i' + zeroth).value.toLowerCase().indexOf('cannotenda2') != -1) {
mediath='' + zeroth;
} else {
imedia=0;
while (parent.document.getElementById('i' + imedia)) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
mediath='' + imedia;
} else {
if (('' + zeroth) == ('' + jm) && mediath.indexOf('-') != -1) { mediath='' + imedia; }
jm++;
}
}
imedia++;
}
if (mediath.indexOf('-') != -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
} else if (parent.document.getElementById('j' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
}
//alert('why ' + mediath + ' ' + vssrc);
}
if (window.parent.window.opener) {
//alert('wHy ' + mediath + ' ' + vssrc);
if (!parent.document.getElementById('i' + mediath)) {
return '';
}
//alert('whY ' + mediath + ' ' + vssrc + ' ... ' + parent.document.getElementById('i' + mediath).value);
//if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
// return '';
//}
//alert('Why ' + mediath + ' ' + vssrc);
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
return '';
}
parent.document.getElementById('youtube_duration').value='' + gduration; // + iois.duration;
// alert('' + ionum + ';' + zeroth + ',' + mediath + '*' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value='' + iois.duration;
//parent.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
parent.document.getElementById('j' + mediath).value='' + gduration; // + iois.duration;
parent.document.getElementById('i' + mediath).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
if (conttitle[ionum] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
}
// alert('' + ionum + ';' + zeroth + ',' + mediath + '**' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
setTimeout(function() {
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
parent.mod_a_docurl('?','?dd' + mediath + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
},
eval(1000 * Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])))
);
}
}
}
}, 3000);
} else {
try {
lastmediao=iois;
} catch(hgfjhg) {
lastmediao=waslast;
}
vssrc=('' + iois.outerHTML).split(' src="')[1].split('"')[0];
contdurs[whichnonyt(eval(-1 + contstarts.length))]='5';
fixallparentregarding(ionum, conturls[whichnonyt(eval(-1 + contstarts.length))], ('' + contdurs[whichnonyt(eval(-1 + contstarts.length))] + conttitle[whichnonyt(eval(-1 + contstarts.length))]));
document.getElementsByTagName('h1')[0].innerHTML+=' (5 seconds duration)';
setTimeout(prelocalended, 5000);
if (window.parent) {
if (parent.document.URL.indexOf('tbox=') != -1) {
zeroth=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
if (parent.document.getElementById('i' + zeroth).value.toLowerCase().indexOf('cannotenda2') != -1) {
mediath='' + zeroth;
} else {
imedia=0;
while (parent.document.getElementById('i' + imedia)) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
mediath='' + imedia;
} else {
if (('' + zeroth) == ('' + jm) && mediath.indexOf('-') != -1) { mediath='' + imedia; }
jm++;
}
}
imedia++;
}
if (mediath.indexOf('-') != -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
} else if (parent.document.getElementById('j' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
}
//alert('why ' + mediath + ' ' + vssrc);
}
if (window.parent.window.opener) {
//alert('wHy ' + mediath + ' ' + vssrc);
parent.mod_a_docurl('?','?dd' + mediath + '=5.00' + '&');
if (!parent.document.getElementById('i' + mediath)) {
return '';
}
//alert('whY ' + mediath + ' ' + vssrc + ' ... ' + parent.document.getElementById('i' + mediath).value);
//if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
// return '';
//}
//alert('Why ' + mediath + ' ' + vssrc);
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
return '';
}
parent.document.getElementById('youtube_duration').value='5'; // + iois.duration;
// alert('' + ionum + ';' + zeroth + ',' + mediath + '*' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value='' + iois.duration;
//parent.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
parent.document.getElementById('j' + mediath).value='' + iois.duration;
parent.document.getElementById('i' + mediath).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
if (conttitle[ionum] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
}
// alert('' + ionum + ';' + zeroth + ',' + mediath + '**' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
setTimeout(function() {
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
parent.mod_a_docurl('?','?dd' + mediath + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
},
eval(1000 * Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])))
);
}
}
}
}
} else if (('' + iois.outerHTML).indexOf('<video') == 0) {
try {
lastmediao=iois;
} catch(hgfjhg) {
lastmediao=waslast;
}
vssrc=('' + iois.outerHTML).split(' src="')[1].split('"')[0];
contdurs[whichnonyt(eval(-1 + contstarts.length))]='' + iois.duration;
fixallparentregarding(ionum, conturls[whichnonyt(eval(-1 + contstarts.length))], ('' + contdurs[whichnonyt(eval(-1 + contstarts.length))] + conttitle[whichnonyt(eval(-1 + contstarts.length))]));
document.getElementsByTagName('h1')[0].innerHTML+=' (' + iois.duration + ' seconds duration)';
//iois.click();
if (window.parent) {
if (parent.document.URL.indexOf('tbox=') != -1) {
zeroth=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
if (parent.document.getElementById('i' + zeroth).value.toLowerCase().indexOf('cannotenda2') != -1) {
mediath='' + zeroth;
} else {
imedia=0;
while (parent.document.getElementById('i' + imedia)) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
mediath='' + imedia;
} else {
if (('' + zeroth) == ('' + jm) && mediath.indexOf('-') != -1) { mediath='' + imedia; }
jm++;
}
}
imedia++;
}
if (mediath.indexOf('-') != -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
} else if (parent.document.getElementById('j' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
}
//alert('why ' + mediath + ' ' + vssrc);
}
if (window.parent.window.opener) {
if (!parent.document.getElementById('i' + mediath)) {
return '';
}
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
return '';
}
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
return '';
}
parent.document.getElementById('youtube_duration').value='' + iois.duration;
Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]))
//alert('$' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value='' + iois.duration;
//parent.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
parent.document.getElementById('j' + mediath).value='' + iois.duration;
parent.document.getElementById('i' + mediath).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
if (conttitle[ionum] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
}
//alert('$@' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
setTimeout(function() {
parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
parent.mod_a_docurl('?','?dd' + parent.document.URL.split('tbox=')[1].split('&')[0] + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
},
eval(1000 * Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])))
);
}
}
}
} else if (('' + iois.outerHTML).indexOf('<audio') == 0) {
try {
lastmediao=iois;
} catch(hgfjhg) {
lastmediao=waslast;
}
vssrc=('' + iois.outerHTML).split(' src="')[1].split('"')[0];
contdurs[whichnonyt(eval(-1 + contstarts.length))]='' + iois.duration;
fixallparentregarding(ionum, conturls[whichnonyt(eval(-1 + contstarts.length))], ('' + contdurs[whichnonyt(eval(-1 + contstarts.length))] + conttitle[whichnonyt(eval(-1 + contstarts.length))]));
//iois.click();
document.getElementsByTagName('h1')[0].innerHTML+=' (' + iois.duration + ' seconds duration)';
if (window.parent) {
if (parent.document.URL.indexOf('tbox=') != -1) {
zeroth=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
if (parent.document.getElementById('i' + zeroth).value.toLowerCase().indexOf('cannotenda2') != -1) {
mediath='' + zeroth;
} else {
imedia=0;
while (parent.document.getElementById('i' + imedia)) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
mediath='' + imedia;
} else {
if (('' + zeroth) == ('' + jm) && mediath.indexOf('-') != -1) { mediath='' + imedia; }
jm++;
}
}
imedia++;
}
if (mediath.indexOf('-') != -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
} else if (parent.document.getElementById('j' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
}
//alert('why ' + mediath + ' ' + vssrc);
}
if (window.parent.window.opener) {
if (!parent.document.getElementById('i' + mediath)) {
return '';
}
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
return '';
}
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
return '';
}
parent.document.getElementById('youtube_duration').value='' + iois.duration;
//alert('' + ionum + ';' + zeroth + ',' + mediath + '*' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value='' + iois.duration;
//parent.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
parent.document.getElementById('j' + mediath).value='' + iois.duration;
parent.document.getElementById('i' + mediath).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
if (conttitle[ionum] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
}
//alert('' + ionum + ';' + zeroth + ',' + mediath + '**' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
setTimeout(function() {
//parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
//parent.mod_a_docurl('?','?dd' + mediath + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
parent.mod_a_docurl('?','?dd' + parent.document.URL.split('tbox=')[1].split('&')[0] + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
},
eval(1000 * Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])))
);
}
}
}
} else {
try {
lastmediao=iois;
} catch(hgfjhg) {
lastmediao=waslast;
}
vssrc=('' + iois.outerHTML).split(' src="')[1].split('"')[0];
contdurs[whichnonyt(eval(-1 + contstarts.length))]='35';
fixallparentregarding(ionum, conturls[whichnonyt(eval(-1 + contstarts.length))], ('' + contdurs[whichnonyt(eval(-1 + contstarts.length))] + conttitle[whichnonyt(eval(-1 + contstarts.length))]));
document.getElementsByTagName('h1')[0].innerHTML+=' (35 seconds duration)';
setTimeout(prelocalended, 35000);
//alert('pdf');
if (window.parent) {
if (parent.document.URL.indexOf('tbox=') != -1) {
zeroth=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
if (parent.document.getElementById('i' + zeroth).value.toLowerCase().indexOf('cannotenda2') != -1) {
mediath='' + zeroth;
} else {
imedia=0;
while (parent.document.getElementById('i' + imedia)) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf('cannotenda2') != -1) {
if (parent.document.getElementById('i' + imedia).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
mediath='' + imedia;
} else {
if (('' + zeroth) == ('' + jm) && mediath.indexOf('-') != -1) { mediath='' + imedia; }
jm++;
}
}
imedia++;
}
if (mediath.indexOf('-') != -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
} else if (parent.document.getElementById('j' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
mediath=parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0];
}
//alert('why ' + mediath + ' ' + vssrc);
}
if (window.parent.window.opener) {
//alert('wHy ' + mediath + ' ' + vssrc);
parent.mod_a_docurl('?','?dd' + mediath + '=35.00' + '&');
if (!parent.document.getElementById('i' + mediath)) {
return '';
}
//alert('whY ' + mediath + ' ' + vssrc + ' ... ' + parent.document.getElementById('i' + mediath).value);
//if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf('cannotenda2') == -1) {
// return '';
//}
//alert('Why ' + mediath + ' ' + vssrc);
if (parent.document.getElementById('i' + mediath).value.toLowerCase().indexOf(vssrc.toLowerCase()) == -1) {
return '';
}
parent.document.getElementById('youtube_duration').value='35'; // + iois.duration;
//alert('' + ionum + ';' + zeroth + ',' + mediath + '*' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value='' + iois.duration;
//parent.document.getElementById('i' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
parent.document.getElementById('j' + mediath).value='' + iois.duration;
parent.document.getElementById('i' + mediath).value=contstarts[whichnonyt(eval(-1 + contstarts.length))] + '|' + conturls[whichnonyt(eval(-1 + contstarts.length))] + '#' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
if (conttitle[ionum] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[whichnonyt(eval(-1 + contstarts.length))];
}
// alert('' + ionum + ';' + zeroth + ',' + mediath + '**' + 'j' + parent.document.URL.split('tbox=')[1].split('&')[0].split('#')[0]);
//parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))]));
setTimeout(function() {
//parent.window.opener.document.getElementById('j' + mediath).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
//parent.mod_a_docurl('?','?dd' + mediath + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
parent.window.opener.document.getElementById('j' + parent.document.URL.split('tbox=')[1].split('&')[0]).value='' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.0';
parent.mod_a_docurl('?','?dd' + parent.document.URL.split('tbox=')[1].split('&')[0] + '=' + Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])) + '.00' + '&');
},
eval(1000 * Math.ceil(eval('' + contdurs[whichnonyt(eval(-1 + contstarts.length))])))
);
}
}
}
}
//alert('here at media number ' + ionum);
}
function butnotzero(innum) {
var jipo=0, kipo=-1;
while (parent.document.getElementById('c' + jipo)) {
if (parent.document.getElementById('c' + jipo).checked) { kipo=jipo; }
jipo++;
}
if (eval('' + innum) == -78675) { //0) {
while (eval('' + innum) == 0) {
innum=Math.floor(Math.random() * eval('' + viddurs.length))
}
}
if (kipo <= 0) { return 0; }
return innum;
}
function fixallparentregarding(iwhich, thedu, thedurn) {
var kz=0, vsnum=0, addtitleq='', delx='';
if (window.parent) {
if (thedurn.indexOf('#') != -1) {
addtitleq=thedurn.replace(thedurn.split('#')[0] + '#','');
}
if (parent.document.getElementById('i' + kz)) {
while (parent.document.getElementById('i' + kz)) {
if (parent.document.getElementById('i' + kz).value.toLowerCase().indexOf('cannotenda2') != -1) {
vsnum++;
if (vsnum == eval('' + iwhich) && parent.document.getElementById('i' + kz).value.toLowerCase().indexOf('#cannotenda2') == -1) {
if (addtitleq != '') {
if (parent.document.getElementById('i' + kz).value.indexOf(addtitleq) != -1) {
addtitleq='';
} else {
delx=' ';
}
}
if (parent.document.getElementById('i' + kz).value.toLowerCase().indexOf('cannotenda2#') != -1) {
parent.document.getElementById('i' + kz).value=parent.document.getElementById('i' + kz).value.toLowerCase().replace('cannotenda2#', thedu + '#cannotenda2' + delx + addtitleq + ' ');
if (addtitleq != '' && parent.document.getElementById('myh1')) {
parent.document.getElementById('myh1').innerHTML=addtitleq;
document.getElementsByTagName('h1')[0].innerHTML=addtitleq;
}
} else {
parent.document.getElementById('i' + kz).value=parent.document.getElementById('i' + kz).value.replace('cannotenda2', thedu + '#cannotenda2' + delx + addtitleq + ' ');
if (addtitleq != '' && parent.document.getElementById('myh1')) {
parent.document.getElementById('myh1').innerHTML=addtitleq;
document.getElementsByTagName('h1')[0].innerHTML=addtitleq;
}
}
//alert('^' + 'j' + kz);
parent.document.getElementById('j' + kz).value='' + thedurn.split('#')[0];
if (parent.document.getElementById('youtube_duration')) {
parent.document.getElementById('youtube_duration').value='' + thedurn.split('#')[0];
}
}
}
kz++;
}
}
}
}
function getDuration() {
if (!aminytnon) {
return -99999;
} else if (curcont == -1) {
return 0;
} else if (eval('' + contdurs.length) > eval('' + curcont)) {
return eval('' + contdurs[curcont]);
}
return 0;
}
function whichone(intone) {
var ioff=0;
//if (intone.indexOf(' , ') != -1) {
// alert(cursubi);
//}
if (intone.indexOf(' , ') == -1) {
if (ggsoc) {
parent.parent.docomcheck(intone);
}
return intone;
} else if (eval('' + intone.split(' , ').length) <= Math.max(0,eval(-1 + cursubi))) {
while (intone.split(' , ')[eval(-1 + ioff + intone.split(' , ').length)].trim() == '') {
ioff--;
}
if (ggsoc) {
parent.parent.docomcheck(intone.split(' , ')[eval(-1 + ioff + intone.split(' , ').length)]);
}
return intone.split(' , ')[eval(-1 + ioff + intone.split(' , ').length)];
} else {
while (intone.split(' , ')[eval(ioff + Math.max(0,eval(-1 + cursubi)))].trim() == '') {
ioff--;
}
if (ggsoc) {
parent.parent.docomcheck(intone.split(' , ')[eval(ioff + Math.max(0,eval(-1 + cursubi)))]);
}
return intone.split(' , ')[eval(ioff + Math.max(0,eval(-1 + cursubi)))];
}
if (ggsoc) {
parent.parent.docomcheck(intone);
}
return intone;
}
function whichaltone(intone) {
var ioff=0;
if (intone.indexOf(' , ') == -1) {
return intone;
} else if (eval('' + intone.split(' , ').length) <= Math.max(0,eval(-1 + cursubi))) {
while (intone.split(' , ')[eval(-1 + ioff + intone.split(' , ').length)].trim() == '') {
ioff--;
}
return intone.split(' , ')[eval(-1 + ioff + intone.split(' , ').length)];
} else {
while (intone.split(' , ')[eval(ioff + Math.max(0,eval(-1 + cursubi)))].trim() == '') {
ioff--;
}
return intone.split(' , ')[eval(ioff + Math.max(0,eval(-1 + cursubi)))];
}
return intone;
}
function endgame() {
if (hgrip != '') {
var washgrip=hgrip;
hgrip='';
hgans='';
if (window.opener) {
if (window.opener.document.URL.indexOf('/karaoke_') != -1) {
if (window.opener.window.opener) {
if (window.opener.document.URL.indexOf('/karaoke_') != -1 && ('' + window.opener.document.URL + '~').indexOf('srt=~') != -1) {
if (window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=window.opener.window.opener; //alert('yes FounD');
} else if (window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=window.opener.window.opener; //alert('yes FounD');
}
}
}
location.hash='#srt=' + encodeURIComponent(washgrip);
if (window.opener.document.URL.indexOf('youtubeid=') == -1) {
console.warn('987');
window.opener.location.href=window.opener.document.URL.split('#')[0].replace('srt=','').replace('?','?youtubeid=' + vid + '&') + '#srt=' + encodeURIComponent(washgrip);
hgrip='';
} else {
console.warn('9876');
window.opener.location.href=window.opener.document.URL.split('#')[0].replace('srt=','').replace('?','?rand=' + Math.floor(Math.random() * 3456) + '&') + '#srt=' + encodeURIComponent(washgrip);
hgrip='';
}
}
}
if (window.parent) {
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
if (parent.window.opener) {
if (parent.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
fauxpas_w=parent.window.opener; //alert('found');
} else if (parent.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener; //alert('yes FounD');
}
}
}
if (parent.document.URL.indexOf('/karaoke_') != -1) {
//alert(1);
location.hash='#srt=' + encodeURIComponent(washgrip);
console.warn('9871');
parent.location.href=parent.document.URL.split('#')[0].replace('srt=','').replace('?','?rand=' + Math.floor(Math.random() * 3456) + '&') + '#srt=' + encodeURIComponent(washgrip);
hgrip='';
} else if (parent.document.URL.indexOf('/stop_start') != -1) {
//alert(2);
var rhs=parent.document.URL.split('?')[0].split('#')[0].replace('srt=','').replace('.html','.html?vid=' + vid + ('&playtime=' + stduration).replace('&playtime=undefined','&playtime=' + duration)) + '#srt=' + encodeURIComponent(washgrip) + ('' + relh);
hgrip='';
console.warn('9872');
parent.location.href=rhs;
location.href=rhs;
}
} else {
//alert(3);
location.hash='#srt=' + encodeURIComponent(washgrip);
hgrip='';
}
}
}
function nextfauxdef() {
if (fauxpas_w) {
if ((eval(fauxdefcnt % 2) == 1 || lastfauxdef != '') || fauxdefcnt == 0) {
lastfauxdef='';
return ' ';
}
lastfauxdef=fauxdef;
return fauxdef;
}
return '';
}
function getlh() {
return ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
}
function maybedet(inid) {
if (document.getElementById('detdiv' + inid)) {
return 'detdiv' + inid;
} else if (document.getElementById(inid)) {
if (document.getElementById(inid).innerHTML == '') {
if (window.parent) {
if (window.parent.parent) {
//alert('3:' + parent.parent.document.URL);
if (parent.parent.document.URL.indexOf('/video_commentary.htm')) {
ggsandc='Commentary note';
ggsoc=parent.parent.docomcheck;
} else if (parent.parent.document.URL.indexOf('/song_lyric_faux_pas.htm') == -1) {
if (parent.parent.document.getElementById('conceptsubject')) {
ggsandc=parent.parent.document.getElementById('conceptsubject').value;
ggsoc=parent.parent.docomcheck;
}
}
} else {
ggsandc=ggsandc;
}
} else {
ggsandc=ggsandc;
}
document.getElementById(inid).innerHTML='<details id="det' + inid + '" open><summary id="sum' + inid + '">' + ggsandc + ' ...</summary><div id="detdiv' + inid + '"></div></details>';
return 'detdiv' + inid;
}
}
return inid;
}
function writeoutsubtitle() {
var newsubi=-1, ithings=0;
//console.log('cAll ' + enforcedtimeis + ' ' + cursecselapsed);
if (enforcedtimeis >= 0.0) {
cursecselapsed=enforcedtimeis;
}
if (cursecselapsed >= 0.0 && cursubi >= 0 && eval('' + etimes.length) > 0 && eval('' + stimes.length) > 0 && eval('' + timesubtitles.length) > 0) {
if (enforcedtimeis < 0.0) {
cursecselapsed+=0.1;
}
//console.log('' + cursecselapsed);
if (eval(cursecselapsed) >= eval(stimes[cursubi]) && eval(cursecselapsed) <= eval(etimes[cursubi])) {
if (document.getElementById('subtitlegoeshere').innerHTML == '' && eval('' + timesubtitles.length) > cursubi) {
console.log('found for ' + cursubi);
document.getElementById(maybedet('subtitlegoeshere')).innerHTML=whichone(timesubtitles[cursubi]);
if (('' + document.getElementById('subtitlegoeshere').title) == ('' + document.getElementById('subtitlegoeshere').title).trim()) {
document.getElementById('subtitlegoeshere').title+=' ';
}
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
if (('' + parent.document.getElementById('preareyousinging').title) == '') {
parent.document.getElementById('preareyousinging').title='Captions and subtitles ';
if (wpwp) {
//alert(8);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
} else if (!wpp) {
//alert(1);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
} else {
//alert(11);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
}
}
parent.document.getElementById('preareyousinging').style.backgroundColor='orange';
parent.document.getElementById(parent.maybedetstart('preareyousinging', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('preareyousinging').title=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
} else if (parent.document.getElementById('subtitlegoeshere')) {
if (('' + parent.document.getElementById('subtitlegoeshere').title) == ('' + parent.document.getElementById('subtitlegoeshere').title).trim()) {
parent.document.getElementById('subtitlegoeshere').title+=' ';
}
parent.document.getElementById(parent.maybedetstart('subtitlegoeshere', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('subtitlegoeshere').title=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
} else {
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
}
} else {
for (ithings=0; ithings<stimes.length; ithings++) {
if (eval(cursecselapsed) >= eval(stimes[ithings]) && eval(cursecselapsed) <= eval(etimes[ithings])) {
newsubi=ithings;
//alert('yes ' + ithings);
}
}
if (eval(newsubi) < 0) {
document.getElementById('subtitlegoeshere').innerHTML=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.trim(), '').replace(/\ /g,' ');
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById(parent.maybedet('preareyousinging')).innerHTML=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.trim(), '').replace(/\ /g,' ');
} else if (parent.document.getElementById('subtitlegoeshere')) {
parent.document.getElementById(parent.maybedet('subtitlegoeshere')).innerHTML=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.trim(), '').replace(/\ /g,' ');
}
}
}
if (eval(newsubi) >= 0 && eval(cursubi) >= 0 && eval(newsubi) != eval(cursubi)) {
//alert('' + timesubtitles.length + ' needs to be bigger than ' + newsubi);
if (eval('' + timesubtitles.length) > eval(newsubi)) {
cursubi=newsubi;
console.log('Found for ' + cursubi);
if (('' + timesubtitles[cursubi]).replace(/^undefined$/g,'').replace('WEBVTT FILE', '') != '') {
document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
if (('' + parent.document.getElementById('preareyousinging').title) == '') {
parent.document.getElementById('preareyousinging').title='Captions and subtitles ';
if (wpwp) {
//alert(88);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
} else if (!wpp) {
//alert(111);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { alert(parent.document.getElementById(('' + event.target.id).replace('detdiv','').replace('det','')).title); };
} else {
//alert(1111);
parent.document.getElementById(parent.maybedet('preareyousinging')).onmousedown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
parent.document.getElementById(parent.maybedet('preareyousinging')).ontouchdown=function(event) { parent.ouralert(parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).title,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerText,parent.document.getElementById(('' + event.target.id).replace('detJUNKdiv','').replace('det','')).innerHTML,null); };
}
}
parent.document.getElementById('preareyousinging').style.backgroundColor='orange';
parent.document.getElementById(parent.maybedetstart('preareyousinging', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('preareyousinging').title=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
} else if (parent.document.getElementById('subtitlegoeshere')) {
if (('' + parent.document.getElementById('subtitlegoeshere').title) == ('' + parent.document.getElementById('subtitlegoeshere').title).trim()) {
parent.document.getElementById('subtitlegoeshere').title+=' ';
}
parent.document.getElementById(parent.maybedetstart('subtitlegoeshere', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('subtitlegoeshere').title=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
} else {
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + String.fromCharCode(10) + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
}
}
} else if (eval(newsubi) >= 0 && eval(cursubi) >= 0 && document.getElementById('subtitlegoeshere').innerHTML == '') {
console.log('Found For ' + cursubi);
if (('' + timesubtitles[cursubi]).replace(/^undefined$/g,'').replace('WEBVTT FILE', '') != '') {
document.getElementById('subtitlegoeshere').innerHTML=('' + timesubtitles[cursubi]).replace(/^undefined$/g,'');
if (window.parent) {
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById(parent.maybedet('preareyousinging')).style.backgroundColor='orange';
parent.document.getElementById(parent.maybedetstart('preareyousinging', whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('preareyousinging').title=parent.document.getElementById('preareyousinging').title.replace(parent.document.getElementById('preareyousinging').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
} else if (parent.document.getElementById('subtitlegoeshere')) {
parent.document.getElementById(parent.maybedetstart('subtitlegoeshere',whichaltone(alttimesubtitles[cursubi]))).innerHTML=whichone(timesubtitles[cursubi]);
parent.document.getElementById('subtitlegoeshere').title=parent.document.getElementById('subtitlegoeshere').title.replace(parent.document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
} else {
document.getElementById('subtitlegoeshere').title=document.getElementById('subtitlegoeshere').title.replace(document.getElementById('subtitlegoeshere').title.split('aptions')[0], 'Last (now usefully SubRip editable clickable) caption for ' + stimesf[cursubi] + ' to ' + etimesf[cursubi] + ' is ' + timesubtitles[cursubi] + String.fromCharCode(10) + ' ... ' + String.fromCharCode(10) + 'C');
}
}
}
}
}
if (!isnotplaying) { enforcedtimeis=-1.0; }
}
function convertSrtToText(srt) { // thanks to https://medium.com/@backlinkss.info/convert-srt-to-text-regex-javascript-9660964ee3f0
// Use a expressão regular para remover os números de linha e as marcas de tempo
return srt.replace(/^\d+\n([\d:,.]+ --> [\d:,.]+\n)/gm, '');
}
function fromsecs(outsecs) {
var fromthistimestamp=''; // 21.681 becomes 00:00:02.681
var hrs=Math.floor(eval(outsecs / 3600.0));
var mns=Math.floor(eval(eval(outsecs - hrs * 3600.0) / 60.0));
var scs=Math.floor(eval(eval(outsecs - hrs * 3600.0 - mns * 60.0) / 1.0));
var msc=('' + ('' + (eval(eval(outsecs - hrs * 3600.0 - mns * 60.0 - scs) / 1.0)) + '.').split('.')[1] + '000').substring(0,3);
fromthistimestamp=('0' + ('' + hrs)).slice(-2) + ':' + ('0' + ('' + mns)).slice(-2) + ':' + ('0' + ('' + scs)).slice(-2) + ',' + msc;
//alert('' + outsecs + ' becomes ' + fromthistimestamp);
return ('' + fromthistimestamp).replace(/00\:\00\:00\,000/g, '00:00:00,001').replace(/00\:\00\:00\.000/g, '00:00:00.001');
}
function tosecs(fromthistimestamp) {
//alert('fromthistimestamp=' + fromthistimestamp);
var outsecs=0.0, cola=[], cfactor=1.0, icf=0;
if (fromthistimestamp.replace('.',',').indexOf(',') != -1) {
outsecs+=eval(eval('' + fromthistimestamp.replace('.',',').split(',')[1]) / Math.pow(10.0, eval('' + fromthistimestamp.replace('.',',').split(',')[1].length)));
fromthistimestamp=fromthistimestamp.replace('.',',').split(',')[0];
}
cola=fromthistimestamp.split(':');
for (icf=eval(-1 + cola.length); icf>=0; icf--) {
if (('' + cola[icf]).replace(/0/g,'') != '') {
outsecs+=eval(eval(('' + cola[icf]).replace(/^0/g,'')) * cfactor);
}
//if (fromthistimestamp.indexOf(':01:') != -1) {
//alert('cola[icf]=' + cola[icf] + ' cfactor=' + cfactor + ' outsecs=' + outsecs + ' via ' + fromthistimestamp);
//}
cfactor*=60.0;
}
return outsecs;
}
function stateChanged() {
if (xhr.readyState == 4) {
if (xhr.status == 200) {
if (xhr.response.indexOf(String.fromCharCode(10)) != -1) {
gsrt=xhr.response;
stimes=[];
etimes=[];
timesubtitles=[];
processsrt('');
}
}
}
}
function processsrt(instis) {
var it=0, interimsrt=[];
if (instis != '') {
//alert('instis=' + instis);
gsrt=decodeURIComponent(decodeURIComponent(instis).replace(/\ \+/g,' %2b').replace(/\+/g,' '));
if (gsrt != '' && gsrt.indexOf(String.fromCharCode(10)) == -1 && gsrt.indexOf('=') != -1) {
gsrt=gsrt.split('=')[eval(-1 + gsrt.split('=').length)] + '.srt';
}
if (gsrt.toLowerCase().trim() != gsrt.toLowerCase().trim().replace(/\.srt$/g,'').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt')) {
xhr = new XMLHttpRequest();
xhr.onreadystatechange=stateChanged;
createdlh='#srt=' + encodeURIComponent(gsrt.replace(/SRT\.srt$/g, '.SRT'));
xhr.open('get',gsrt.replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt'),true);
xhr.send(null);
gsrt='';
return decodeURIComponent(instis).replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt');
}
//gsrt='';
//return decodeURIComponent(instis).replace(/SRT\.srt$/g, '.SRT').replace(/VTT\.srt$/g, '.VTT').replace(/vtt\.srt$/g, '.vtt');
}
if (gsrt != '') {
//alert('gsrt=' + gsrt);
if (gsrt.indexOf('=WEBVTT FILE') != -1) {
gsrt='WEBVTT FILE' + gsrt.split('=WEBVTT FILE')[eval(-1 + gsrt.split('=WEBVTT FILE').length)];
} else if (gsrt.indexOf('WEBVTT FILE') != -1) {
gsrt='WEBVTT FILE' + gsrt.split('WEBVTT FILE')[eval(-1 + gsrt.split('WEBVTT FILE').length)];
}
if (gsrt.indexOf('1' + String.fromCharCode(10) + '0') > 0) {
gsrt='1' + String.fromCharCode(10) + '0' + gsrt.substring(gsrt.indexOf('1' + String.fromCharCode(10) + ' 0'));
} else if (gsrt.indexOf('1' + String.fromCharCode(10)) > 0) {
gsrt='1' + String.fromCharCode(10) + gsrt.substring(gsrt.indexOf('1' + String.fromCharCode(10) + ' '));
}
//alert('GSRT=' + gsrt.replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)).replace(String.fromCharCode(10) + String.fromCharCode(10),String.fromCharCode(10)));
gsrt=gsrt.replace(/\~/g, String.fromCharCode(10));
stimes=[];
etimes=[];
stimesf=[];
etimesf=[];
alttimesubtitles=[];
interimsrt=gsrt.split(' --> ');
timesubtitles=convertSrtToText(gsrt).split(String.fromCharCode(10) + String.fromCharCode(10));
for (it=0; it<timesubtitles.length; it++) {
alttimesubtitles.push('');
}
var what='';
for (it=1; it<timesubtitles.length; it++) {
if (timesubtitles[it].trim().slice(-1) == '}' && timesubtitles[it].trim().indexOf('{') > 0) {
alttimesubtitles[it]=timesubtitles[it].trim().split('{')[1].split('}')[0].split('": "')[eval(-1 + timesubtitles[it].trim().split('{')[1].split('}')[0].split('": "').length)].split('"')[0].replace(/\+/g,'%20').replace(/\%2b/g,'+');
timesubtitles[it]=timesubtitles[it].split('{')[0];
}
what+=' ' + timesubtitles[it];
while (what.indexOf(String.fromCharCode(10)) != -1) {
what=what.replace(String.fromCharCode(10), ' ');
}
//window.open('HTTP://localhost:8888/macos_say_record.php?andsoonclose=y&docronwork=say%20' + encodeURIComponent(what), 'sayif', 'top=50,left=50,width=500,height=500');
//what='';
}
//alert(what);
console.log(timesubtitles);
// 1\n00:00:10,500 --> 00:00:13,000\nhuh\n\n2\n00:00:13,000 --> 00:00:23,000\nhuhagain
stimes.push(0.0);
etimes.push(0.0);
stimesf.push('00:00:00.000');
etimesf.push('00:00:00.000');
for (it=1; it<interimsrt.length; it++) {
stimesf.push(('' + (interimsrt[eval(-1 + it)].split(String.fromCharCode(10))[eval(-1 + interimsrt[eval(-1 + it)].split(String.fromCharCode(10)).length)])).replace(',','.'));
etimesf.push(('' + (interimsrt[eval(0 + it)].split(String.fromCharCode(10))[0])).replace(',','.'));
stimes.push(tosecs(interimsrt[eval(-1 + it)].split(String.fromCharCode(10))[eval(-1 + interimsrt[eval(-1 + it)].split(String.fromCharCode(10)).length)]));
etimes.push(tosecs(interimsrt[eval(0 + it)].split(String.fromCharCode(10))[0]));
}
//alert('' + stimes.length + '/' + etimes.length + '/' + timesubtitles.length);
//console.warn(stimes);
//console.warn(etimes);
//console.warn(timesubtitles);
if (!document.getElementById('mysubrip')) {
if (eval('' + etimes.length) > 0) {
cursubi=0;
//alert('yes');
setInterval(writeoutsubtitle, 100);
}
}
}
if (!document.getElementById('mysubrip')) {
if (createdlh == '') {
createdlh='#srt=' + encodeURIComponent(decodeURIComponent(instis).replace(/\+/g,' '));
}
}
//alert('' + stimes.length + '/' + etimes.length + '/' + timesubtitles.length);
//console.log(stimes);
//console.log(etimes);
//console.log(timesubtitles);
return decodeURIComponent(instis);
}
function checkip(iois) {
if (iois.src.indexOf('signature_signature.php') != -1) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body.innerHTML.indexOf('<p>') == 0) {
ipbit=aconto.body.innerHTML.split('<p>')[1].split('<')[0];
}
}
}
}
function sendoff() {
if (urlis != '') {
//alert(urlis);
document.getElementById('fgrid').submit();
//location.href=urlis;
//urlis='';
}
}
function iframemode(inoup) {
// ?total=9&tag=div&period=4000&from=%3ciframe src%3d%22hb11.jpg%22%3e%3c/iframe%3e&to=%3ciframe src%3d%22bb11.jpg%22%3e%3c/iframe%3e
urlis='';
var suff='?', total=0;
retval=inoup;
vidarr=inoup.split(',');
for (var jk=0; jk<9; jk+=1) { //2) {
if (jk < vidarr.length) {
total++;
} else {
total++;
document.getElementById('p' + eval(eval(jk + 1) / 1)).value='?total=9&tag=div&period=4' + eval(eval(jk + 1) / 1) + '00&from=&to=';
}
}
for (var ik=0; ik<9; ik+=1) { //2) {
if (ik < vidarr.length) {
//if (urlis == '') urlis='http://www.rjmprogramming.com.au/HTMLCSS/reveal_div.php';
if (urlis == '') urlis='//www.rjmprogramming.com.au/HTMLCSS/reveal_div.php';
if (eval(10 + ik) < vidarr.length) {
document.getElementById('p' + eval(eval(ik + 1) / 1)).value='?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[eval(10 + ik)];
urlis+=suff + 'p' + + eval(eval(ik + 1) / 1) + '=' + encodeURIComponent('?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[eval(10 + ik)]);
suff='&';
retval=retval.replace(vidarr[ik] + ',' + vidarr[eval(1 + ik)], '');
} else {
document.getElementById('p' + eval(eval(ik + 1) / 1)).value='?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[ik];
urlis+=suff + 'p' + + eval(eval(ik + 1) / 1) + '=' + encodeURIComponent('?total=' + total + '&tag=div&period=4' + eval(eval(ik + 1) / 1) + '00&from=' + vidarr[ik] + '&to=' + vidarr[ik]);
suff='&';
retval=retval.replace(vidarr[ik], '');
}
if (retval != '') {
if (retval.substring(0,1) == ',') {
retval=retval.replace(',','');
}
}
}
}
if (retval != inoup) {
if (retval == '') {
setTimeout(sendoff,500);
//document.getElementById('fgrid').submit();
} else {
setTimeout(sendoff,500);
document.getElementById('fgrid').target='_blank';
//document.getElementById('fgrid').submit();
}
} else {
urlis='';
}
return retval;
}
function force_next() {
if (nexturl == '') {
if (prevurl.indexOf('this=') != -1) {
pgtn="Go to previous Video on the list";
if (("" + prevvid).length > ('cGdz3GNhEQ4').length) pgtn="Go to previous Playlist on the list";
return "<br><a target='_self' href='" + prevurl + "' title='Go to previous'>" + pgtn + "</a>";
}
return "<br><a target='_self' href='" + drhuh(document.referrer) + "' title='Go to previous'>Go to previous</a>";
}
gtn="Go to next Video on the list";
if (("" + nextvid).length > ('cGdz3GNhEQ4').length) gtn="Go to next Playlist on the list";
if (prevurl.indexOf('this=') != -1) {
pgtn="Go to previous Video on the list";
if (("" + prevvid).length > ('cGdz3GNhEQ4').length) pgtn="Go to previous Playlist on the list";
return "<br><a target='_self' href='" + prevurl + "' title='Go to previous'>" + pgtn + "</a>" + "<br><a target='_self' href='" + nexturl + "' title='Go to next'>" + gtn + "</a>";
}
if (document.referrer.indexOf('this=') != -1) {
return "<br><a target='_self' href='" + drhuh(document.referrer) + "' title='Go to previous'>Go to previous</a>" + "<br><a target='_self' href='" + nexturl + "' title='Go to next'>" + gtn + "</a>";
}
return "<br><a target='_self' href='" + nexturl + "' title='Go to next'>" + gtn + "</a>";
}
function etc_quality() {
return "<br>Quality <select id=iqty onchange=' event.target.setPlaybackQuality(this.value); '><option value='highres'>highres</option><option value='hd1080'>hd1080</option><option value='hd720'>hd720</option><option value='large'>large</option><option value='medium' selected>medium</option><option value='small'>small</option><option value='unknown'>unknown</option></select>" + force_next();
}
function etc_playbackrate() {
return "<br>Playback Rate <select id=ipbr onchange=' event.target.setPlaybackRate(this.value); '><option value='0.25'>x 0.25</option><option value='0.5'>x 0.5</option><option value='1.5'>x 1.5</option><option value='1' selected>x 1</option><option value='2'>x 2</option></select>" + etc_quality();
}
function etc_volume() {
return "<br>Volume <input id=ivol onchange=' event.target.setVolume(this.value); ' type=number min=0 max=100 step=1 value=0></input>" + etc_playbackrate();
}
function postprompt(inp) {
var tp=10, lp=10;
if (inp == null) return "";
if (inp == '') return "";
var qs=inp.split(',');
if (eval('' + qs.length) > 1) {
for (var iqs=1; iqs<qs.length; iqs++) {
window.open(document.URL.split('?')[0].split('#')[0] + '?isnextanswer=' + encodeURIComponent(qs[iqs]), '_blank', 'top=' + tp + ',left=' + lp + ',width=600,height=600');
tp+=20;
lp+=20;
}
inp=qs[0];
}
if (inp.toLowerCase().indexOf('cannotenda2# ') != -1) {
pvid='cannotenda2# ' + inp.split('cannotenda2# ')[1].split(',')[0];
//alert('inp=' + inp);
thesewords=inp.split('cannotenda2# ')[1].split(',')[0].split(' ');
if (eval('' + thesewords.length) > 2) {
thistt=pvid.replace(' ' + thesewords[eval(-1 + thesewords.length)], '').split('cannotenda2# ')[1];
}
relh+='#' + encodeURIComponent(pvid.split('#')[1])
}
if (inp.indexOf('+') != -1) iframegridmode=true;
var oup=inp;
while (oup.indexOf('+') != -1) {
oup=oup.replace('+','');
}
while (oup.indexOf(' ') != -1) {
oup=oup.replace(' ','');
}
if (oup.indexOf(';') != -1) {
var ous=oup.split(';');
oup=ous[eval(-1 + ous.length)];
if (ous[0].indexOf(',') != -1) {
var ouss=ous[0].split(',');
vwidth=eval(ouss[0].replace('[','').replace(']',''));
vheight=eval(ouss[1].replace('[','').replace(']',''));
if (vwidth != 640 || vheight != 390) hone=0;
} else {
vwidth=eval(ous[0].replace('[','').replace(']',''));
if (ous.length >= 3) vheight=eval(ous[1].replace('[','').replace(']',''));
if (vwidth != 640 || vheight != 390) hone=0;
}
}
if (iframegridmode) {
oup=iframemode(oup);
}
return oup;
}
function offerform() {
offerdform(hm);
}
function offerdform(howmany) {
var iid="id=i2 onblur=\"document.getElementById('vid').value=this.value;\""; // used to not be commented out below
//alert(createdlh);
var odivc="<form id='oform' target='_self' action='./stop_start_youtube.html" + createdlh + "' method='GET'><input type='hidden' value='2' name='this'></input><input type='hidden' value='-1' name='playtime'></input><input type='hidden' value='" + vidarr[0] + "' id='vid' name='vid'></input><input id='bsubmit' type='submit' value='Play' style='display:none;'></input><br>Current Video Playing 1 of " + howmany + " <input type='text' readonly value='" + vid + "' name='next'></input> ... and then ...";
for (var ij=2; ij<=howmany; ij++) {
odivc+="<br>Video to Play Later " + ij + " of " + howmany + " <input " + iid + " type='text' value='" + vidarr[eval(-1 + ij)] + "' name='next" + ij + "'></input>";
iid='';
}
odivc+="</form>";
document.getElementById('dform').innerHTML = odivc;
tobechecked=document.getElementById('i2');
}
function updatesc() {
cnt+=one;
cntpause+=onepause;
if (toggle == 0) secscnt+=one;
var ours="00" + eval(secscnt % 60);
var ourm="00" + eval((secscnt - ours) / 60);
suffix="#t=" + ourm.substring(eval(ourm.length - 2)) + "m" + ours.substring(eval(ours.length - 2)) + "s";
if (presuffix != "") presuffix=suffix;
if (eval(eval(cnt) - eval(cntpause)) >= duration && eval(duration) > 0) { // && eval(playtime) < 0) {
if (tobechecked != null) {
if (tobechecked.value != '') {
document.getElementById('oform').submit();
}
} else if (nexturl != '') {
console.warn('9875');
if (urlis == '') location.href=nexturl;
} else {
secscnt=cnt;
stopVideo();
}
}
if (window.parent) {
if (parent.document.getElementById('i0')) {
if (('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
//top.document.title='x';
if (('' + parent.document.getElementById('i0').title + ' ').indexOf('#') == 0 || ('' + top.window.sessionStorage.getItem('ssytemp')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
//top.document.title='z';
//alert(5643);
monitorplh();
}
}
}
if (parent.document.getElementById('an_i_thingo')) {
if (parent.document.getElementById('an_i_thingo').value != '') {
parent.document.getElementById('an_i_thingo').value='';
//top.document.title='w';
//alert(5643);
monitorplh();
}
}
}
}
function dolaterthis() {
if (onestodourl != '') {
console.warn('9877');
parent.location.href=onestodourl;
onestodourl='';
}
}
function premonitor(iois) {
var mconto = (iois.contentWindow || iois.contentDocument);
var lastrelcount='' + relcount;
if (mconto != null) {
if (mconto.document) { mconto = mconto.document; }
if (iois.src.indexOf('an_i_thingo=&which_i_thingo=&') != -1) {
//top.document.title='0';
console.warn('count follows ...');
if (mconto.body.innerHTML.indexOf('<span>') != -1) {
var thisrelcount='' + mconto.body.innerHTML.split('<span>')[1].split('<')[0];
console.warn('' + thisrelcount);
//top.document.title+=thisrelcount;
if (thisrelcount != lastrelcount) { relcount=eval('' + thisrelcount); if (relcount > 0) { monitorplh(); } }
}
}
//setInterval(ajaxit, 8000);
}
}
function monitorplh() {
//setTimeout(monitorplh, 13000);
var plhis='';
//try {
//plhis=('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
//} catch (ghjfjh) {
//plhis='';
//}
xblanks+=' ';
if (67 == 87) {
if (plhis.trim() == '' || plhis.replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
plhis=('' + top.window.sessionStorage.getItem('ssytemp')).replace(/^undefined/g,'').replace(/^null/g,'');
if (plhis.replace(/\#http$/g,'') != '') {
top.window.sessionStorage.removeItem('ssytemp');
if (parent.document.getElementById('i0')) {
if (('' + parent.document.getElementById('i0').title + ' ').substring(0,1) == '#') {
parent.document.getElementById('i0').title='';
}
}
}
} else if (('' + parent.document.getElementById('i0').title + ' ').substring(0,1) == '#') {
plhis=('' + parent.document.getElementById('i0').title);
if (parent.document.getElementById('i0')) {
parent.document.getElementById('i0').title='';
}
}
}
//parent.document.getElementById('myh1').innerHTML=wasmlh + xblanks.length + ' VS ' + parent.document.getElementById('i0').title + ' vs ' + top.document.getElementById('plhxxx').innerHTML + ' Vs ' + ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'');
// plhis=top.document.getElementById('plhxxx').innerHTML;
//if (parent.document.getElementById('plhxxx').innerHTML != '' && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
// plhis=parent.document.getElementById('plhxxx').innerHTML;
//} else if (top.document.getElementById('plhxxx').innerHTML != '' && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
// plhis=top.document.getElementById('plhxxx').innerHTML;
//} else if (top.document.title != '' && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
// plhis=top.document.title;
//}
//if (parent.document.getElementById('i0').title.indexOf('#http') != -1 && ('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/\#http$/g,'') == wasmlh.replace(/\#http$/g,'')) {
//alert(56);
//if (parent.document.getElementById('i0').title.replace(/\#http$/g,'') != wasmlh.replace(/\#http$/g,'')) {
//alert(256);
//plhis=parent.document.getElementById('i0').title;
//alert('yes');
//}
//}
if (plhis.replace(/\#http$/g,'') != wasmlh.replace(/\#http$/g,'')) {
if (wasmlh.replace(/\#http$/g,'') == '') {
//alert('0:' + plhis);
wasmlh=plhis.replace(/\#http$/g,'');
stageone(plhis);
} else if (plhis.indexOf(wasmlh.replace(/\#http$/g,'')) == 0) {
//alert('1:' + plhis.split(wasmlh)[1]);
stageone(plhis.split(wasmlh)[1]);
wasmlh=plhis.replace(/\#http$/g,'');
} else if (plhis.indexOf(wasmlh.replace(/\#http$/g,'')) != -1) {
//alert('2:' + plhis.split(wasmlh)[0]);
stageone(plhis.split(wasmlh)[0]);
wasmlh=plhis.replace(/\#http$/g,'');
} else {
//alert('6:' + plhis);
wasmlh=plhis.replace(/\#http$/g,'');
stageone(plhis);
console.warn('it changed');
}
//} else if (wasmlh.replace(/\#http$/g,'') != '') {
// alert(plhis);
}
//if (player == window.self) {
//}
}
function dothislater(afterhowlong, nexturlisthistime) {
onestodourl=nexturlisthistime;
setTimeout(dolaterthis, Math.floor(eval(1000 * eval(onespause + eval('' + afterhowlong)))));
}
function drhuh(indr) {
var outdr=indr;
if (onestodosuffix != '') {
var drhbits=outdr.split('&andthen=')[0].split('#')[0];
if (prevonestodosuffix != onestodosuffix) {
return drhbits[0] + '&andthen=' + prevonestodosuffix;
} else {
var nexties=onestodosuffix.split(';');
var nextdetails=nexties[1].split(',');
if (onestodosuffix.replace(nexties[0] + ";" + nextdetails[0],"") == '') return outdr;
return drhbits[0] + '&andthen=' + onestodosuffix.replace(nexties[0] + ";" + nextdetails[0],"");
}
}
return outdr;
}
function fauxit(insecs) {
if (fauxpas_w) {
//alert(1987);
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(1887);
if (fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(1787);
fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value='' + insecs;
} else {
var sofararr=fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value.split(',');
var farsoarr=fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value.split(',');
if (eval('' + sofararr.length) > eval('' + farsoarr.length) || fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
if (fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value='' + insecs;
} else {
fauxpas_w.document.getElementById('fauxpasendsecs' + fauxpas_w.document.getElementById('tbtheone').value).value+=',' + insecs;
}
} else {
fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value+=',' + insecs;
}
}
}
}
return insecs;
}
function vslfd(inida) {
if (inida.trim() != '') {
//alert('0:' + fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value);
var sofararr=fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value.split(',');
var arrsofar=fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ');
if (fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value != '') {
//alert('1:' + fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value);
if (inida.split('#')[0] != fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ')[eval(-1 + fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ').length)].split('#')[0]) {
//alert('2:' + eval('' + arrsofar.length) + ' < ' + eval('' + sofararr.length) + ' ?');
lastfauxdef=inida;
if (eval('' + arrsofar.length) == eval('' + sofararr.length) && fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value != '') {
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
if (inida.indexOf('#') != -1) {
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
}
}
while (eval('' + arrsofar.length) < eval('' + sofararr.length)) {
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=' , ';
arrsofar=fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value.split(' , ');
}
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[0];
if (inida.indexOf('#') != -1) {
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[1];
}
}
} else {
//alert('2:' + fauxpas_w.document.getElementById('fauxpasstartsecs' + fauxpas_w.document.getElementById('tbtheone').value).value);
fauxpas_w.document.getElementById('fauxpas' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[0];
if (inida.indexOf('#') != -1) {
fauxpas_w.document.getElementById('fauxpasreally' + fauxpas_w.document.getElementById('tbtheone').value).value+=inida.split('#')[1];
}
}
}
//alert(inida);
return inida;
}
function lfmcs() {
var thisvolume=-1, sofarmaxvol=0;
if (ttt.title == lastlfmcs && ttt.title.indexOf(' mute control') != -1) {
try {
thisvolume=eval('' + event.target.getVolume());
if (lastvolume == 0) { lastvolume=-1; }
} catch(thyu) {
thisvolume=-1;
}
if (thisvolume > 0 && ttt.title.indexOf(' mute control') != -1) {
if (ttt.title.indexOf('maxvol:') == -1) {
ttt.title=ttt.title.replace(' mute control', ' maxvol:' + thisvolume + ' mute control');
lastlfmcs=ttt.title;
} else {
sofarmaxvol=eval(ttt.title.split('maxvol:')[1].split(' mute control')[0]);
if (sofarmaxvol < thisvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + thisvolume);
lastlfmcs=ttt.title;
}
}
}
} else if (ttt.title != lastlfmcs) {
lastlfmcs=ttt.title;
if (lastvolume <= 0) {
try {
lastvolume=eval('' + event.target.getVolume());
if (lastvolume == 0) { lastvolume=-1; }
} catch(thyu) {
lastvolume=-1;
}
if (lastvolume > 0 && ttt.title.indexOf(' mute control') != -1) {
if (ttt.title.indexOf('maxvol:') == -1) {
ttt.title=ttt.title.replace(' mute control', ' maxvol:' + lastvolume + ' mute control');
lastlfmcs=ttt.title;
} else {
sofarmaxvol=eval(ttt.title.split('maxvol:')[1].split(' mute control')[0]);
if (sofarmaxvol < lastvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + lastvolume);
lastlfmcs=ttt.title;
}
}
}
}
if (ttt.title.indexOf('maxvol:') != -1) {
maxvolume=eval(ttt.title.split('maxvol:')[1].split(' mute control')[0]);
}
if (lastlfmcs.indexOf('volume:') != -1) {
if (lastlfmcs.split('volume:')[1].toLowerCase().trim().replace(/^0\%/g,'mute').replace(/^100\%/g,'unmute').indexOf('unmute') == 0) {
if (lastvolume > 0) {
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay to unmute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(lastvolume);
//if (eval('' + lastvolume) == 0) { alert('OoPS'); }
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(lastvolume);
}
} catch(thyu) {
}
}
} else if (lastlfmcs.split('volume:')[1].toLowerCase().trim().replace(/^0\%/g,'mute').replace(/^100\%/g,'unmute').indexOf('mute') == 0) {
setTimeout(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay to mute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(0);
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(0);
}
}, 200);
} else if (('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').replace(/^1/g,'0').replace(/^2/g,'0').replace(/^3/g,'0').replace(/^4/g,'0').replace(/^5/g,'0').replace(/^6/g,'0').replace(/^7/g,'0').replace(/^8/g,'0').replace(/^9/g,'0')).indexOf('%') != -1) {
if (('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0]) > 0) {
if (maxvolume > 0) {
lastvolume=eval(eval(eval('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0].split('%')[0]) / 100.0) * eval('' + maxvolume));
if (maxvolume < lastvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + lastvolume);
lastlfmcs=ttt.title;
maxvolume=lastvolume;
}
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay to try unmute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(lastvolume);
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(lastvolume);
}
} catch(thyu) {
}
}
} else if (eval('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0].split('%')[0]) > 0) {
lastvolume=eval('' + lastlfmcs.split('volume:')[1].toLowerCase().replace(/^\ /g,'').replace(/^\ /g,'').replace(/^\ /g,'').split(' ')[0].split(',')[0].split(';')[0].split('|')[0].split('%')[0]);
if (maxvolume < lastvolume) {
ttt.title=ttt.title.replace('maxvol:' + ttt.title.split('maxvol:')[1].split(' mute control')[0], 'maxvol:' + lastvolume);
lastlfmcs=ttt.title;
maxvolume=lastvolume;
}
try {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (confirm('Okay if we try unmute ' + (parent.parent.getlasttitleclicked() != '' ? parent.parent.getlasttitleclicked() : parent.document.getElementById('myh1').innerHTML) + ' ?')) {
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0) {
event.target.playVideo();
}
event.target.setVolume(lastvolume);
if (parent.document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
event.target.playVideo();
}
} else {
setTimeout(function(){ top.donothingmute(); }, 30000);
}
} else {
event.target.setVolume(lastvolume);
}
} catch(thyu) {
}
}
}
}
}
}
function followup() {
var lb='', ilb=2, prevtext=' ', theon='on', thispdu='';
var hgx='';
if (window.parent) {
//alert(parent.document.URL);
if ((parent.document.URL + '~').indexOf('srt=~') != -1 || (parent.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
hgx='srt=';
}
}
if (window.top && hgx == '') {
//alert(parent.document.URL);
if ((top.document.URL + '~').indexOf('srt=~') != -1 || (top.document.URL + '~').indexOf('srt' + encodeURIComponent('=') + '~') != -1) {
hgx='srt=';
}
}
if (document.URL.slice(-4) == 'srt=' || hgx == 'srt=' || ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/srt\=$/g, '') != ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'') && ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^#/g,'') != '') {
if (document.getElementById('subripcommentary')) {
if (document.getElementById('subripcommentary').innerHTML == '') {
document.getElementById('subripcommentary').innerHTML='Awaiting pause for SubRip subtitles <div id=divcbi style=display:inline-block;><iframe class="spag" scrolling="no" data-accept="text/*" id="cbi" frameborder="0" style="display:inline-block;width:173px;height:218px;margin-top:-200px;" src="/HTMLCSS/client_browsing.htm?typeJUNKhastobe=text&straightJUNKtext=y&wordJUNKing=Allimages%20images%2E%20"></iframe></div><br><textarea onblur="hgrip=massage(this.value,hgrip);" id=mysubrip></textarea>';
if (sdivcbi == '') { sdivcbi=document.getElementById('divcbi').innerHTML; }
setInterval(subripize, 1000);
}
}
}
if (window.parent) {
thispdu=parent.document.URL.replace(/^undefined/g,'').replace(/^null/g,'');
if (thispdu.indexOf('#') == -1 && thispdu.indexOf('stop_start_youtube.htm') != -1) {
thispdu+=parent.getlh();
}
midpre='';
if (('' + thispdu).indexOf('WEBVTT%20FILE%0A%0A') != -1) {
midpre='WEBVTT%20FILE%0A%0A';
}
gsrt=( ('' + thispdu).indexOf('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))) != -1 ? processsrt(midpre + '1' + encodeURIComponent(String.fromCharCode(10)) + ('' + thispdu).split('=' + midpre + '1' + encodeURIComponent(String.fromCharCode(10))[1].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) ).replace(/\+/g, ' ') : (('' + thispdu).toLowerCase().replace(encodeURIComponent('.') + 'vtt',encodeURIComponent('.') + 'srt').indexOf(encodeURIComponent('.') + 'srt') != -1 ? processsrt(('' + thispdu).replace(encodeURIComponent('.') + 'SRT','SRT' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'vtt','vtt' + encodeURIComponent('.') + 'srt').replace(encodeURIComponent('.') + 'VTT','VTT' + encodeURIComponent('.') + 'srt').split(encodeURIComponent('.') + 'srt')[0].split(encodeURIComponent(String.fromCharCode(10)) + '&')[0].split(encodeURIComponent(String.fromCharCode(10)) + '#')[0]) : ''));
delay=13; // new idea
if (typeof (window.parent.yesesp) == 'function') {
yes_esp=window.parent.yesesp();
} else if (parent.parent.document.URL) {
if (('' + parent.parent.document.URL).indexOf('/esp_ornot_esp.') != -1) {
yes_esp=true;
}
}
}
setTimeout(function(){
if (!document.getElementById('srcif')) {
if (window.parent) {
if (typeof(parent.checkip) == 'function') {
ipbit=parent.checkip(null);
}
}
}
}, 5000);
if (ttt.title.indexOf(' mute control') != -1) {
setInterval(lfmcs, 2000);
}
if (ttt.title.replace(' !important ;', ' !important;').indexOf(' ; ') != -1) {
if (ttt.title.indexOf('!important') == -1) {
if (4 == 5) { alert("toP.document.title=" + ttt.title); }
}
} else if (onestodoprefix != "") { // multiple dropdown selections
console.log('11: onestodoprefix=' + onestodoprefix + ' onestodosuffix=' + onestodosuffix);
//var nexties=["",""], nextdetails=["",""];
//if (onestodosuffix.indexOf(';') != -1) {
//try {
var nexties=onestodosuffix.split(';');
var nextdetails=nexties[1].split(',');
//} catch(hjgfjh) {
//nexties=["",""];
//nextdetails=["",""];
//}
//}
onestodosuffix=onestodosuffix.replace(nexties[0] + ";" + nextdetails[0] + ",","");
if (onestodosuffix == "") onestodoprefix="";
prevonestodosuffix=onestodosuffix;
theon='on';
if (window.parent) {
if (parent.document.URL.indexOf('c0=on') == -1) { theon='off&ezj=1'; }
}
dothislater(nexties[0], document.referrer.split('?')[0].split('#')[0] + "?youtubeid=" + nextdetails[0] + "&youtube_duration=" + nextdetails[1] + "&email=&email=&emoji=on&c0=" + theon + "&i0=0&j0=" + nextdetails[1] + "&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=" + onestodoprefix + encodeURIComponent(onestodosuffix));
}
if (kpi == -9) {
//alert(99);
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) {
//alert(990);
//parent.document.getElementById('myh1').innerHTML='zxkpi' + document.URL;
if (document.URL.indexOf('start=0') == -1 || document.URL.indexOf('playtime=0') == -1) {
//alert(9900);
kpi=-8;
kpi=0; //event.target.getCurrentTime();
setTimeout(keepParentInformed,1000);
}
}
}
thistext=location.search.split('this=')[1] ? location.search.split('this=')[1].split('&')[0] : '';
if (thistext != '') {
of = ' ' + thistext + ' of ';
nexttext=eval(1 + eval(thistext));
if (nexttext >= 2) prevtext=eval(-1 + eval(thistext));
if (("" + prevtext) == "1") prevtext="";
} else if (document.URL.indexOf('next2=') != -1) {
of = ' 1 of ';
nexttext=2;
}
nextvid=location.search.split('next' + nexttext + '=')[1] ? location.search.split('next' + nexttext + '=')[1].split('&')[0] : '';
if (nextvid != '') {
//alert(nextvid + " " + 'vid=' + vid + " NEWvid=" + nextvid + " " + document.URL);
nexturl=document.URL.replace('this=' + thistext + '&', 'this=' + nexttext + '&').replace('vid=' + vid + play_list_id, 'vid=' + nextvid);
//alert(nexturl);
}
if (prevtext != ' ') {
prevvid=location.search.split('next' + prevtext + '=')[1] ? location.search.split('next' + prevtext + '=')[1].split('&')[0] : '';
if (prevvid != '') {
prevurl=document.URL.replace('this=' + thistext + '&', 'this=' + prevtext + '&').replace('vid=' + vid + play_list_id, 'vid=' + prevvid);
}
}
//alert(nexttext + '=nexttext nextvid=' + nextvid + ' nexturl=' + nexturl);
if (document.URL.indexOf('next2=') != -1) {
while (document.URL.indexOf('next' + ilb + '=') != -1) {
ilb++;
}
lb=eval(ilb - 1);
of+=lb + ' ';
}
}
function analyzemaybe(playing, paused, isdone) {
if (document.URL.indexOf('start=') != -1 && document.URL.indexOf('playtime=') != -1) {
if (document.URL.indexOf('start=0') == -1 || document.URL.indexOf('playtime=0') == -1) {
if (paused != 0) {
var urp=parent.document.getElementById('updatethisplease');
if (urp) {
if (urp.value != '') {
var urpvalue=urp.value;
try {
parent.document.getElementById(urpvalue).value=eval(event.target.getCurrentTime()).toFixed(3);
} catch(hgfd) {
parent.document.getElementById(urpvalue).value=eval(player.getCurrentTime()).toFixed(3);
}
if (wpwp) { if (88 == 89 || wpwp.document.getElementById('curct').innerHTML == '') {
// alert('6:' + '' + eval(event.target.getCurrentTime()).toFixed(3));
try {
wpwp.document.getElementById('curct').innerHTML='' + eval(event.target.getCurrentTime()).toFixed(3);
} catch(hgfhjgf) {
wpwp.document.getElementById('curct').innerHTML='' + eval(player.getCurrentTime()).toFixed(3);
}
} }
if (urpvalue.indexOf('i') == 0) {
urpvalue=urpvalue.replace('i','j');
parent.document.getElementById('updatethisplease').value=urpvalue;
} else {
urpvalue=urpvalue.replace('j','');
urpvalue=eval(1 + eval(urpvalue));
urpvalue='i' + urpvalue;
if (parent.document.getElementById(urpvalue).value == "") {
parent.document.getElementById(urpvalue.replace('i','c')).checked=true;
}
parent.document.getElementById('updatethisplease').value=urpvalue;
}
//alert(urpvalue);
}
}
}
}
}
}
function yeswell() {
var ismedia=checkforaudio(true);
if (ismedia) {
//alert('IVID=' + ivid + ' and vid=' + vid + ' and endcnt=' + endcnt + ' and urL=' + document.URL);
return '';
}
if (eval('' + endcnt) == 1) {
endcnt=5;
var sufx='';
var capitalloop=top.document.getElementById('listeleven').getAttribute('data-title');
if ((capitalloop + 'a').substring(0,1) == 'X') {
sufx='^' + top.document.getElementById('listeleven').innerHTML.split('^')[0].replace(' ','').replace(' ','').trim();
}
if (top.document.getElementById('listeleven').innerHTML.indexOf('^') != -1) {
window.top.focus();
sufx='';
//alert('pre 1');
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '^','') + sufx; //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
//alert('1:' + top.document.getElementById('listeleven').innerHTML);
//ttt.title+=' ' + top.document.getElementById('listeleven').innerHTML.toUpperCase() + ' ';
//if (sufx != '') { alert(top.document.getElementById('listeleven').innerHTML); }
//ttt.title+=' 4';
} else {
window.top.focus();
//alert('pre 2');
var capitalloopx=top.document.getElementById('listeleven').getAttribute('data-title');
sufx=top.document.getElementById('listeleven').title; //sufx.replace('^','');
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '','') + sufx; //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
//alert('2:' + top.document.getElementById('listeleven').innerHTML);
//ttt.title+=' ' + top.document.getElementById('listeleven').innerHTML.toLowerCase() + ' ';
if ((capitalloopx + 'a').substring(0,1) == 'X') {
if (top.document.emojirestart) {
top.document.emojirestart();
} else {
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (itop != -1) { topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1234567); }
}
//ttt.title+=' 1';
top.document.getElementById('myh1').style.marginLeft='1px';
//ttt.title+='2';
window.top.scrollTo(0,0);
//ttt.title+='3';
}
}
}
}
}
function consolelog(inm) {
if (window.top) {
//alert(1);
if (top.document.getElementById('postlist') && top.document.URL.indexOf('debug=') != -1) {
//alert(101);
top.document.getElementById('postlist').style.display='block';
top.document.getElementById('postlist').innerHTML+='<br>' + inm;
} else if (('' + typeof window.top.consolelog) == 'function' && top.document.URL.indexOf('debug=') != -1) {
//alert(201);
window.top.consolelog(inm);
} else {
//alert('11 ' + typeof window.top.consolelog);
console.log(inm);
}
} else {
//alert(111);
console.log(inm);
}
}
</script>
</head>
<body onload=' followup(); setInterval(updatesc,1000);' style='background-color: transparent;'>
<form id='fgrid' method='POST' target='_self' action='//www.rjmprogramming.com.au/HTMLCSS/reveal_div.php'>
<input style='display:none' type='submit' value='Show in Grid' id='bgrid'></input>
<input type='hidden' value='' id='p1' name='p1'></input>
<input type='hidden' value='' id='p2' name='p2'></input>
<input type='hidden' value='' id='p3' name='p3'></input>
<input type='hidden' value='' id='p4' name='p4'></input>
<input type='hidden' value='' id='p5' name='p5'></input>
<input type='hidden' value='' id='p6' name='p6'></input>
<input type='hidden' value='' id='p7' name='p7'></input>
<input type='hidden' value='' id='p8' name='p8'></input>
<input type='hidden' value='' id='p9' name='p9'></input>
</form>
<!-- 1. The <iframe> (and video player) will replace this <div> tag. -->
<div id="player"></div>
<script>
// 2. This code loads the IFrame Player API code asynchronously.
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
vwidth=location.search.split('width=')[1] ? eval(location.search.split('width=')[1].split('&')[0]) : vwidth;
vheight=location.search.split('height=')[1] ? eval(location.search.split('height=')[1].split('&')[0]) : vheight;
// 3. This function creates an <iframe> (and YouTube player)
// after the API code downloads.
//var player;
if (document.URL.indexOf('vid=') != -1) {
thistt='';
vid=location.search.split('vid=')[1] ? location.search.split('vid=')[1].split('&')[0] : postprompt((isnextanswer != '' ? isnextanswer : prompt('Please enter YouTube video id or playlist id (or a comma separated list of these, that can include a + to have up to 18 of them occur in a parent iframe grid), and optionally prefix by [640;][390;] which is [width;][height;] ... a special answer of cannotenda2 (optionally appended by hash and then, an optional space beginning and ending title but more crucially, a media data URI or absolute media URL) will play non YouTube content Eg. ' + String.fromCharCode(10) + 'cannotenda2# My Audio Example /Mac/iPad/slide1.m4a', previd)));
if (vid.trim() != '') {
//alert('vID=' + vid);
if (thistt != '') {
relh='#' + encodeURIComponent(pvid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=pvid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2#') != -1) {
relh='#' + encodeURIComponent(vid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=vid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2') == 0) {
if (relh != '') {
//alert('0:' + relh);
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
//alert(location.hash);
} else if (('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace('#http','') == '') {
//alert('XZ=' + relh + ' ... ' + parent.location.hash);
relh='#' + encodeURIComponent(' School Activities Video /school_activities_vd.mp4');
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
}
}
if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}
//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}
if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
startagain=true;
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim().toLowerCase() != 'y') {
lastokn=eval( ('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() );
}
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,''))) {
setInterval(retry, 5000);
}
}
}
}
vidarr=vid.split(',');
var splaytime="";
if (vid.indexOf(',') != -1) {
vid=vidarr[0];
if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}
//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}
if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}
splaytime=eval(-vidarr.length);
} else if (urlis != '' && document.URL.indexOf('playtime=') == -1) {
//location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000';
splaytime="-1";
oknow=false;
setTimeout(sendoff,2000);
} else if (vid.length > ('cGdz3GNhEQ4').length && document.URL.indexOf('playtime=') == -1) {
if (urlis == '') location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000' + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + ('' + relh);
splaytime="-1";
oknow=false;
} else if (document.URL.indexOf('start=') != -1) {
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
splaytime='-1';
} else {
if (isnextanswer != '' || yeslook) {
splaytime=(playtime / 1000);
} else {
splaytime=location.search.split('playtime=')[1] ? eval(1000.0 * eval(location.search.split('playtime=')[1].split('&')[0])) : prompt('Please enter YouTube video ' + vid + ' playtime snippets in seconds (-1 to play whole video in one session, -2 (or -n) to play whole video and perhaps more (n in total) to follow in one session). Append # and a SubRip subtitles/captions *.srt or *.vtt filename to read and process such captioning. Append #srt= to prompt for the creation of a SubRip subtitle or caption file data.', playtime / 1000);
}
}
if (splaytime == null) { splaytime=''; }
if (('' + splaytime + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
splaytime=splaytime.split('#')[0];
} else if (('' + splaytime).indexOf('#') != -1) {
location.hash='#captionis=' + encodeURIComponent(splaytime.split('#')[1]);
splaytime=splaytime.split('#')[0];
}
} else {
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
splaytime='-1';
} else {
if (isnextanswer != '' || yeslook) {
splaytime=(playtime / 1000);
} else {
splaytime=location.search.split('playtime=')[1] ? location.search.split('playtime=')[1].split('&')[0] : prompt('Please enter YouTube video ' + vid + ' playtime snippets in seconds (-1 to play whole video in one session, -2 (or -n) to play whole video and perhaps more (n in total) to follow in one session). Append # and a SubRip subtitles/captions *.srt or *.vtt filename to read and process such captioning. Append #srt= to prompt for the creation of a SubRip subtitle or caption file data.', playtime / 1000);
}
}
if (splaytime == null) { splaytime=''; }
if (('' + splaytime + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
splaytime=splaytime.split('#')[0];
} else if (('' + splaytime).indexOf('#') != -1) {
location.hash='#captionis=' + encodeURIComponent(splaytime.split('#')[1]);
splaytime=splaytime.split('#')[0];
}
}
if (document.URL.indexOf('playtime=') != -1) {
playtime=eval(eval("" + splaytime) * 1);
} else if (("" + splaytime) != "-1" && ("" + splaytime).indexOf("-") == 0) {
playtime=eval(-1 * 1000);
hm=eval(("" + splaytime).replace('-',''))
of=' 1 of up to ' + hm + ' ';
if (oknow) setTimeout(offerform,2000);
} else {
playtime=eval(eval("" + splaytime) * 1000);
}
} else {
thistt='';
vid=location.search.split('vid=')[1] ? location.search.split('vid=')[1].split('&')[0] : postprompt((isnextanswer != '' ? isnextanswer : prompt('Please enter YouTube video id or playlist id (or a comma separated list of these, that can include a + to have up to 18 of them occur in a parent iframe grid), and optionally prefix by [640;][390;] which is [width;][height;] ... a special answer of cannotenda2 (optionally appended by hash and then, an optional space beginning and ending title but more crucially, a media data URI or absolute media URL) will play non YouTube content Eg. ' + String.fromCharCode(10) + 'cannotenda2# My Audio Example /Mac/iPad/slide1.m4a', previd)));
if (vid.trim() != '') {
//alert('vId=' + vid + ' and pvid=' + pvid + ' and thistt=' + thistt);
if (thistt != '') {
relh='#' + encodeURIComponent(pvid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=pvid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2#') != -1) {
relh='#' + encodeURIComponent(vid.split('#')[1])
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
vid=vid.split('#')[0]; // /school_activities_vd.mp4
samepage();
} else if (vid.toLowerCase().indexOf('cannotenda2') == 0) {
if (relh != '') {
//alert('xz=' + relh);
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
} else if (('' + parent.location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace('#http','') == '') {
//alert('xZ=' + relh);
relh='#' + encodeURIComponent(' School Activities Video /school_activities_vd.mp4');
if (prepurd == purld || 3 == 3) { location.hash=relh; } //'#' + encodeURIComponent(vid.split('#')[1]);
samepage();
}
}
if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}
//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}
if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
startagain=true;
if (('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim().toLowerCase() != 'y') {
lastokn=eval( ('' + window.sessionStorage.getItem('loop_' + vid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() );
}
if (1 == 1 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
if (parent.parent.document.getElementById(location.hash.replace(/\#/g,''))) {
setInterval(retry, 5000);
}
}
}
}
vidarr=vid.split(',');
var ssplaytime="";
if (vid.indexOf(',') != -1) {
vid=vidarr[0];
if (window.parent) {
if (top.document.URL.indexOf('/stop_start_') != -1 && ('' + top.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (top.window.opener.window.opener) {
//alert('5643 ' + top.window.opener.window.opener.document.URL);
if (top.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=top.window.opener.window.opener; //alert('fOund');
//alert(fauxpas_w.document.getElementById('tbtheone').value);
//alert(fauxpas_w.gettheone());
} else if (top.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=top.window.opener.window.opener; //alert('yes FounD');
}
}
}
//alert(564);
if (parent.document.URL.indexOf('/karaoke_') != -1 && ('' + parent.document.URL + '~').indexOf('srt=~') != -1) {
//alert(5642);
if (parent.window.opener.window.opener) {
//alert(5643);
if (parent.window.opener.window.opener.document.URL.replace('/video_commentary.htm', '/song_lyric_faux_pas.htm').indexOf('/song_lyric_faux_pas.htm') != -1) {
//alert(5644);
fauxpas_w=parent.window.opener.window.opener; //alert('fOund');
} else if (parent.window.opener.window.opener.getElementById('cbbeep')) {
fauxpas_w=parent.window.opener.window.opener; //alert('yes FounD');
}
}
}
if (fauxpas_w) {
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value)) {
//alert(887);
if (fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value == '') {
//alert(787);
fauxpas_w.document.getElementById('youtubeid' + fauxpas_w.document.getElementById('tbtheone').value).value='' + vid;
if (fauxpas_w.document.URL.indexOf('/video_commentary.htm') != -1) {
fauxmore=' If you separate string by # we will consider this as Commentary or Note#Lead In';
} else {
fauxmore=' If you separate string by # we will consider this as Faux Pas#Actual.';
}
}
}
}
}
ssplaytime=eval(-vidarr.length);
} else if (urlis != '' && document.URL.indexOf('playtime=') == -1) {
//location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000';
ssplaytime="-1";
oknow=false;
setTimeout(sendoff,2000);
} else if (vid.length > ('cGdz3GNhEQ4').length && document.URL.indexOf('playtime=') == -1) {
if (urlis == '') location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=-1000' + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + relh;
ssplaytime="-1";
oknow=false;
} else {
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
ssplaytime='-1';
} else {
if (isnextanswer != '' || yeslook) {
ssplaytime=(playtime / 1000);
} else {
ssplaytime=location.search.split('playtime=')[1] ? location.search.split('playtime=')[1].split('&')[0] : prompt('Please enter YouTube video ' + vid + ' playtime snippets in seconds (-1 to play whole video in one session, -2 (or -n) to play whole video and perhaps more (n in total) to follow in one session). Append # and a SubRip subtitles/captions *.srt or *.vtt filename to read and process such captioning. Append #srt= to prompt for the creation of a SubRip subtitle or caption file data.', playtime / 1000);
}
}
if (ssplaytime == null) { ssplaytime=''; }
if (('' + ssplaytime + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
ssplaytime=ssplaytime.split('#')[0];
} else if (ssplaytime.indexOf('#') != -1) {
location.hash='#captionis=' + encodeURIComponent(ssplaytime.split('#')[1]);
ssplaytime=ssplaytime.split('#')[0];
}
}
if (document.URL.indexOf('playtime=') != -1) {
playtime=eval(eval("" + ssplaytime) * 1);
} else if (("" + ssplaytime) != "-1" && ("" + ssplaytime).indexOf("-") == 0) {
playtime=eval(-1 * 1000);
hm=eval(("" + ssplaytime).replace('-',''))
if (hm > hone) {
anymore='&this=&width=' + vwidth + '&height=' + vheight + '&next=' + vid;
for (var iu=2; iu<=hm; iu++) {
anymore+='&next' + iu + '=' + vidarr[eval(-1 + iu)];
}
}
of=' 1 of up to ' + hm + ' ';
//alert(vid + " " + ssplaytime + " " + ("" + ssplaytime).indexOf("-") + " " + hm);
if (oknow) setTimeout(offerform,2000);
} else if (hone == 0) {
anymore='&this=&width=' + vwidth + '&height=' + vheight + '&next=' + vid;
playtime=eval(eval("" + ssplaytime) * 1000);
} else {
playtime=eval(eval("" + ssplaytime) * 1000);
}
if (urlis == '' && ((vid != previd && vid.indexOf(',') == -1) || vwidth != 640 || vheight != 390)) location.href='./stop_start_youtube.html?vid=' + vid + '&playtime=' + playtime + anymore + ('' + location.hash).replace(/^undefined/g,'').replace(/^null/g,'').replace(/^\#$/g,'') + relh;
}
function pretrylater(inv) {
curcont=inv;
trylater();
}
function trylater() {
//alert('there');
if (document.getElementById('rhcell')) {
document.getElementById('lhcell').style.display='none';
document.getElementById('rhcell').style.display='table-cell';
document.getElementById('rhcell').innerHTML=contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont];
} else {
if (document.getElementById(lastplayer)) {
document.body.innerHTML=document.body.innerHTML.replace(document.getElementById(lastplayer).outerHTML, '<table style="width:100%;margin:0 0 0 0;padding:0 0 0 0;"><tr><td id=lhcell style=display:none;>' + document.getElementById(lastplayer).outerHTML + '</td><td id=rhcell style=display:table-cell;>' + contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont] + '</td></tr></table>'); // '<iframe id="player" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="your wish has been granted" width="640" height="390" src="https://www.youtube.com/embed/7o9wvYXR3n0?enablejsapi=1&origin=http%3A%2F%2Flocalhost%3A8888&widgetid=1&forigin=http%3A%2F%2Flocalhost%3A8888%2FHTMLCSS%2Fstop_start_youtube.html&aoriginsup=1&vf=6"></iframe>');
if (conttitle[curcont] != '') { document.getElementsByTagName('h1')[0].innerHTML=conttitle[curcont]; }
if (contprefixes[curcont].indexOf('vcont' + curcont) != -1) {
lastplayer='vcont' + curcont;
} else if (contprefixes[curcont].indexOf('acont' + curcont) != -1) {
lastplayer='acont' + curcont;
} else {
lastplayer='cont' + curcont;
}
curcont++;
//alert('where');
}
}
}
function onYouTubeIframeAPIReady() {
if (window.parent) {
if ((('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's') || ('' + parent.document.URL).toLowerCase().indexOf('cannotenda2') != -1 || (('' + parent.document.URL).indexOf('i1=') != -1 && ('' + parent.document.URL).indexOf('i1=&') == -1))) {
if (!document.getElementById('rhcell')) {
wasmlh=('' + parent.location.hash).replace(/^undefined/g,'').replace(/^none/g,'');
//alert(wasmlh);
try {
top.window.sessionStorage.removeItem('ssytemp');
} catch (jhghfgkh) {
}
setTimeout(monitorplh, 3000);
if (document.getElementById(lastplayer)) {
document.body.innerHTML=document.body.innerHTML.replace(document.getElementById(lastplayer).outerHTML, '<table style="width:100%;margin:0 0 0 0;padding:0 0 0 0;"><tr><td id=lhcell style=display:table-cell;>' + document.getElementById(lastplayer).outerHTML + '</td><td id=rhcell style=display:none;></td></tr></table>'); // '<iframe id="player" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="your wish has been granted" width="640" height="390" src="https://www.youtube.com/embed/7o9wvYXR3n0?enablejsapi=1&origin=http%3A%2F%2Flocalhost%3A8888&widgetid=1&forigin=http%3A%2F%2Flocalhost%3A8888%2FHTMLCSS%2Fstop_start_youtube.html&aoriginsup=1&vf=6"></iframe>');
}
}
}
}
if (vid.toLowerCase() == 'cannotenda2') {
curvaridx=variants.indexOf(vid);
if (1 == 5 && eval('' + contprefixes.length) > 0) {
altplayer=player;
player=window.self;
}
if (document.getElementById('rhcell')) {
document.getElementById('lhcell').style.display='none';
document.getElementById('rhcell').style.display='table-cell';
document.getElementById('rhcell').innerHTML=contprefixes[eval(-1 + contprefixes.length)].replace('>',' width="640" height="390">') + conturls[eval(-1 + contprefixes.length)] + contsuffixes[eval(-1 + contprefixes.length)];
} else {
//alert('lastplayer=' + lastplayer);
//alert(document.getElementById(lastplayer).outerHTML);
if (curcont < 0) {
yeslook=stageone('');
stagetwo('');
if (window.parent) {
if (parent.document.getElementById('myh1') && thistt != '') {
parent.document.getElementById('myh1').innerHTML='' + thistt;
} else if (parent.document.getElementById('myh1') && conttitle[0] != '') {
parent.document.getElementById('myh1').innerHTML='' + conttitle[0];
}
}
}
//alert('curcont=' + curcont);
//alert(contprefixes[curcont]);
if (!document.getElementById(lastplayer)) {
//alert('here');
setTimeout(trylater, 2000);
} else {
document.body.innerHTML=document.body.innerHTML.replace(document.getElementById(lastplayer).outerHTML, '<table style="width:100%;margin:0 0 0 0;padding:0 0 0 0;"><tr><td id=lhcell style=display:none;>' + document.getElementById(lastplayer).outerHTML + '</td><td id=rhcell style=display:table-cell;>' + contprefixes[curcont].replace('>',' width="640" height="390">') + conturls[curcont] + contsuffixes[curcont] + '</td></tr></table>'); // '<iframe id="player" frameborder="0" allowfullscreen="" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" title="your wish has been granted" width="640" height="390" src="https://www.youtube.com/embed/7o9wvYXR3n0?enablejsapi=1&origin=http%3A%2F%2Flocalhost%3A8888&widgetid=1&forigin=http%3A%2F%2Flocalhost%3A8888%2FHTMLCSS%2Fstop_start_youtube.html&aoriginsup=1&vf=6"></iframe>');
if (conttitle[curcont] != '') { document.getElementsByTagName('h1')[0].innerHTML=conttitle[curcont]; }
}
if (contprefixes[curcont].indexOf('vcont' + curcont) != -1) {
lastplayer='vcont' + curcont;
} else if (contprefixes[curcont].indexOf('acont' + curcont) != -1) {
lastplayer='acont' + curcont;
} else {
lastplayer='cont' + curcont;
}
curcont++;
//return '';
}
} else if (vid.length > ('cGdz3GNhEQ4').length) {
if (document.getElementById('rhcell')) {
document.getElementById('rhcell').style.display='none';
document.getElementById('lhcell').style.display='table-cell';
}
play_list_id=vid;
vid='';
player = new YT.Player('player', {
width: vwidth,
height: vheight,
playerVars:
{
listType: 'playlist',
list: play_list_id,
index: 0
},
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
//event.target.playVideoAt(0);
} else {
if (document.getElementById('rhcell')) {
document.getElementById('rhcell').style.display='none';
document.getElementById('lhcell').style.display='table-cell';
}
console.log('' + ('' + new Date()) + ' ViD=' + vid + ' ivid=' + ivid + ' referrer=' + document.referrer + ' uRl=' + document.URL);
var ismedia=false;
ismedia=checkforaudio(false);
if (!ismedia) {
player = new YT.Player('player', {
height: vheight,
width: vwidth,
videoId: vid,
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
console.log('Parent is ' + parent.document.URL);
dovidarrv();
}
}
if (document.URL.indexOf('negpos=') != -1) {
setTimeout(function(){
if (3 == 5) {
document.body.width='200px';
document.body.style.overflowX='visible';
document.getElementsByTagName('iframe')[0].style.zIndex='999';
document.getElementsByTagName('iframe')[0].style.overflowX='visible';
}
document.getElementsByTagName('iframe')[0].style.position='absolute';
//document.body.style.zIndex='-999';
//document.getElementsByTagName('iframe')[0].style.zIndex='-999';
//parent.document.getElementById('ifhost').style.zIndex='-999';
parent.document.getElementById('ifhost').style.marginLeft='-200px';
document.body.onmousemove=function(event){ parent.omd(event); };
document.body.onmouseover=function(event){ parent.omd(event); };
document.body.onmouseout=function(event){ parent.omd(event); };
document.body.ontouchmove=function(event){ parent.otd(event); };
document.getElementsByTagName('iframe')[0].onmousemove=function(event){ parent.omd(event); };
document.getElementsByTagName('iframe')[0].onmouseover=function(event){ parent.omd(event); };
document.getElementsByTagName('iframe')[0].onmouseout=function(event){ parent.omd(event); };
document.getElementsByTagName('iframe')[0].ontouchmove=function(event){ parent.otd(event); };
}, 5000);
}
}
function butellipsis(owhat) {
var theval='', tv=0;
if (owhat.indexOf('image/svg') != -1) { return owhat.replace(/\+/g,' ').replace('image/svg xml','image/svg+xml'); }
if ((7 == 7 || owhat.indexOf('data:') != -1)) { // && encodeURIComponent(owhat).toLowerCase().indexOf('%e2%80%a6') != -1) {
//alert(owhat);
//alert(parent.document.getElementById('urlbig').value);
if (('' + parent.document.getElementById('spareurlbig').value).indexOf('data:') != -1) {
theval='data:' + parent.document.getElementById('spareurlbig').value.split('data:')[1];
for (tv=1; tv<=10; tv++) {
if (parent.document.getElementById('spareurlbig' + eval(tv % 10))) {
if (parent.document.getElementById('spareurlbig' + eval(tv % 10)).value == theval) {
parent.document.getElementById('spareurlbig' + eval(tv % 10)).value='';
if (parent.document.getElementById('spareurlbig' + eval(eval(1 + tv) % 10))) {
parent.document.getElementById('spareurlbig').value=parent.document.getElementById('spareurlbig' + eval(eval(1 + tv) % 10)).value;
return theval;
}
}
}
}
return theval;
}
return 'data:' + parent.document.getElementById('urlbig').value.split('data:')[1];
} else if (owhat.indexOf('data:') != -1) {
return 'data:' + owhat.split('data:')[1];
}
return owhat;
}
function checkforaudio(atend) {
var etype='audio';
var newa=null, newv=null;
var ismedia=false;
var jvid=-1, numreldata=0, thisnumreldata=0, lhd='', lhds=[];
var jv=0;
thispt='0';
if (document.URL.indexOf('&playtime=') != -1) {
thispt=('' + decodeURIComponent(document.URL.split('&playtime=')[1].split('&')[0].split('#')[0]));
//alert(thispt + ' ' + duration);
while (parent.document.getElementById('j' + jv)) {
if (parent.document.getElementById('j' + jv).value == thispt) {
if (jvid == -1) {
if (parent.document.getElementById('i' + jv).value.indexOf('data') == 0) {
jvid=jv;
thisnumreldata=numreldata;
}
} else {
//alert('OoPs');
jvid=-2;
}
}
if (parent.document.URL.indexOf(encodeURIComponent('i' + jv + '=data')) != -1 && (parent.document.URL.indexOf(encodeURIComponent('i' + jv + '=data&')) == -1 && parent.document.URL.indexOf(encodeURIComponent('i' + jv + '=data#')) == -1)) {
numreldata++;
} else if (parent.document.URL.indexOf('i' + jv + '=data') != -1 && (parent.document.URL.indexOf('i' + jv + '=data&') == -1 && parent.document.URL.indexOf('i' + jv + '=data#') == -1)) {
numreldata++;
}
jv++;
}
if (jvid >= 0) {
//alert('Yes ' + atend + ' ' + jvid + ' thispt=' + thispt);
if ((parent.document.URL.indexOf('i' + jvid + '=data') != -1 || parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data')) != -1)) {
//alert('audio ');
if (parent.document.URL.indexOf('c' + jvid + '=on') != -1 || parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
//alert('auDio ');
if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('video') != -1) {
etype='video';
} else if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf('c' + jvid + '=on') != -1) {
if (parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0].indexOf('video') != -1) {
etype='video';
} else if (parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('video') != -1) {
etype='video';
} else if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf('c' + jvid + '=on') != -1) {
if (parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0].indexOf('image') != -1) {
etype='img';
}
} else if (parent.document.URL.indexOf(encodeURIComponent('c' + jvid + '=on')) != -1) {
if (parent.document.URL.split(encodeURIComponent('i' + jvid + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].indexOf('image') != -1) {
etype='img';
}
}
newa=document.createElement(etype);
if (etype == 'img') {
newa.onload=function(event){
etg=event.target;
if (parent.document.URL.indexOf(encodeURIComponent('c' + eval(1 + jvid) + '=on')) != -1 || parent.document.URL.indexOf(('c' + eval(1 + jvid) + '=on')) != -1) {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
if (parent.document.getElementById('loopchk')) {
if (parent.document.getElementById('loopchk').checked) {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
} else {
setTimeout(function(){ setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
}
};
} else {
newa.onloadedmetadata=function(event){
etg=event.target;
if (parent.document.URL.indexOf(encodeURIComponent('c' + eval(1 + jvid) + '=on')) != -1 || parent.document.URL.indexOf(('c' + eval(1 + jvid) + '=on')) != -1) {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
if (parent.document.getElementById('loopchk')) {
if (parent.document.getElementById('loopchk').checked) {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } parent.queuenext(); }, eval(eval('' + thispt) * 1000)); }, 300);
} else {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
} else {
setTimeout(function(){ etg.play(); setTimeout(function(){ if (parent.getnim()) { parent.setnim(false); } }, eval(eval('' + thispt) * 1000)); }, 300);
}
}
//alert('played');
};
}
//newa.onload=function(event){
// etg=event.target;
// setTimeout(function(){ etg.play(); alert(564); }, 900);
//};
//if (parent.document.URL.indexOf('#') != -1) {
// alert(parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data')));
// alert(parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data&')));
// alert(parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data#')));
//}
if (parent.document.URL.indexOf('#') != -1 && parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data')) != -1 && (parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data&')) == -1 && parent.document.URL.indexOf(encodeURIComponent('i' + jvid + '=data#') == -1))) {
lhd=decodeURIComponent(decodeURIComponent(parent.document.URL.split('#')[1])).replace(/\ /g,'+');
lhds=lhd.split('data:');
//alert('lhds.length=' + lhds.length + ' and thisnumreldata=' + thisnumreldata);
if (eval('' + lhds.length) >= eval(1 + eval('' + thisnumreldata))) {
//alert('AuDiO ' + atend + ' data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
ismedia=true;
//alert('1a:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
//alert('1b:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0].slice(-20));
newa.src=butellipsis('data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
parent.document.getElementById('i' + jvid).value=newa.src;
duration=eval('' + thispt);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('987:' + duration);
//}
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById('preareyousinging').innerHTML+='<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype.replace('img','image') + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0].split('+')[0] + ' src="' + newa.src + ('" controls></' + etype).replace('" controls></img','"></img') + '><br>';
//pwo=parent.window.open('','_blank','top=50,left=50,width=600,height=600');
//pwo.document.write('<html><body>' + '<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0] + ' src="' + newa.src + '" controls></' + etype + '><br>' + '</body></html>');
}
}
} else if (parent.document.URL.indexOf('#') != -1 && parent.document.URL.indexOf('i' + jvid + '=data') != -1 && (parent.document.URL.indexOf('i' + jvid + '=data&') == -1 && parent.document.URL.indexOf('i' + jvid + '=data#') == -1)) {
//alert(11);
lhd=decodeURIComponent(parent.document.URL.split('#')[1]).replace(/\ /g,'+');
lhds=lhd.split('data:');
//alert('lHds.length=' + lhds.length + ' and thisnumreldata=' + thisnumreldata);
if (eval('' + lhds.length) >= eval(1 + eval('' + thisnumreldata))) {
//alert('AudiO ' + 'data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
ismedia=true;
newa.src=butellipsis('data:' + lhds[eval(1 + eval('' + thisnumreldata))].replace(/\ /g,'+').split('&')[0].split('#')[0]);
parent.document.getElementById('i' + jvid).value=newa.src;
duration=eval('' + thispt);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('1987:' + duration);
//}
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById('preareyousinging').innerHTML+='<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype.replace('img','image') + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0].split('+')[0] + ' src="' + newa.src + ('" controls></' + etype).replace('" controls></img','"></img') + '><br>';
//pwo=parent.window.open('','_blank','top=50,left=50,width=600,height=600');
//pwo.document.write('<html><body>' + '<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0] + ' src="' + newa.src + '" controls></' + etype + '><br>' + '</body></html>');
}
}
} else if (decodeURIComponent(parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+') != 'data') {
//alert(111);
//alert('Audio ' + decodeURIComponent(parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+'));
ismedia=true;
newa.src=butellipsis(decodeURIComponent(parent.document.URL.split('i' + jvid + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+'));
parent.document.getElementById('i' + jvid).value=newa.src;
duration=eval('' + thispt);
//if (('' + top.document.URL).indexOf('/select_palette.') != -1) {
// alert('2987:' + duration);
//}
if (parent.document.getElementById('preareyousinging')) {
parent.document.getElementById('preareyousinging').innerHTML+='<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype.replace('img','image') + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0].split('+')[0] + ' src="' + newa.src + ('" controls></' + etype).replace('" controls></img','"></img') + '><br>';
//pwo=parent.window.open('','_blank','top=50,left=50,width=600,height=600');
//pwo.document.write('<html><body>' + '<br><' + etype.replace('video', 'video autoplay ') + ' type=' + etype + '/' + newa.src.split('/')[1].split(';')[0].split(',')[0] + ' src="' + newa.src + '" controls></' + etype + '><br>' + '</body></html>');
}
}
}
}
}
}
return ismedia;
}
function kkpize() {
if (iload < eval('' + kkpil.length)) {
kkp=kkpil[iload];
parent.document.getElementById('i' + kkp).value='0|' + vidarrv[kkp] + '#' + decodeURIComponent(parent.document.URL.split('&kk' + kkp + '=')[1].substring(11).split('&')[0].split('#')[0]);
//alert('2:' + decodeURIComponent(parent.document.URL.split('&kk' + kkp + '=')[1].substring(11).split('&')[0].split('#')[0]));
parent.checkval(parent.document.getElementById('i' + kkp));
iload++;
}
}
function dovidarrv() {
var precontc=0, interimidea='-1';
if (parent.document.URL.replace(/\%23http$/g,'#http').indexOf('#http') != -1 && (!lookedat || eval('' + vidarrv.length) == 0)) {
//alert('yes1' + parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur='));
//alert(decodeURIComponent(parent.document.URL.split('#')[1]).replace('&kundur=','&unknowndur=').split('&unknowndur=')[0].split('&loop')[0].split('&name')[0].split('//')[1]);
lookedat=true;
if (parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur=').indexOf('&unknowndur=y') != -1 || parent.document.URL.split('#')[0].split('//')[1].replace('&kundur=','&unknowndur=').split('&unknowndur=')[0] == decodeURIComponent(parent.document.URL.split('#')[1]).replace('&kundur=','&unknowndur=').split('&unknowndur=')[0].split('&loop')[0].split('&name')[0].split('//')[1]) {
//alert('yes2');
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur=').indexOf('&unknowndur=y') != -1) {
//alert('yes3');
comeval=parent.getcomingurl();
if (comeval == '' && parent.document.URL.toLowerCase().replace('&kundur=','&unknowndur=').indexOf('&unknowndur=y') != -1) {
comeval=parent.document.URL;
}
if (comeval != '') {
//alert('yes4 ' + parent.document.URL.split('&i0=')[1]);
//alert(1);
if (prepurd == purld || 2 == 2) { parent.unsetieo(); } else { parent.justunsetieo(); }
//alert(11);
firstdelay=eval(eval(parent.document.URL.split('&j0=')[1].split('&')[0].split('#')[0]) - eval(parent.document.URL.split('&i0=')[1].split('|')[0].split(';')[0].split('&')[0].split('#')[0]));
//alert(firstdelay);
ivid=0;
if (('' + parent.document.URL + 's').replace('%23http','#http').replace(/\#https/g,'') == ('' + parent.document.URL.replace('%23http','#http') + 's')) {
if (prepurd == purld || 1 == 1) { ismobileplaylistplay=true; } //else { alert('agree'); }
}
// vidarr=[], vidstarts=[], viddurs=[], viddos=[]
//setTimeout(function(){
precontc=contc;
contc=0;
//alert('yes5');
for (var iipp=0; iipp<=29; iipp++) {
if (parent.document.URL.indexOf('youtubeid=') != -1 && iipp == 0) { // && ('' + parent.document.URL + 's').replace(/\#https/g,'') == ('' + parent.document.URL + 's')) {
vidarrv.push(parent.document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0]);
console.log(vidarrv);
if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase().replace('0gz_7am23rk','cannotenda2').substring(0,11) == 'cannotenda2') {
if (parent.document.URL.indexOf('&kk' + iiipp + '=') != -1) {
vidarrv[eval(-1 + vidarrv.length)]=parent.document.URL.split('&kk' + iiipp + '=')[1].substring(0,11);
//alert('1:' + decodeURIComponent(parent.document.URL.split('&kk' + iiipp + '=')[1].substring(11).split('&')[0].split('#')[0]));
parent.document.getElementById('i' + iiipp).value='0|' + vidarrv[eval(-1 + vidarrv.length)] + '#' + decodeURIComponent(parent.document.URL.split('&kk' + iiipp + '=')[1].substring(11).split('&')[0].split('#')[0]);
parent.dvalit(true);
//kkp=iiipp;
kkpil.push(iipp);
setTimeout(kkpize, eightthous);
eightthous+=38000;
parent.checkval(parent.document.getElementById('i' + iiipp));
} else {
//alert('' + conttitle.length + 'foUnd ' + parent.document.getElementById('i' + iiipp).value);
parent.checkval(parent.document.getElementById('i' + iiipp));
}
contc=variants.indexOf(vidarrv[eval(-1 + vidarrv.length)]);
if (eval('' + conttitle.length) > contc) {
if (conttitle[contc] == '') {
vidtitle.push('Nonyt ' + contc);
} else {
vidtitle.push(conttitle[contc]);
}
contc++;
} else {
vidtitle.push('');
}
} else {
vidtitle.push('');
}
vidstarts.push(parent.neweval(parent.document.URL.split('&i' + iipp + '=')[1].split('&')[0].split('#')[0]));
if (parent.document.URL.indexOf('&c' + iipp + '=on') != -1) {
viddos.push(true);
} else if (parent.document.URL.indexOf('&c' + iipp + '=off') != -1) {
viddos.push(false);
} else {
viddos.push(false);
}
viddurs.push(parent.document.URL.split('&j' + iipp + '=')[1].split('&')[0].split('#')[0]);
if (1 == 4) {
event.target.cueVideoById(
vidarrv[eval(-1 + vidarrv.length)],
eval('' + vidstarts[eval(-1 + vidstarts.length)]),
eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])),
"medium");
}
if (parent.document.URL.indexOf('&unknowndur=') != -1 && document.URL.indexOf('&playtime=0') == -1) {
setTimeout(function(){ if (document.URL.indexOf('&playtime=0') == -1) { nextvidi=1; } }, 5000);
}
} else if (parent.document.URL.indexOf('&i' + iipp + '=') != -1 && parent.document.URL.indexOf('&i' + iipp + '=&') == -1 && parent.document.URL.indexOf('&i' + iipp + '=#') == -1) {
//if (parent.document.URL.indexOf('&unknowndur=') != -1) {
// alert('huh9=');
//}
if (parent.document.URL.indexOf('&unknowndur=') != -1 || parent.document.URL.indexOf('&kundur=') != -1) {
//alert(986);
ivid=0; // was 0
setTimeout(function(){ if (document.URL.indexOf('&playtime=0') == -1) { nextvidi=1; } }, 5000);
} else {
//alert(9486);
ivid=1;
}
if (('' + parent.document.URL).indexOf('kunJUNKdur=') == -1 && ('' + parent.document.URL + 's').replace(/\%23https$/g,'#https').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
if (iipp == 1) {
//alert(29486);
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
// alert('ismobileplaylistplay=' + ismobileplaylistplay);
//top.document.title='x';
//}
precontc=contc;
contc=0;
for (var iiipp=iipp; iiipp<30; iiipp++) {
if (parent.document.URL.indexOf('&i' + iiipp + '=') != -1 && parent.document.URL.indexOf('&j' + iiipp + '=') != -1 && parent.document.URL.indexOf('&c' + iiipp + '=') != -1) {
if (parent.document.URL.indexOf('&i' + iiipp + '=&') == -1 && parent.document.URL.indexOf('&j' + iiipp + '=&') == -1 && parent.document.URL.indexOf('&c' + iiipp + '=&') == -1) {
vidstarts.push(decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|')[0]);
if (decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|')[eval(-1 + decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|').length)] == '0Gz_7am23rk') { interimidea='' + vidarrv.length; }
vidarrv.push(decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|')[eval(-1 + decodeURIComponent(parent.document.URL.split('&i' + iiipp + '=')[1].split('&')[0].split('#')[0]).split('|').length)]);
//if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase() == 'cannotenda2') {
if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase().replace('0gz_7am23rk','cannotenda2').substring(0,11) == 'cannotenda2') {
if (parent.document.URL.indexOf('&kk' + iiipp + '=') != -1) {
vidarrv[eval(-1 + vidarrv.length)]=parent.document.URL.split('&kk' + iiipp + '=')[1].substring(0,11);
parent.dvalit(true);
//kkp=iiipp;
kkpil.push(iiipp);
setTimeout(kkpize, eightthous);
eightthous+=38000;
parent.checkval(parent.document.getElementById('i' + iiipp));
} else {
//alert('' + conttitle.length + 'foUnD ' + parent.document.getElementById('i' + iiipp).value);
parent.checkval(parent.document.getElementById('i' + iiipp));
}
//alert('' + conttitle.length + 'found ' + parent.document.getElementById('i' + iiipp).value);
//parent.checkval(parent.document.getElementById('i' + iiipp));
contc=variants.indexOf(vidarrv[eval(-1 + vidarrv.length)]);
if (eval('' + conttitle.length) > contc) {
if (conttitle[contc] == '') {
vidtitle.push('Nonyt ' + contc);
} else {
vidtitle.push(conttitle[contc]);
}
contc++;
} else {
vidtitle.push('');
}
} else {
vidtitle.push('');
}
if (parent.document.URL.indexOf('&c' + iiipp + '=on') != -1) {
viddos.push(true);
} else if (parent.document.URL.indexOf('&c' + iiipp + '=off') != -1) {
viddos.push(false);
} else {
viddos.push(false);
}
viddurs.push(parent.document.URL.split('&j' + iiipp + '=')[1].split('&')[0].split('#')[0]);
}
}
}
contc=precontc;
if (eval('' + viddurs.length) > 0) {
duration='' + viddurs[0];
}
if (window.top) {
if (top.document.getElementById('td0001')) {
setTimeout(function(){
top.document.getElementById('td0001').setAttribute('data-alt', top.getcura() + 'Playing ... ' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'and').replace(/\ \&\ /g,' and ') + ' ... ');
}, 2000);
}
}
setTimeout(function(){ ivid=0; nextvidi=0; setTimeout(function(){ nextvidi=1; }, 5000); if (!inplaying) { inplaying=true; preplayingvideo(); setTimeout(playingvideo, 1000); } }, 1200); //alert('iipp=' + iipp + ' where vidstarts.length=' + vidstarts.length);
}
} else {
vidstarts.push(parent.neweval(parent.document.URL.split('&i' + iipp + '=')[1].split('&')[0].split('#')[0]));
//alert(vidstarts[eval(-1 + vidstarts.length)]);
vidarrv.push(parent.newereval(parent.document.URL.split('&i' + iipp + '=')[1].split('&')[0].split('#')[0]));
if (vidarrv[eval(-1 + vidarrv.length)].toLowerCase().replace('0gz_7am23rk','cannotenda2').substring(0,11) == 'cannotenda2') {
if (parent.document.URL.indexOf('&kk' + iiipp + '=') != -1) {
vidarrv[eval(-1 + vidarrv.length)]=parent.document.URL.split('&kk' + iipp + '=')[1].substring(0,11);
//alert('3:' + decodeURIComponent(parent.document.URL.split('&kk' + iipp + '=')[1].substring(11).split('&')[0].split('#')[0]));
parent.document.getElementById('i' + iipp).value='0|' + vidarrv[eval(-1 + vidarrv.length)] + '#' + decodeURIComponent(parent.document.URL.split('&kk' + iiipp + '=')[1].substring(11).split('&')[0].split('#')[0]);
parent.dvalit(true);
//kkp=iiipp;
kkpil.push(iipp);
setTimeout(kkpize, eightthous);
eightthous+=38000;
parent.checkval(parent.document.getElementById('i' + iipp));
} else {
//alert('' + conttitle.length + 'fOUnD ' + parent.document.getElementById('i' + iiipp).value);
parent.checkval(parent.document.getElementById('i' + iipp));
}
contc=variants.indexOf(vidarrv[eval(-1 + vidarrv.length)]);
if (eval('' + conttitle.length) > contc) {
if (conttitle[contc] == '') {
vidtitle.push('Nonyt ' + contc);
} else {
vidtitle.push(conttitle[contc]);
}
contc++;
} else {
vidtitle.push('');
}
} else {
vidtitle.push('');
}
console.log(vidarrv);
if (parent.document.URL.indexOf('&c' + iipp + '=on') != -1) {
viddos.push(true);
} else if (parent.document.URL.indexOf('&c' + iipp + '=off') != -1) {
viddos.push(false);
} else {
viddos.push(false);
}
viddurs.push(parent.document.URL.split('&j' + iipp + '=')[1].split('&')[0].split('#')[0]);
}
//alert(viddurs[eval(-1 + viddurs.length)]);
if (viddos[eval(-1 + viddos.length)] && viddurs[eval(-1 + viddurs.length)].replace(/^0/g,'') != '') {
//alert('event.target.cueVideoById(' + vidarrv[eval(-1 + vidarrv.length)] + ',' + eval('' + vidstarts[eval(-1 + vidstarts.length)]) + ',' + eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])) + ');');
if (1 == 4) {
try {
event.target.cueVideoById(
vidarrv[eval(-1 + vidarrv.length)],
eval('' + vidstarts[eval(-1 + vidstarts.length)]),
eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])),
"medium");
} catch(errsd) { alert(errsd.message); }
}
//alert('event.target.cueVideoById(' + vidarrv[eval(-1 + vidarrv.length)] + ',' + eval('' + vidstarts[eval(-1 + vidstarts.length)]) + ',' + eval(eval('' + viddurs[eval(-1 + viddurs.length)]) - eval('' + vidstarts[eval(-1 + vidstarts.length)])) + ');');
}
}
}
var theididx=eval(-1 + eval( '' + vidarrv.length));
if (eval('' + vidarrv.length) > 1) {
if (('' + interimidea).indexOf('-') == -1 && 5 == 7) {
vidarrv[eval('' + interimidea)]=vidarrv[0] + ' ';
viddurs[eval('' + interimidea)]=viddurs[0];
vidstarts[eval('' + interimidea)]=vidstarts[0];
vidtitle[eval('' + interimidea)]=vidtitle[0];
if (('' + parent.document.URL).indexOf('kundur=') == -1) {
setTimeout(function(){
parent.document.getElementById('i' + eval('' + interimidea)).value=parent.document.getElementById('i0').value + ' '; //='' + vidstarts[eval('' + interimidea)] + '|' + vidarrv[eval('' + interimidea)] + '#' + vidtitle[eval('' + interimidea)];
parent.document.getElementById('j' + eval('' + interimidea)).value=('' + parent.document.getElementById('j0').value).split('.')[0] + '.1'; //='' + viddurs[eval('' + interimidea)];
}, 4000);
}
} else if (vidarrv[eval(-1 + eval( '' + vidarrv.length))] == '0Gz_7JUNKam23rk') {
vidarrv[eval(-1 + eval( '' + vidarrv.length))]=vidarrv[0] + ' ';
viddurs[eval(-1 + eval( '' + vidarrv.length))]=viddurs[0];
vidstarts[eval(-1 + eval( '' + vidarrv.length))]=vidstarts[0];
vidtitle[eval(-1 + eval( '' + vidarrv.length))]=vidtitle[0];
if (('' + parent.document.URL).indexOf('kundur=') == -1) {
setTimeout(function(){
parent.document.getElementById('i' + eval(-1 + eval( '' + vidarrv.length))).value=parent.document.getElementById('i0').value + ' '; //='' + vidstarts[eval(-1 + eval( '' + vidarrv.length))] + '|' + vidarrv[eval(-1 + eval( '' + vidarrv.length))] + '#' + vidtitle[eval(-1 + eval( '' + vidarrv.length))];
parent.document.getElementById('j' + eval(-1 + eval( '' + vidarrv.length))).value=('' + parent.document.getElementById('j0').value).split('.')[0] + '.1'; //('' + viddurs[eval(-1 + eval( '' + vidarrv.length))].split('.')[0] + '.1';
}, 4000);
}
}
}
contc=0;
//alert('vidarrv.length=' + vidarrv.length);
//alert('found! looping ' + parent.getlooping());
setInterval(lookforparentcues, 100);
//}, 4000);
}
}
}
}
}
function halfway(givid,gvid,gviddurs,gtitle) {
var iivid=givid, ggvid=gvid, retval='', bmaybe=true, gggvid=gvid;
var kkk=0;
console.warn('halfway ');
while (parent.document.getElementById('i' + kkk)) {
if (parent.document.getElementById('c' + kkk).checked) {
if (kkk == 0) { parent.document.getElementById('xx0').style.backgroundColor='lightgreen'; }
if (bettervalue(kkk,parent.document.getElementById('i' + kkk).value).indexOf(gvid) != -1) {
if (kkk == 0 && ('' + parent.document.getElementById('i' + eval(0 + kkk)).title).indexOf(' tap/click ') == -1) {
setTimeout(function(){
//alert('0:' + parent.document.getElementById('myh1').innerHTML);
parent.document.getElementById('i0').title=placeholderis(0, '' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
}, 4000);
}
if (kkk > 1 && parent.document.getElementById('c1')) {
if (parent.document.getElementById('c1').checked && parent.document.getElementById('i1').value.replace(',','|').replace('!','|').replace('@','|').replace('#','|').indexOf('|') != -1) {
if (parent.document.getElementById('j1').value.indexOf('2222') == -1 && (parent.document.getElementById('j1').value + '0').substring(0,1) != '0') {
if (parent.document.getElementById('i1').title.indexOf(' tap/click ') != -1) {
if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(parent.document.getElementById('i1').value.substring(2).slice(-11), parent.document.getElementById('i1').title.split(' ...')[0], parent.document.getElementById('j1').value);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(parent.document.getElementById('i1').value.substring(2).slice(-11), parent.document.getElementById('i1').title.split(' ...')[0], parent.document.getElementById('j1').value);
}
}
}
}
}
}
iivid=kkk;
setTimeout(function(){
if (parent.document.getElementById('i' + eval(-1 + iivid))) {
//parent.document.getElementById('youtubeid').value='' + gvid;
//parent.document.getElementById('youtube_duration').value='' + gviddurs;
vidtitle[iivid]=gtitle;
parent.document.getElementById('i' + eval(-1 + iivid)).placeholder='' + gtitle;
parent.document.getElementById('j' + eval(-1 + iivid)).value=gviddurs;
parent.document.getElementById('i' + eval(-1 + iivid)).title=placeholderis(eval(-1 + iivid), '' + gtitle.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this');
parent.document.getElementById('i' + eval(-1 + iivid)).setAttribute('data-index', '' + eval(-1 + iivid));
parent.document.getElementById('i' + eval(-1 + iivid)).setAttribute('data-title', '' + gtitle);
parent.document.getElementById('i' + eval(-1 + iivid)).ondblclick=function(event){ parent.setforcemix(event.target.getAttribute('data-index')); parent.mixitup(parentdocumentURL,true); ttt.title=event.target.getAttribute('data-title'); };
if (parent.document.getElementById('xx' + eval(-1 + iivid))) {
console.warn('halfwaY ' + eval(-1 + iivid));
parent.document.getElementById('xx' + eval(-1 + iivid)).style.backgroundColor='lightgreen';
}
}
try {
var xds='' + player.getDuration();
stduration=eval(xds);
if (xds != 'undefined') {
parent.document.getElementById('j' + eval(-1 + iivid)).value='' + xds;
viddurs[eval(-1 + iivid)]='' + xds;
parent.document.getElementById('youtube_duration').value='' + xds;
//alert(xds);
if (parent.document.getElementById('youtubeid').value == gvid) {
parent.document.getElementById('youtube_duration').value='' + xds;
}
parentdocumentURL=parentdocumentURL.replace('&j' + eval(-1 + iivid) + '=22221', '&j' + eval(-1 + iivid) + '=' + xds).replace(encodeURIComponent('&j' + eval(-1 + iivid) + '=22221'), encodeURIComponent('&j' + eval(-1 + iivid) + '=' + xds));
if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(gvid, gtitle, xds);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(gvid, gtitle, xds);
}
}
}
} catch(ghtr) { }
}, 5000);
} else if (kkk == 0 && bettervalue(kkk,parent.document.getElementById('i' + eval(0 + kkk)).value).replace(',','|').replace('!','|').replace('@','|').replace('#','|').indexOf('|') != -1) {
ggvid=parent.document.URL.split('youtubeid=')[1].split('&')[0];
if (('' + parent.document.getElementById('i' + eval(0 + kkk)).title).indexOf(' tap/click ') == -1) {
setTimeout(function(){
//alert('0:' + parent.document.getElementById('myh1').innerHTML);
parent.document.getElementById('i0').title='' + parent.document.getElementById('myh1').innerHTML.replace(/\&\;/g,'&') + ' ... double tap/click to jump to this';
}, 4000);
parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-index', '0');
//parent.document.getElementById('i' + eval(0 + kkk)).setAttribute('data-title', '' + gtitle);
if (parent.document.URL.indexOf('#http') != -1) {
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ parent.location.href=parentdocumentURL; };
} else {
console.warn('9870');
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ if (parent.window.opener.document.getElementById('awowowo')) { parent.window.opener.document.getElementById('awowowo').click(); parent.location.href=parent.document.URL.split('?')[0].split('#')[0]; } else { parentdocumentURL='' + document.URL.split(':')[0] + ':' + decodeURIComponent(parent.document.URL.split('#http')[1]).replace(/^s\:/g,'').replace(/^\:/g,'').split('&loop')[0] + '#http' + parent.document.URL.split('#http')[1]; parent.location.href=parentdocumentURL; } };
}
} else {
console.warn('98701');
parent.document.getElementById('i' + eval(0 + kkk)).ondblclick=function(event){ if (parent.window.opener.document.getElementById('awowowo')) { parent.window.opener.document.getElementById('awowowo').click(); parent.location.href=parent.document.URL.split('?')[0].split('#')[0]; } else { parent.location.href=parentdocumentURL; } };
}
}
if (window.parent && 1 == 1) {
if (parent.window.opener) {
if (typeof parent.window.opener.setvurl == 'function') {
parent.window.opener.setvurl(ggvid, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}
} else if (typeof top.setdurl == 'function') {
top.setdurl(ggvid, parent.document.getElementById('myh1').innerHTML, parent.document.getElementById('youtube_duration').value);
}
}
var kkkk=kkk;
kkkk++;
while (parent.document.getElementById('i' + eval(0 + kkkk))) {
if (('' + parent.document.getElementById('i' + eval(0 + kk Video Lookup via '); } zeroplay=ourvid.replace('%20',' ').indexOf(' '); if (document.URL.indexOf('?random=') != -1) { playrandom(); } else { checkemailbits(); document.getElementById('urlbig').value=document.URL; document.getElementById('emailform').action=document.getElementById('emailer').src; if (doemoji != 'on') { document.getElementById('emoji').checked=false; } if (ourrec != 'off') { document.getElementById('recown').checked=true; dorecord=true; } if (ourvid == '') { ourvid=(location.search.split('youtubeid=')[1] ? decodeURIComponent(location.search.split('youtubeid=')[1].split('&')[0]).replace(/\+/g,' ') : ''); } if (ourvid != '') { document.getElementById('youtubeid').value=ourvid; findduration(null,ourvid); } }
}
function particularrestart(jtop, jvid) {
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (eval('' + jtop) < 0 && topifs[itop].src.indexOf('=' + encodeURIComponent(jvid) + '&') != -1) {
topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567);
} else if (eval('' + itop) == eval('' + jtop)) {
topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567);
}
}
}
function emojirestart() {
if (('' + top.document.getElementById('myh1').style.marginLeft) == '1px') {
top.document.getElementById('myh1').style.marginLeft='0px';
validst=false;
} else {
validst=false;
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
if (itop != -1) { topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567); }
}
//top.document.title+=' 1';
top.document.getElementById('myh1').style.marginLeft='0px';
//top.document.title+='2';
window.top.scrollTo(0,0);
}
setTimeout(preebutnc, eval(eval(-2 + eval('' + cumd)) * 1000));
setTimeout(ebutnc, eval(eval(5 + eval('' + cumd)) * 1000));
}
function getBod() {
setTimeout(postBod, 200);
return decodeURIComponent(myvtableoh);
}
function givethemfifteen() {
givefifteen-=givefactor;
if (givefifteen <= 0) {
postputy(document.getElementById('ajaxs'), true);
} else {
setTimeout(givethemfifteen,1000);
}
}
function dputy(yt) {
var aot=yt.options[yt.selectedIndex].text.split('(')[eval(-1 + yt.options[yt.selectedIndex].text.replace(')','').split('(').length)].replace(')','').split(':'),jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
if (morethanone) {
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
//alert('Expected duration ' + aotdur + ' seconds');
if (givefifteen < 0) {
givefifteen=15;
givethemfifteen();
}
} else {
ourvid=yt.value;
// document.getElementById('ajax').innerHTML=''; // huh?
document.getElementById('youtubeid').value=ourvid;
if (domin) {
console.log('5:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 2');
if (!ismobileplaylist) {
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea, '_blank', 'left=10,top=10,width=600,height=600');
}
} else {
console.log('6:' + (new Date()) + "<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
console.warn('here at 3');
if (!ismobileplaylist) {
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
}
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
if (!ismobileplaylist) {
document.getElementById('performance').style.display='block';
}
setTimeout(showd, 200);
}
}
}
function puty(yt) {
var aot=yt.options[yt.selectedIndex].text.split('(')[eval(-1 + yt.options[yt.selectedIndex].text.replace(')',' ').split('(').length)].replace(')',' ').split(':'),jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
//if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//alert('rep=' + rep + ' lastajaxs=' + lastajaxs);
//}
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
//alert('aot.length=' + aot.length + ' ... ' + yt.options[yt.selectedIndex].text);
aotdur=0.0;
aotfactor=1.0;
jaot=0;
if (yt.options[yt.selectedIndex].text.indexOf(' second') != -1) {
//alert('second ... ' + yt.options[yt.selectedIndex].text + ' ... ' + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ').length)].trim());
aotdur+=eval(aotfactor * eval(yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' second')[0].split(' ').length)].trim()));
}
aotfactor *= faot[jaot];
jaot++;
if (yt.options[yt.selectedIndex].text.indexOf(' minute') != -1) {
//alert(' minute ... ' + yt.options[yt.selectedIndex].text + ' ... ' + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ').length)].trim());
aotdur+=eval(aotfactor * eval(yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' minute')[0].split(' ').length)].trim()));
}
aotfactor *= faot[jaot];
jaot++;
if (yt.options[yt.selectedIndex].text.indexOf(' hour') != -1) {
aotdur+=eval(aotfactor * eval(yt.options[yt.selectedIndex].text.replace(' (',' ').split(' hour')[0].split(' ')[eval(-1 + yt.options[yt.selectedIndex].text.replace(' (',' ').split(' hour')[0].split(' ').length)].trim()));
}
aotfactor *= faot[jaot];
jaot++;
var wastop=top.document.getElementById('predivsp').innerHTML;
var randis='' + Math.floor(Math.random() * 19878675);
if (aotdur == 0.0) { aotdur=400.000; }
//alert('' + aotdur);
if (wastop.indexOf('>' + yt.value + '<') == -1 && yt.value.trim() != '' && eval('' + yt.value.length) == 11) {
top.document.getElementById('predivsp').innerHTML='<details onclick="document.getElementById(' + String.fromCharCode(39) + 'ifbtobsix' + randis + String.fromCharCode(39) + ').src=document.getElementById(regit(' + String.fromCharCode(39) + 'ifbtobsix' + randis + String.fromCharCode(39) + ')).src.replace(' + String.fromCharCode(39) + 'c0=' + String.fromCharCode(39) + ',' + String.fromCharCode(39) + 'c0=on&rand=' + String.fromCharCode(39) + ');"><summary id=sumbtobsix' + randis + '>' + yt.value + '</summary><p><iframe data-onclick="event.stopPropagation();" style="width:100%;height:900px;" id="ifbtobsix' + randis + '" onload=" cif(this); if (top.document.URL.indexOf(' + String.fromCharCode(39) + 'showit=' + String.fromCharCode(39) + ') != -1) { document.getElementById(' + String.fromCharCode(39) + 'divsp' + String.fromCharCode(39) + ').style.display=' + String.fromCharCode(39) + 'block' + String.fromCharCode(39) + '; } " src="/HTMLCSS/karaoke_youtube_api.htm?youtubeid=' + yt.value + '&youtube_duration=' + ('' + aotdur).split('.')[0] + '.000&email=&email=&emoji=on&c0=off&i0=0&j0=' + ('' + aotdur).split('.')[0] + '&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29="></iframe><br></p></details>' + wastop;
if (top.appendsel) {
top.appendsel(document.getElementById('ajaxs'));
}
top.document.getElementById('karit').src=top.document.getElementById('karit').src.split('rand=')[0] + 'rand=' + Math.floor(Math.random() * 1987865);
top.document.getElementById('tacode').innerHTML=top.document.getElementById('divsp').outerHTML;
//parent.location.href=parent.document.URL;
return '';
}
return '';
}
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) && lastajaxs != '') {
preajaxswatch(); //setTimeout(preajaxswatch,100);
//ajaxclist=lastajaxs;
//ajaxoncnt=eval('' + ajaxclist.split(',').length);
//ajaxf='';
//alert('rEp=' + rep + ' lastajaxs=' + lastajaxs);
} else if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
preajaxswatch();
//ajaxclist=lastajaxs;
//ajaxoncnt=eval('' + ajaxclist.split(',').length);
//ajaxf='';
//alert('reP=' + rep + ' lastajaxs=' + lastajaxs);
}
if (morethanone) {
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
//alert('Expected duration ' + aotdur + ' seconds');
if (givefifteen < 0) {
givefifteen=15;
givethemfifteen();
}
} else {
ourvid=yt.value;
// document.getElementById('ajax').innerHTML=''; // huh?
document.getElementById('youtubeid').value=ourvid;
if (domin) {
//alert(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
if (window.parent) {
if (parent.document.getElementById('parnext2') && parent.document.getElementById('divideo')) {
var cellnum=2;
while (parent.document.getElementById('parnext' + cellnum).innerHTML != '') {
cellnum++;
}
//parent.document.getElementById('parnext' + cellnum).innerHTML="<iframe id='myiframe" + cellnum + "' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe><table style=display:table-cell;><tr><td id=parnext" + eval(1 + eval('' + cellnum)) + "></td></tr></table>";
console.warn('here at 4');
parent.document.getElementById('parnext' + cellnum).innerHTML="<table style=display:table-cell;><tr><td id=parnext" + eval(1 + eval('' + cellnum)) + "></td></tr></table><iframe onload=checkss(this); id='myiframe" + cellnum + "' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>";
} else if (parent.document.getElementById('myiframe') && parent.document.getElementById('divideo')) {
//alert('1:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 5');
if (!ismobileplaylist) {
if (('' + document.URL + 's').replace(/\#https/g,'') != ('' + document.URL + 's') || ('' + parent.document.URL + 's').replace(/\#https/g,'') != ('' + parent.document.URL + 's')) {
parent.document.getElementById('myiframe').onload=function(event){ alert('here opening'); }
}
parent.document.getElementById('myiframe').src=document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea;
}
} else if (parent.document.getElementById('placeforvideo') && parent.document.getElementById('divideo')) {
//parent.document.getElementById('divideo').style.width='760px';
//parent.document.getElementById('divideo').style.height='450px';
//parent.document.getElementById('placeforvideo').innerHTML="<details open><summary>YouTube Videos</summary><table style='overflow:scroll !important;' id=partable><tr id=parrow><td><iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe></td><td id=parnext2></td></tr></table></details>";
console.warn('here at 6');
if (!ismobileplaylist) {
parent.document.getElementById('placeforvideo').innerHTML="<details open><summary>YouTube Videos</summary><table style='overflow:scroll !important;' id=partable><tr id=parrow><td id=parnext2></td><td><iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe></td></tr></table></details>";
}
if (parent.document.getElementById('divnoresize')) {
parent.document.getElementById('divnoresize').innerHTML='xxx';
}
if (document.URL.indexOf('minimize=') != -1) {
setInterval(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i) || document.URL.indexOf('minimize=Y') != -1) {
//document.getElementById('ajaxs').style.position='absolute';
//document.getElementById('ajaxs').style.top='0px';
//document.getElementById('ajaxs').style.left='0px';
//document.getElementById('ajaxs').style.zIndex='999';
mintoajax();
//parent.document.getElementsByTagName('h1')[0].innerHTML=parent.document.getElementsByTagName('h1')[0].innerHTML.replace('</select>', '</select><br>');
//setTimeout(function(){ window.top.scrollTo(0,0); }, 2000);
}
}, 8000);
}
} else {
//alert('2:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 7');
if (!ismobileplaylist) {
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea, '_blank', 'left=10,top=10,width=600,height=600');
}
}
} else {
//alert('3:' + (new Date()) + document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
console.warn('here at 8');
if (!ismobileplaylist) {
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea, '_blank', 'left=10,top=10,width=600,height=600');
}
}
} else {
//alert('4:' + (new Date()) + "<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe>");
console.warn('here at 9');
if (!ismobileplaylist) {
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
}
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
setTimeout(showd, 200);
}
}
}
function amw() {
allowable=true;
}
function getytlist(whytid, isfinal) {
// https://www.youtube.com/results/?search_query=South+America%22%2Cintitle%3APaulo
if (!isfinal && lastgetytlist == whytid && whytid != '') {
lastgetytlist=lastgetytlist;
} else {
lastgetytlist=whytid;
if (allowable) {
var selname = "", qsel="", iqq=0, jqq=0, oparts=[whytid], dprefix='', dp='', wparts=[''];
var urlextra='', urln=1;
if (amwaiting && isfinal) {
clearInterval(amwaiting);
amwaiting=null;
allowable=true;
lastgetytlist='';
} else if (!amwaiting) {
amwaiting=setInterval(amw, 2000);
allowable=false;
}
whytid=whytid.replace(/\ \&\&\ /g, '"%2cintitle%3a"').replace(/\ \|\|\ /g, '"%2c%2b"').replace(/\&\&\ /g, 'intitle&3a"').replace(/\&\&/g, 'intitle%3a"');
additionalask=[''];
if (whytid != '') {
oparts=whytid.split(' || ');
wparts=whytid.split(' && ');
if (wparts.length > 1) {
if (wparts[1].split(' || ')[0].length > 0) {
for (iqq=1; iqq<wparts.length; iqq++) {
if (iqq == 1) {
additionalask[0]=wparts[1].split(' || ')[0];
urlextra+='&urln' + iqq + '=' + encodeURIComponent(wparts[1].split(' || ')[0]);
} else {
additionalask.push(wparts[iqq].split(' || ')[0]);
urlextra+='&urln' + iqq + '=' + encodeURIComponent(wparts[iqq].split(' || ')[0]);
}
}
}
}
selname = oparts[0].split(' && ')[0]; //whytid;
} else {
selname = document.getElementById('youtubeid').value;
selname = selname.replace(/\ \&\&\ /g, '"%2cintitle%3a"').replace(/\ \|\|\ /g, '"%2c%2b"').replace(/\&\&\ /g, 'intitle&3a"').replace(/\&\&/g, 'intitle%3a"')
oparts=selname.split(' || ');
wparts=selname.split(' && ');
if (wparts.length > 1) {
if (wparts[1].split(' || ')[0].length > 0) {
for (iqq=1; iqq<wparts.length; iqq++) {
if (iqq == 1) {
additionalask[0]=wparts[1].split(' || ')[0];
urlextra+='&urln' + iqq + '=' + encodeURIComponent(wparts[1].split(' || ')[0]);
} else {
additionalask.push(wparts[iqq].split(' || ')[0]);
urlextra+='&urln' + iqq + '=' + encodeURIComponent(wparts[iqq].split(' || ')[0]);
}
}
}
}
selname = oparts[0].split(' && ')[0]; //whytid;
}
if (selname.indexOf('v=') == 0) {
//qsel=encodeURIComponent(selname);
qsel=selname;
//alert("//localhost:8888/legend_via_map.php?url=" + encodeURIComponent("//www.youtube.com/results?search_query=" + qsel));
} else {
sstr="";
qsel=('"' + selname + '"').replace(/\"intitle\%/g, 'intitle%');
while (qsel.indexOf(' ') != -1) {
qsel=qsel.replace(" ","+");
}
}
//if (selname != "" && (selname.length > "URuOw1Pi58Y".length || selname.trim().indexOf(' ') != -1 || selname.indexOf('v=') == 0)) {
for (jqq=0; jqq<oparts.length; jqq++) {
if (selname != "" && (selname.replace('v=','').split('&')[0].match(/^[a-zA-Z0-9_-]*$/) == false ||
(selname.replace('v=','').split('&')[0].length < "URuOw1Pi58Y".length || selname.replace('v=','').split('&')[0].length > 12) ||
selname.trim().indexOf(' ') != -1 || selname.indexOf('v=') == 0)) {
if (amwaiting) { allowable=false; }
dprefix="ht" + "tp://www.youtube.com/results?search_query=";
dp="ht" + "tp://www.rjmprogramming.com.au/HTMLCSS/";
if (document.URL.indexOf('ht' + 'tps:') == 0) dp=dp.replace('tp:','tps:');
if (document.URL.indexOf('ht' + 'tps:') == 0) dprefix=dprefix.replace('tp:','tps:');
//document.title+=' ' + dprefix + qsel;
//dp="//localhost:8888/";
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
qsel=qsel.replace('!||!','%20OR%20');
qsel=qsel.replace('|!!|','%20OR%20');
qsel=qsel.replace('|!|!','%20OR%20');
qsel=qsel.replace('!|!|','%20OR%20');
qsel=qsel.replace('!!||','%20OR%20');
qsel=qsel.replace('||!!','%20OR%20');
}
console.log(dprefix + qsel);
console.log(qsel);
//qsel=qsel.replace(/\"/g,'');
//qsel='Sydney';
//alert(selname);
//if (qsel.indexOf('%') == -1) { qsel=encodeURIComponent(document.getElementById('youtubeid').value.replace(/\+/g,' ').trim()); document.title+=' ' + qsel; }
if (qsel.replace('%5B','').replace('[','').replace(/\"/g,'') != '') {
if (window.parent) {
if (parent.document.title.indexOf(' |' + ipbit + '|') != -1) {
if (parent.document.title.indexOf(' |' + ipbit + '|' + encodeURIComponent(qsel)) == -1) {
parent.document.title=parent.document.title.replace(' |' + ipbit + '|' + parent.document.title.replace(' |' + ipbit + '|')[0].split(' ')[0] + ' ', ' |' + ipbit + '|' + encodeURIComponent(qsel) + ' ');
if (parent.get_ajaxs_ih) {
parent.set_ajaxs_ih('');
}
}
}
}
$.ajax({ url: dp + "legend_via_map.php",
data: {"url":dprefix + qsel},
type: 'get',
success: function(outputin) {
//document.title+=' success ' + output.indexOf('-describedby=') + ' ' + output.indexOf('described') + ' ';
//alert(output);
var output=outputin.replace(/\"\:\ \{/g, '":{').replace(/\"\:\ \"/g, '":"');
var teq=' title="';
var teqtwo='';
console.log('Success:');
var selc='', fosecs=0.0, afosecs=[], ifo=0, fofactor=1.0;
console.log('1');
var qqbits=output.split('v=');
console.log('2');
var qqtbits=output.split('-describedby='); //'/watch?'); // '"commandMetadata":{"webCommandMetadata":{"url":"/watch'); // '-describedby=');
if (qqbits.length > 1 && qqtbits.length == 1) {
qqtbits=output.split('watchEndpoint');
teq='"title":{';
teqtwo='"text":"';
}
console.log('3 ' + teq);
if (qqtbits.length == 1 && output.indexOf('503 ') != -1) { document.title+=' ... please try again later.'; }
console.log('4');
var qdelim=' ', tqbits, ttqqbits='', attqqbits=[], durbits='', adurbits;
console.log('5');
var q11=11;
var teqx='';
console.log('6');
var fgs='findings are ', sze='', is_okay=true, jis_okay=0;
console.log('7 ' + qqbits.length + ' ' + qqtbits.length);
if (qqbits.length > 1 && qqtbits.length == 1) {
console.log('error: ' + dprefix + qsel); window.open(dprefix + qsel, '_blank'); //, 'top=30,left=30,width=900,height=900');
}
for (var ifgs=1; ifgs<qqtbits.length; ifgs++) {
fosecs=0.0;
fofactor=1.0;
tqbits=qqtbits[eval(-1 + ifgs)].split(teq); //' title="');
ttqqbits=qqtbits[eval(-1 + ifgs)].split('v=')[eval(-1 + qqtbits[eval(-1 + ifgs)].split('v=').length)].substring(0,q11);
if (selc == '') { // && document.getElementById('ajax').innerHTML == '') {
// document.title+=' 1 ';
if (zeroplay == 0) {
// document.title+=' 2 ';
document.getElementById("myh1").innerHTML=document.getElementById("myh1").innerHTML.replace('Karaoke via ',ourvid + ' Video Lookup via ');
if (ttqqbits.indexOf('<') != -1) {
sze=" size=" + eval(-1 + qqtbits.length) + " ";
} else {
sze=" size=" + qqtbits.length + " ";
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { sze=""; }
document.getElementById("myform").innerHTML+="<input type=hidden name=justplay id=justplay value=y></input>";
}
if (ttqqbits.indexOf('<') == -1) {
if (document.URL.indexOf('minimize=') != -1) { domin=true; }
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
selc=preselc + "<select" + sze + " style=width:80%; title='YouTube videos' id=ajaxs ontouchend='rep+=String.fromCharCode(88);' ontouchstart='rep+=String.fromCharCode(89);' ontouchstart='rep+=String.fromCharCode(90);' ondblclick=dputy(this); onchange=puty(this);><option id=ominpossible value=>Optionally choose YouTube title below ...</option></select> <div id=placeforvideo></div>";
} else {
selc=preselc + "<select" + sze + " style=width:80%; title='YouTube videos' id=ajaxs ondblclick=dputy(this); onchange=puty(this);><option id=ominpossible value=>Optionally choose YouTube title below ...</option></select> <div id=placeforvideo></div>";
}
}
}
if (additionalask[0] != '') {
for (jis_okay=0; jis_okay<additionalask.length; jis_okay++) {
if (additionalask[jis_okay] != '') {
if (tqbits[eval(-1 + tqbits.length)].split('"')[0].toLowerCase().indexOf(additionalask[jis_okay].toLowerCadse()) == -1) { is_okay=false; }
}
}
}
if (is_okay) {
teqx='';
if (teqtwo == '') {
durbits=' (' + qqtbits[eval(-1 + ifgs)].split(' class="video-time"')[eval(-1 + qqtbits[eval(-1 + ifgs)].split(' class="video-time"').length)].split('<')[0].split('>')[1] + ')';
console.log('durbits=' + durbits);
//selc=selc.replace('</select>','<option value=' + qqbits[eval(2 * ifgs)].substring(0,q11) + '>' + tqbits[eval(-1 + tqbits.length)].split('"')[0] + '</option></select>');
teqx=tqbits[eval(-1 + tqbits.length)].split('"')[0];
} else if (tqbits[eval(-1 + tqbits.length)].indexOf(teqtwo) != -1) {
teqx=tqbits[eval(-1 + tqbits.length)].split(teqtwo)[1].split('"')[0];
if (('' + qqtbits[eval(-1 + ifgs)]).indexOf('"lengthText":{') == -1 || ('' + qqtbits[eval(-1 + ifgs)]).indexOf('"label":"') == -1) {
console.log('qqtbits[' + eval(-1 + ifgs) + ']=' + qqtbits[eval(-1 + ifgs)]);
} else {
durbits=' (' + qqtbits[eval(-1 + ifgs)].split('"lengthText":{')[1].split('"label":"')[1].split('"')[0] + ')';
console.log('Durbits=' + durbits);
}
} //else {
//console.log(tqbits[eval(-1 + tqbits.length)].substring(0,60) + ' ??? ' + tqbits[eval(-1 + tqbits.length)].slice(-60));
//}
if (teqx != '' && ttqqbits != lastttqqbits) { console.log('ttqqbits=' + ttqqbits); selc=selc.replace('</select>',oncnt('<option value=' + ttqqbits + '>' + teqx.replace(/\(/g,'[').replace(/\)/g,']').replace(/junk\|junk/g,'junk~junk') + durbits + '</option></select>'));
lastttqqbits=ttqqbits;
qdelim=',';
q11=11;
}
if (sstr != "") {
adurbits=durbits.substring(2).replace(')','').split(':');
for (ifo=eval(-1 + adurbits.length); ifo>=0; ifo--) {
fosecs+=eval(adurbits[ifo] * fofactor);
fofactor*=60.0;
}
attqqbits.push(ttqqbits);
afosecs.push(fosecs);
////www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=CPMpeNDIGdk&recown=on&youtube_duration=449.00&c0=on&i0=0&j0=60&c1=on&i1=80%3Bhttp%3A%2F%2Flocalhost%3A8888%2FmyRecording00.wav&j1=124&c2=on&i2=144&j2=396&c3=on&i3=416&j3=449&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=
//sstr='';
//location.href='//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=' + ttqqbits + '&youtube_duration=' + fosecs + '&c0=on&i0=0&j0=' + fosecs;
}
if (sstr != '') {
var thisois=Math.floor(Math.random() * eval(0 + afosecs.length)) + 0;
//if (onestodo.length > 1) alert('Here');
var kbitis=document.URL.split('#')[0].split('?')[0].split('/')[eval(-1 + document.URL.split('#')[0].split('?')[0].split('/').length)];
//location.href='//www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=' + attqqbits[thisois] + urlextra + '&youtube_duration=' + afosecs[thisois] + '&c0=on&i0=0&j0=' + afosecs[thisois];
//alert(98);
location.href='//www.rjmprogramming.com.au/HTMLCSS/' + kbitis + '?youtubeid=' + attqqbits[thisois].replace(/\+/g, '%20') + urlextra + '&youtube_duration=' + afosecs[thisois] + '&c0=' + czzis + '&i0=0&j0=' + afosecs[thisois];
sstr='';
selc='';
}
} //else {
//document.title+=' why? ';
//}
}
if (is_okay) { document.getElementById('ajax').innerHTML=selc; if (document.URL.indexOf('pvostid=') !== -1) { if (parent.document.getElementById('ajaxs')) { parent.document.getElementById('ajaxs').innerHTML+=oncnt('<option value=" ... and then ...">... and then ...</option>' + selc.split('</select>')[0].split('Optionally choose YouTube title below ...</option>')[1]); parent.ajaxsih=parent.document.getElementById('ajaxs').innerHTML; if (('' + parent.document.URL).indexOf('audiocard=') != -1 && 2 == 5) { alert('22:' + parent.document.getElementById('ajaxs').outerHTML); if (2 == 4) { parent.tryagain(); } } if (!navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { parent.document.getElementById('ajaxs').size='' + eval(26 + parent.document.getElementById('ajaxs').size); } } } if (domin) { mintoajax(); } }
}
});
}
if (eval(1 + jqq) < oparts.length) {
is_okay=true;
selname = oparts[eval(1 + jqq)].split(' && ')[0]; //whytid;
if (selname.indexOf('v=') == 0) {
//qsel=encodeURIComponent(selname);
qsel=selname;
//alert("//localhost:8888/legend_via_map.php?url=" + encodeURIComponent("//www.youtube.com/results?search_query=" + qsel));
} else {
sstr="";
qsel=('"' + selname + '"').replace(/\"intitle\:/g, 'intitle:');
while (qsel.indexOf(' ') != -1) {
qsel=qsel.replace(" ","+");
}
}
}
//}
//}
} else {
document.getElementById('ajax').innerHTML='';
}
}
}
}
}
function tryagain() {
if (!document.getElementById('ajaxs')) {
setTimeout(tryagain, 1000);
} else {
setTimeout(function(){
if (parent.document.getElementById('divpajaxs')) {
parent.document.getElementById('divpajaxs').innerHTML=document.getElementById('ajaxs').outerHTML.replace(' id="ajaxs"', ' id="pajaxs"').replace(' style=', ' style=background-color:silver; data-style=').replace(/\ onclick\=/g, ' data-onclick=').replace('</option>', ' ' + parent.document.getElementById('divpajaxs').title + '</option>');
location.href='/HTMLCSS/karaoke_youtube_api.htm?youtubeid=&audiocard=yes&minimize=y&youtube_duration=&email=&emoji=on&ir=140972061';
} else if (parent.document.getElementById('oversee')) {
parent.document.getElementById('oversee').style.overflow='visible';
parent.document.getElementById('oversee').innerHTML=document.getElementById('ajaxs').outerHTML.replace(' id="ajaxs"', ' id="pajaxs"').replace(' style=', ' style="width:120px;" data-style=').replace(/\ onclick\=/g, ' data-onclick=');
parent.document.getElementById('pajaxs').size='20';
location.href='/HTMLCSS/karaoke_youtube_api.htm?youtubeid=&audiocard=yes&minimize=y&youtube_duration=&email=&emoji=on&ir=140972061';
} else {
document.getElementById('ajaxs').style.position='absolute';
document.getElementById('ajaxs').style.left='0px';
document.getElementById('ajaxs').style.top='0px';
document.getElementById('ajaxs').style.width='120px';
document.getElementById('ajaxs').style.zIndex='1999';
}
}, 9000);
}
}
function findduration(vidiso,vtxt) {
var youreleven=11;
var oklast=['A','E','I','M','Q','U','Y','c','g','k','o','s','w','0','4','8'];
var oklasts=['A#','E#','I#','M#','Q#','U#','Y#','c#','g#','k#','o#','s#','w#','0#','4#','8#'];
if (vtxt == ' ') {
loopcall=true;
vtxt='';
}
if (('' + window.sessionStorage.getItem('loop_' + vtxt.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title) == 'No more') {
//alert('One');
ismobileplaylist=true;
}
}
return '';
}
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title) == 'No more') {
return '';
}
}
if (vtxt == '') { // check for wrong last YouTube video ID last character
if (vidiso != null) {
if (vidiso.value.trim().indexOf('#') != -1 && vidiso.value.trim().indexOf('#') == 11) {
if (vidiso.value.toLowerCase().indexOf('cannotenda2') == -1) {
if (oklasts.indexOf(vidiso.value.trim().split('#')[0].slice(-1) + '#') == -1) {
youreleven=0;
}
}
} else if (eval('' + vidiso.value.length) == 11) {
if (vidiso.value.toLowerCase().indexOf('cannotenda2') == -1) {
if (oklasts.indexOf(vidiso.value.slice(-1) + '#') == -1) {
youreleven=0;
}
}
}
}
} else if (eval('' + vtxt.length) == 11) {
if (vtxt.toLowerCase().indexOf('cannotenda2') == -1) {
if (oklasts.indexOf(vtxt.slice(-1) + '#') == -1) {
youreleven=0;
}
}
}
//alert('' + youreleven + ' vtxt=' + vtxt);
if (window.top) {
if (vtxt == '') {
if (vidiso != null) {
if (vidiso.value.trim().indexOf('#') == youreleven) {
if ((vidiso.value.trim() + '~').indexOf('#srt=~') != -1) {
location.hash='#srt=';
vidiso.value=vidiso.value.replace('#srt=', '');
capto=window.open('/HTMLCSS/stop_start_youtube.html?vid=' + vidiso.value.substring(0,11) + '&playtime=0&srt=', '_blank', 'width=700,height=700,left=' + eval(-700 + eval('' + screen.width)) + ',top=' + eval(-700 + eval('' + screen.height)));
setTimeout(watchcapto, 3000);
} else if (vidiso.value.trim().split('#')[1].indexOf('WEBVTT%20FILE') != -1) {
lhme('#srt=' + 'WEBVTT%20FILE' + (vidiso.value.trim().split('#')[1].split('WEBVTT%20FILE')[1]));
vidiso.value=vidiso.value.substring(0,11);
} else if (vidiso.value.trim().split('#')[1].indexOf('WEBVTT FILE') != -1) {
lhme('#srt=' + 'WEBVTT%20FILE' + encodeURIComponent(vidiso.value.trim().split('#')[1].split('WEBVTT FILE')[1]));
vidiso.value=vidiso.value.substring(0,11);
} else {
lhme('#srt=' + encodeURIComponent(vidiso.value.trim().split('#')[1]));
vidiso.value=vidiso.value.substring(0,11); //vidiso.value=vidiso.value.replace('#' + vidiso.value.split('#')[1].split(' ')[0], '');
}
}
if (eval('' + vidiso.value.length) == youreleven && vidiso.value == vidiso.value.trim()) {
if (('' + window.localStorage.getItem('capsub_' + vidiso.value.trim())).replace(/^undefined/g, '').replace(/^null/g, '') != '') {
passthislhon='' + window.localStorage.getItem('capsub_' + vidiso.value.trim());
//alert(passthislhon);
location.hash='' + window.localStorage.getItem('capsub_' + vidiso.value.trim());
}
}
if (('' + document.URL).indexOf('audiocard=') != -1) {
if (vidiso.value.trim() != '') {
if (eval('' + vidiso.value.length) == youreleven && vidiso.value == vidiso.value.trim()) {
if (document.getElementById('ssubrip').innerHTML.indexOf('?srt=') != -1) {
document.getElementById('ssubrip').innerHTML=document.getElementById('ssubrip').innerHTML.replace('?srt=', '?vid=' + vidiso.value + '&playtime=0&srt=');
} else if (document.getElementById('ssubrip').innerHTML.indexOf('?vid=') != -1) {
document.getElementById('ssubrip').innerHTML=document.getElementById('ssubrip').innerHTML.replace('vid=' + document.getElementById('ssubrip').innerHTML.split('vid=')[1].split('&')[0].split('#')[0], 'vid=' + vidiso.value);
}
parent.document.getElementById('youtubeid').value=vidiso.value.trim();
parent.document.getElementById('oversee').style.visibility='hidden';
} else if (1 == 1) {
//alert('try');
if (parent.document.getElementById('divpajaxs')) {
parent.document.getElementById('divpajaxs').title=' ... please feel free to select "' + vidiso.value.trim() + '" YouTube video below ...';
}
tryagain();
} else if (1 == 5) {
setTimeout(function(){
if (!document.getElementById('ajaxs')) {
tryagain();
} else {
document.getElementById('ajaxs').style.position='absolute';
document.getElementById('ajaxs').style.left='0px';
document.getElementById('ajaxs').style.top='0px';
document.getElementById('ajaxs').style.width='120px';
document.getElementById('ajaxs').style.zIndex='1999';
}
}, 9000);
}
}
}
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
if ((eval('' + vidiso.value.length) == 34 || eval('' + vidiso.value.length) == 22) && vidiso.value.trim().indexOf(' ') == -1) {
if (plo) {
if (!plo.closed) {
try {
plo.close();
} catch(ert) {
}
}
plo=null;
}
if (eval('' + vidiso.value.trim().length) == 34) {
plo=window.open('//www.youtube.com/watch?v=&index=1&list=' + vidiso.value, '_blank', 'width=600,height=600,top=0,left=' + eval(-600 + eval('' + screen.width)));
vidiso.value='';
} else if (eval('' + vidiso.value.trim().length) == 22) {
plo=window.open('//open.spotify.com/playlist/' + vidiso.value, '_blank', 'width=600,height=600,top=0,left=' + eval(-600 + eval('' + screen.width)));
vidiso.value='';
}
} else if (eval('' + vidiso.value.length) == youreleven && vidiso.value == vidiso.value.trim()) {
//alert(66);
//alert(2987);
top.document.getElementById('list_eleven').innerHTML=vidiso.value;
//alert('list_eleven Is ' + vidiso.value);
} else if (top.document.getElementById('list_eleven').title == '') {
//alert(3987);
top.document.getElementById('list_eleven').title=' ';
//alert(987);
//return '';
//alert(document.URL + ' ... ' + parent.document.URL);
setTimeout(function(){
document.getElementById('ajaxs').style.position='absolute';
document.getElementById('ajaxs').style.left='0px';
document.getElementById('ajaxs').style.top='26px';
if (document.getElementById('stz')) {
document.getElementById('stz').scrollIntoView();
}
}, 4000);
if (parent.useforce) {
parent.useforce();
}
if (4 == 6) {
if (1 == 11) {
parent.location.href+='#';
} else {
setTimeout(function(){ parent.location.href=parent.document.URL; }, 20000);
}
return ''; //puty(document.getElementById('ajaxs'));
}
} else if (4 == 6) {
//alert(4987);
return ''; // huh
}
}
}
}
}
if (vtxt != '') {
// if (vtxt.length > "URuOw1Pi58Y".length || vtxt.trim().indexOf(' ') != -1) {
// Don't count on 11 for ever ... so add in 12 below ... https://webapps.stackexchange.com/questions/13854/are-youtube-codes-guaranteed-to-always-be-11-characters
// Count out characters instead ... help from https://stackoverflow.com/questions/3028642/regular-expression-for-letters-numbers-and ... 2*26 letters (lowercase and uppercase) + 10 for the digits, + 2 for "_" and "-" chars
//alert(vtxt.match(/^[a-zA-Z0-9_-]*$/));
if (vtxt.match(/^[a-zA-Z0-9_-]*$/) == false || (vtxt.length < "URuOw1Pi58Y".length || vtxt.length > 12) || vtxt.trim().indexOf(' ') != -1) {
if (amwaiting) {
allowable=true;
getytlist(vtxt, true);
} else {
getytlist(vtxt, false);
}
} else {
ourvid=vtxt;
//alert("onestodosuffix=" + onestodosuffix + ' top.document.title=' + top.document.title);
//document.getElementById('myiframe').src="stop_start_youtube.html?vid=" + ourvid + "&playtime=" + thisd + "&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix);
if (document.getElementById('youtube_duration').value.indexOf('22223.') != -1) {
//console.warn('here at 10a ' + firstprefix + "stop_start_youtube.html?vid=" + ourvid + "&playtime=22223.000&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix));
if (!ismobileplaylist) {
//alert('nhere' + nextismedia);
ndt=new Date();
if (!window.parent) {
//document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + "&playtime=22223.000&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + "&playtime=22223.000&start=" + document.getElementById('i' + gi).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
} else if (parent.document.URL.indexOf('/select_palette.') != -1) {
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + "&playtime=22223.000&start=0&ct=" + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
} else {
//document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + "&playtime=22223.000&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + "&playtime=22223.000&start=" + document.getElementById('i' + gi).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
}
gi++;
}
} else {
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title).indexOf('No more') == 0) { // used to be == 'No more'
//alert('Two');
ismobileplaylist=true;
}
}
//console.warn('here at 10 ' + ismobileplaylist + ' ... ' + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
if (!ismobileplaylist && ('' + window.sessionStorage.getItem('loop_' + ourvid.split(',')[0])).replace(/^undefined/g,'').replace(/^null/g,'').trim() == '') {
//alert('mhere' + nextismedia);
//if (ourvid != 'cannotenda2') {
console.warn('here at 10 ' + ismobileplaylist + ' ... ' + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix));
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
//}
}
}
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
setTimeout(showd, 200);
}
} else if (vidiso.value.indexOf('v=') != -1) {
ourvid=vidiso.value.split('v=')[1].split('&')[0].split('#')[0];
vidiso.value=ourvid;
//alert("onesTodosuffix=" + onestodosuffix);
console.warn('here at 11');
if (!ismobileplaylist) {
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
}
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
setTimeout(showd, 200);
} else if (vidiso.value.match(/^[a-zA-Z0-9_-]*$/) == false || (vidiso.value.length < "URuOw1Pi58Y".length || youreleven == 0 || vidiso.value.length > 12) || vidiso.value.trim().indexOf(' ') != -1) {
//} else if (vidiso.value.length > "URuOw1Pi58Y".length || vidiso.value.trim().indexOf(' ') != -1) {
// Don't count on 11 for ever ... so add in 12 below ... https://webapps.stackexchange.com/questions/13854/are-youtube-codes-guaranteed-to-always-be-11-characters
// Count out characters instead ... help from https://stackoverflow.com/questions/3028642/regular-expression-for-letters-numbers-and ... 2*26 letters (lowercase and uppercase) + 10 for the digits, + 2 for "_" and "-" chars
var spr='!||!';
var mts=vidiso.value.split(spr);
if (mts.length == 1) {
spr='|!!|';
mts=vidiso.value.split(spr);
}
if (mts.length == 1) {
spr='|!|!';
mts=vidiso.value.split(spr);
}
if (mts.length == 1) {
spr='!|!|';
mts=vidiso.value.split(spr);
}
if (mts.length == 1) {
spr='!!||';
mts=vidiso.value.split(spr);
}
if (mts.length == 1) {
spr='||!!';
mts=vidiso.value.split(spr);
}
if (mts.length > 1) {
if (document.URL.indexOf('minimize=Y') != -1) {
//alert(document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '?vid=%20%20%20%20%20%20%20%20%20%20%20%20' + encodeURIComponent(vidiso.value) + '#minimize=Y');
location.href=document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '?vid=%20%20%20%20%20%20%20%20%20%20%20%20' + encodeURIComponent(vidiso.value) + '#minimize=Y';
} else {
location.href=document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '?vid=%20%20%20%20%20%20%20%20%20%20%20%20' + encodeURIComponent(vidiso.value);
}
}
if (donef && document.getElementById('youtube_duration').value != '' && ourvid != vidiso.value) {
//if (onestodo.length > 1) alert('HerE');
//alert(99);
location.href=document.URL.split('?')[0].split('#')[0] + '?youtubeid=' + encodeURIComponent(vidiso.value).replace(/\+/g,'%20');
} else {
if (amwaiting) {
allowable=true;
getytlist(vidiso.value, true);
} else {
getytlist(vidiso.value, false);
}
}
} else {
ourvid=vidiso.value;
if (ourvid != '' && amwaiting) {
allowable=true;
getytlist(ourvid, true);
}
//alert("onestodosufFix=" + onestodosuffix);
console.warn('here at 12 ' + ismobileplaylist);
if (!ismobileplaylist) {
document.getElementById('performance').innerHTML=ouriframe("<iframe onload=checkss(this); id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea + "'></iframe>");
}
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
setTimeout(showd, 200);
}
donef=true;
}
function newereval(cwhat) {
var retval='';
var kkzero=0;
var delmtry='|';
var cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry=',';
cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry='!';
cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry='@';
cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry='#';
cbitsare=cwhat.split(delmtry);
}
}
}
}
if (eval('' + cbitsare.length) > 1) {
if (eval('' + cbitsare[0].length) >= 11) {
retval=cbitsare[0];
} else if (eval('' + cbitsare[1].length) >= 11) {
retval=cbitsare[1];
}
}
return retval;
}
function parentvidtitlespassedit() {
var iuh=0;
while (document.getElementById('i' + iuh)) {
if (eval('' + parentvidtitlespassed.length) > iuh) {
document.getElementById('i' + iuh).placeholder='' + parentvidtitlespassed[iuh];
document.getElementById('i' + iuh).title='' + parentvidtitlespassed[iuh] + ' ... double click or right click or spread/pinch to play now ...';
document.getElementById('i' + iuh).setAttribute('data-index', '' + iuh);
document.getElementById('i' + iuh).ondblclick=function(event){ forcemix=eval('' + event.target.getAttribute('data-index')); mixitup(document.URL,true); };
document.getElementById('i' + iuh).oncontextmenu=function(event){ forcemix=eval('' + event.target.getAttribute('data-index')); mixitup(document.URL,true); };
document.getElementById('i' + iuh).ontouchend=function(event){ forcemix=eval('' + event.target.getAttribute('data-index')); mixitup(document.URL,true); };
}
iuh++;
}
}
function neweval(cwhat) {
var vtd='', newa=null;
var kkzero=0;
var delmtry='|';
if (cwhat.indexOf('data') >= 0) {
if (cwhat.indexOf('data') > 0) {
nextismedia=true;
return eval('' + cwhat.split('data')[0].substring(0,eval(-1 + eval('' + cwhat.split('data')[0].length))))
}
return 0;
} else if (cwhat.indexOf('data:audio/') != -1) {
newa=document.createElement('audio');
newa.onloadedmetadata=function(event){
if (1 == 2) {
event.target.play();
}
}
newa.type='audio/' + cwhat.split('/')[1].split(',')[0].split(';')[0];
newa.src=cwhat;
return 0;
}
var cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry=',';
cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry='!';
cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry='@';
cbitsare=cwhat.split(delmtry);
if (eval('' + cbitsare.length) <= 1) {
delmtry='#';
cbitsare=cwhat.split(delmtry);
}
}
}
}
var iki=0, surl='';
var wasurl=document.URL.split('#')[0];
var waslh='';
if (document.URL.indexOf('#') != -1) {
waslh='#' + document.URL.split('#')[1];
if (decodeURIComponent(waslh.substring(1)).indexOf('http') == 0) {
if (decodeURIComponent(waslh.substring(1)).indexOf('&vidtitles=') != -1) {
vtd=decodeURIComponent(decodeURIComponent(waslh.substring(1)).split('&vidtitles=')[1].split('&')[0].split('#')[0]);
parentvidtitlespassed=vtd.split(String.fromCharCode(10004));
if (eval('' + parentvidtitlespassed.length) > 1) {
setTimeout(parentvidtitlespassedit, 2000); // 3000
}
}
}
}
var isurl=wasurl, prefixingurl=wasurl, suffixingurl=wasurl;
if (eval('' + cbitsare.length) > 1) {
if (eval('' + cbitsare[0].length) >= 11) {
iki=1;
surl=wasurl.split(cbitsare[0])[0].split('&c')[eval(-1 + wasurl.split(cbitsare[0])[0].split('&c').length)];
prefixingurl=wasurl.split(surl)[0];
suffixingurl=wasurl.split(prefixingurl)[1];
//prefixingurl=prefixingurl.replace(/\=on/g,'=off');
if (prefixingurl.indexOf('youtubeid=') != -1) {
prefixingurl=prefixingurl.replace('youtubeid=' + prefixingurl.split('youtubeid=')[1].split('&')[0].split('#')[0], 'youtubeid=' + cbitsare[0]);
while (prefixingurl.indexOf('&i' + kkzero + '=') != -1) {
prefixingurl=prefixingurl.replace('&i' + kkzero + '=' + prefixingurl.split('&i' + kkzero + '=')[1].split('&c')[0], '&i' + kkzero + '=0&j' + kkzero + '=0');
kkzero++;
}
suffixingurl=suffixingurl.replace(cbitsare[0] + encodeURIComponent(delmtry), '').replace(cbitsare[0] + delmtry, '');
if (comingurl == '') { ieo=false; comingurl=prefixingurl + suffixingurl + waslh; setTimeout(function(){ wascomingurl=comingurl; }, 900); lhchk(' '); document.getElementById('myform').onsubmit=function(){ return false; }; }
if (isendof && 1 == 6) { location.href=prefixingurl + suffixingurl; }
}
} else if (eval('' + cbitsare[1].length) >= 11) {
iki=0;
surl=wasurl.split(cbitsare[1])[0].split('&c')[eval(-1 + wasurl.split(cbitsare[1])[0].split('&c').length)];
prefixingurl=wasurl.split(surl)[0];
suffixingurl=wasurl.split(prefixingurl)[1];
//prefixingurl=prefixingurl.replace(/\=on/g,'=off');
if (prefixingurl.indexOf('youtubeid=') != -1) {
prefixingurl=prefixingurl.replace('youtubeid=' + prefixingurl.split('youtubeid=')[1].split('&')[0].split('#')[0], 'youtubeid=' + cbitsare[1]);
while (prefixingurl.indexOf('&i' + kkzero + '=') != -1) {
prefixingurl=prefixingurl.replace('&i' + kkzero + '=' + prefixingurl.split('&i' + kkzero + '=')[1].split('&c')[0], '&i' + kkzero + '=0&j' + kkzero + '=0');
kkzero++;
}
suffixingurl=suffixingurl.replace(encodeURIComponent(delmtry) + cbitsare[1], '').replace(delmtry + cbitsare[1], '');
if (comingurl == '') { ieo=false; comingurl=prefixingurl + suffixingurl + waslh; setTimeout(function(){ wascomingurl=comingurl; }, 900); lhchk(' '); document.getElementById('myform').onsubmit=function(){ return false; }; }
if (isendof && 1 == 6) { location.href=prefixingurl + suffixingurl; }
}
}
}
return eval('' + cbitsare[iki].split(';')[0].split(encodeURIComponent(';')));
}
function mixitup(mwhat, doitnow) {
var outwhat=mwhat, elwhat='', durwhat='0', durlong='0.000', startwhat='0';
var wasforcemix=forcemix;
//alert(comingurl);
if (outwhat == '') { return outwhat; }
//alert(mwhat);
var tonum=eval('' + Math.floor(Math.random() * 30));
if (forcemix >= 0) { tonum=forcemix; forcemix=-1; }
elwhat='';
if (!document.getElementById('c' + tonum)) {
elwhat='';
} else if (!document.getElementById('c' + tonum).checked) {
elwhat='';
} else if (tonum == 0) {
elwhat=decodeURIComponent(decodeURIComponent(mwhat.split(encodeURIComponent('youtubeid='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]));
} else if (mwhat.indexOf('&i' + tonum + '=') != -1) {
elwhat=newereval(decodeURIComponent(decodeURIComponent(mwhat.split(encodeURIComponent('&i' + tonum + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0])));
} else {
elwhat='';
}
while (mwhat.indexOf(encodeURIComponent('&c' + tonum + '=on')) == -1 || elwhat == '' || document.URL.indexOf('youtubeid=' + elwhat + '&') != -1) {
tonum=eval('' + Math.floor(Math.random() * 30));
if (!document.getElementById('c' + tonum)) {
elwhat='';
} else if (!document.getElementById('c' + tonum).checked) {
elwhat='';
} else if (tonum == 0) {
elwhat=decodeURIComponent(decodeURIComponent(mwhat.split(encodeURIComponent('youtubeid='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]));
} else if (mwhat.indexOf('&i' + tonum + '=') != -1) {
elwhat=newereval(decodeURIComponent(decodeURIComponent(mwhat.split(encodeURIComponent('&i' + tonum + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0])));
} else {
elwhat='';
}
}
startwhat=neweval(decodeURIComponent(decodeURIComponent(mwhat.split(encodeURIComponent('&i' + tonum + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0])));
durwhat=decodeURIComponent(decodeURIComponent(mwhat.split(encodeURIComponent('&j' + tonum + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0])).replace(/\+/g,'');
if (durwhat.indexOf('.') != -1) {
durlong='' + durwhat;
durwhat=durlong.split('.')[0];
} else {
durlong='' + durwhat + '.000';
}
//alert('tonum=' + tonum + ' and elwhat=' + elwhat + ' and outwhat=' + outwhat);
if (elwhat != '') {
mwhat=document.URL.split(encodeURIComponent('&shuffle='))[0];
if (doitnow) {
if (wasforcemix >= 0) {
//alert(mwhat.replace('youtubeid=' + mwhat.split('youtubeid=')[1].split('&')[0].split('#')[0], 'youtubeid=' + elwhat).replace('youtube_duration=' + mwhat.split('youtube_duration=')[1].split('&')[0].split('#')[0], 'youtube_duration=' + encodeURIComponent(durlong)).replace('c0=' + mwhat.split('c0=')[1].split('&')[0].split('#')[0], 'c0=on').replace('j0=' + mwhat.split('j0=')[1].split('&')[0].split('#')[0], 'j0=' + encodeURIComponent(durwhat)).replace('i0=' + mwhat.split('i0=')[1].split('&')[0].split('#')[0], 'i0=' + encodeURIComponent(startwhat)) + encodeURIComponent('&shuffle=y'));
window.open(mwhat.replace('youtubeid=' + mwhat.split('youtubeid=')[1].split('&')[0].split('#')[0], 'youtubeid=' + elwhat).replace('youtube_duration=' + mwhat.split('youtube_duration=')[1].split('&')[0].split('#')[0], 'youtube_duration=' + encodeURIComponent(durlong)).replace('c0=' + mwhat.split('c0=')[1].split('&')[0].split('#')[0], 'c0=on').replace('j0=' + mwhat.split('j0=')[1].split('&')[0].split('#')[0], 'j0=' + encodeURIComponent(durwhat)).replace('i0=' + mwhat.split('i0=')[1].split('&')[0].split('#')[0], 'i0=' + encodeURIComponent(startwhat)) + encodeURIComponent('&shuffle=y'), '_blank', 'top=10,left=10,width=1000,height=800');
} else {
location.href=mwhat.replace('youtubeid=' + mwhat.split('youtubeid=')[1].split('&')[0].split('#')[0], 'youtubeid=' + elwhat).replace('youtube_duration=' + mwhat.split('youtube_duration=')[1].split('&')[0].split('#')[0], 'youtube_duration=' + encodeURIComponent(durlong)).replace('c0=' + mwhat.split('c0=')[1].split('&')[0].split('#')[0], 'c0=on').replace('j0=' + mwhat.split('j0=')[1].split('&')[0].split('#')[0], 'j0=' + encodeURIComponent(durwhat)).replace('i0=' + mwhat.split('i0=')[1].split('&')[0].split('#')[0], 'i0=' + encodeURIComponent(startwhat)) + encodeURIComponent('&shuffle=y');
}
}
return mwhat.replace('youtubeid=' + mwhat.split('youtubeid=')[1].split('&')[0].split('#')[0], 'youtubeid=' + elwhat).replace('youtube_duration=' + mwhat.split('youtube_duration=')[1].split('&')[0].split('#')[0], 'youtube_duration=' + encodeURIComponent(durlong)).replace('c0=' + mwhat.split('c0=')[1].split('&')[0].split('#')[0], 'c0=on').replace('j0=' + mwhat.split('j0=')[1].split('&')[0].split('#')[0], 'j0=' + encodeURIComponent(durwhat)).replace('i0=' + mwhat.split('i0=')[1].split('&')[0].split('#')[0], 'i0=' + encodeURIComponent(startwhat));
}
return outwhat;
}
function ylastchk() {
if (lastyturlis == document.getElementById('youtubeid').value && lastyturlis != '') {
document.getElementById('myiframe').src='//www.youtube.com/embed/' + document.getElementById('youtubeid').value;
}
}
function getnim() {
//alert('nextismedia=' + nextismedia);
if (!nextismedia) {
lastyturlis=document.getElementById('youtubeid').value;
setTimeout(ylastchk, 8000);
//document.getElementById('myiframe').src='//www.youtube.com/embed/' + document.getElementById('youtubeid').value;
}
return nextismedia;
}
function setnim(tow) {
nextismedia=tow;
}
function obal() {
obsessallowed='';
}
function obsessabout(evt) {
evt.stopPropagation();
if (obsessallowed == '') {
obsessallowed='' + evt.target.id;
setTimeout(obal, 5000);
var todataob='';
var nnum=0;
var theonetokeep=('' + evt.target.id).replace('i','');
if (('' + document.getElementById('i' + theonetokeep).getAttribute('data-putback')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
var onestpb=document.getElementById('i' + theonetokeep).getAttribute('data-putback').split(',');
while (document.getElementById('i' + nnum)) {
nnum++;
}
for (var jonek=0; jonek<nnum; jonek++) {
if (document.getElementById('c' + jonek)) {
if (onestpb.indexOf(('' + jonek)) != -1) {
document.getElementById('c' + jonek).checked=true;
} else {
document.getElementById('c' + jonek).checked=false;
}
}
}
document.getElementById('i' + theonetokeep).setAttribute('data-putback', '');
backtolist=[];
} else {
backtolist=['c' + eval('' + theonetokeep)];
todataob='' + theonetokeep;
document.getElementById('c' + theonetokeep).checked=true;
while (document.getElementById('i' + nnum)) {
if (('' + nnum) != ('' + theonetokeep)) {
if (document.getElementById('c' + nnum).checked) {
backtolist.push('c' + eval('' + nnum));
todataob+=',' + nnum;
}
document.getElementById('c' + nnum).checked=false;
}
nnum++;
}
if (todataob != '') {
document.getElementById('i' + theonetokeep).setAttribute('data-putback', todataob);
//top.document.title=todataob;
}
}
}
}
function queuenext() {
var which=next, thisd=0.0, more=false, thisstart=0.0, audios, somethingtodo=false, ijh=0;
if (5 == 5) {
if (('' + window.sessionStorage.getItem('loop_' + ourvid)).replace(/^undefined/g,'').replace(/^null/g,'').trim() != '') {
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title) == 'No more') {
//alert('Three');
ismobileplaylist=true;
}
}
return '';
}
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title) == 'No more') {
return '';
}
}
}
//if (onestodo.length > 1) {
// top.document.title+=" ; " + onestodosuffix;
// alert(onestodo[1] + " ; " + onestodosuffix);
//}
if (nextismedia || (comingurl != '' && !isendof)) { return ''; }
//alert('chere' + nextismedia);
if (document.getElementById('j0').value.indexOf('.') == -1) {
document.getElementById('j0').value+='';
} else {
var xxqw=document.getElementById('j0').value.split('.');
if (xxqw[1].length > 3) {
document.getElementById('j0').value=xxqw[0] + '.' + xxqw[1].substring(0,3);
}
}
if (audiof != '' && document.getElementById('audiofiles').innerHTML != '') {
document.getElementById('audiofiles').innerHTML="";
audiof='';
ioffset=-1;
} else if (audioask) {
audioask=false;
try {
if (audiow !=- null) {
audiow.close();
}
} catch (ee) { }
audiow=null;
if (audiof == '') {
var outaf=null;
if (dorecord) outaf=prompt('Please enter URL to access local audio you just captured. There is very little chance you will not need to change the default value. If it starts with file: you will have to double click these when prompted, else .wav ones are automated, and you can use local web servers like Mac OS X Apache/PHP MAMP (https://www.mamp.info) for a filename like //localhost:8888/myRecording00.wav that would work if you have copied the audio from the Downloads folder to /Applications/MAMP/htdocs/ for instance. Windows has Apache/PHP EasyPHP (//www.easyphp.org/) local web server.', 'file:///home/Downloads/myRecording00.wav');
if (outaf) {
if (outaf != '') {
morechanges=false;
document.getElementById('i' + audioi).value+=';' + outaf;
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('dkaraoke').style.visibility='visible';
document.getElementById('dkaraokem').style.visibility='visible';
document.getElementById('dkaraoker').style.visibility='visible';
document.getElementById('trrhead').style.display='none';
document.getElementById('karaoke').style.visibility='visible';
if (document.getElementById('d' + emojisuffix + 'karaoke')) {
//if (emojisuffix == 'dd' || emojisuffix == 'd') { alert('WOW'); }
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='visible'; // huh
// alert(emojisuffix + 'karaoke');
emojistuff();
}
}
}
}
audiof='';
}
if (huhaudiow) document.title+=" here again with next=" + next + " and ioffset=" + ioffset + " ";
//alert('snippet=' + snippet + '*and* snippet=' + snippet + '*');
document.getElementById('areyousinging').innerHTML='';
if (eval(snippet) >= 0) {
if (document.URL.indexOf('i0=') == -1) {
if (mbmode == false) {
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('dkaraoke').style.visibility='hidden';
document.getElementById('dkaraokem').style.visibility='hidden';
document.getElementById('dkaraoker').style.visibility='hidden';
document.getElementById('trrhead').style.display='none';
document.getElementById('ddkaraoke').style.visibility='visible';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='hidden';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='hidden';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='hidden';
if (document.getElementById('d' + emojisuffix + 'dkaraoke')) {
document.getElementById('d' + emojisuffix + 'dkaraoke').style.visibility='visible';
document.getElementById(emojisuffix + 'dkaraoke').style.visibility='hidden'; // huh
}
emojistuff();
}
} else {
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('ddkaraoke').style.visibility='hidden';
document.getElementById('dkaraoke').style.visibility='visible';
document.getElementById('dkaraokem').style.visibility='visible';
document.getElementById('dkaraoker').style.visibility='visible';
document.getElementById('trrhead').style.display='none';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
//alert('WOW2');
document.getElementById('dd' + emojisuffix + 'karaoke').style.visibility='hidden';
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='visible';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='visible'; // huh
emojistuff();
}
}
} else if (morechanges) {
document.getElementById('trbutton').style.visibility='visible';
document.getElementById('dkaraoke').style.visibility='hidden';
document.getElementById('dkaraokem').style.visibility='hidden';
document.getElementById('dkaraoker').style.visibility='hidden';
document.getElementById('trrhead').style.display='none';
document.getElementById('ddkaraoke').style.visibility='visible';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
//alert('WOW22 ' + emojisuffix + ' ' + ddejkaraokev);
document.getElementById('d' + emojisuffix + 'karaoke').style.visibility='hidden';
document.getElementById('d' + emojisuffix + 'karaokem').style.visibility='hidden';
document.getElementById('d' + emojisuffix + 'karaoker').style.visibility='hidden';
document.getElementById('dd' + emojisuffix + 'karaoke').style.visibility=ddejkaraokev; //'visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='hidden'; //
emojistuff();
}
}
for (var i=0; i<=snippet; i++) {
ijh++;
if (document.getElementById('c' + i).checked) {
//alert('34987 ' + i + ' ' + ioffset);
if (i == eval(ioffset + which)) {
//alert('4987 ' + i + ' ' + ioffset + ' snippet=' + snippet);
nextismedia=false;
if (snippet > i) {
if (document.getElementById('c' + eval(i + 1)).checked) {
if (document.getElementById('i' + eval(i + 1)).value.indexOf('data') >= 0) {
nextismedia=true;
}
}
}
somethingtodo=true;
if (huhaudiow) document.title+=" chose i=" + i + " ";
next=i;
audioi=i;
audios=document.getElementById('i' + i).value.split(';');
if (audios.length > 1 && eval(ioffset) == 0) {
if (audiof == "") {
document.getElementById('url').value=audios[1];
}
audiof=audios[1];
dorecord=false;
} else if (audios.length > 1) {
if (dorecord) closeaudio();
audiof='';
} else if (audiow) {
if (dorecord) closeaudio();
}
if (huhaudiow) document.title+=" and audiof=" + audiof + " ";
thisstart=neweval(audios[0]);
if (comingurl == '') { // && document.getElementById('c' + ijh) && document.getElementById('i' + ijh)) {
if (document.getElementById('c' + ijh) && document.getElementById('i' + ijh)) {
if (document.getElementById('c' + ijh).checked) {
//alert(987);
var newv=neweval(document.getElementById('i' + ijh).value);
if (comingurl != '') {
setTimeout(function(){ document.title=document.getElementById('myh1').innerHTML; }, 2000);
setTimeout(function(){ if (document.URL.indexOf('7o9wvYXR3n0') != -1) { console.log('0000z' + eval(eval(document.getElementById('j' + i).value) - eval(thisstart)) + ': ' + ('' + new Date()) + ' queuenext()'); } isendof=true; queuenext(); }, eval(1000 * eval(eval(document.getElementById('j' + i).value) - eval(thisstart))));
//alert('x:' + eval(1000 * eval(eval(document.getElementById('j' + i).value) - eval(thisstart))));
} else if (recallurl != '' && ieo && document.getElementById('j' + i).value != '0') {
ieo=false;
lhchk(' ');
setTimeout(function(){ document.title=document.getElementById('myh1').innerHTML; }, 2000);
setTimeout(function(){
if (comingurl == '') {
if (!document.getElementById('loopchk')) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl;
}
} else if (document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl.replace('loop=n','loop=y').replace(encodeURIComponent('loop=n'),encodeURIComponent('loop=y'));
}
} else if (!document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl.replace('loop=y','loop=n').replace(encodeURIComponent('loop=y'),encodeURIComponent('loop=n'));
}
}
}
}, eval(1000 * eval(eval(document.getElementById('j' + i).value) - eval(thisstart) + 4)));
//alert('am here 2 isendof=' + isendof);
}
} else if (recallurl != '' && ieo && document.getElementById('j' + i).value != '0') {
ieo=false;
lhchk(' ');
setTimeout(function(){ document.title=document.getElementById('myh1').innerHTML; }, 2000);
setTimeout(function(){
if (comingurl == '') {
if (!document.getElementById('loopchk')) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl;
}
} else if (document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl.replace('loop=n','loop=y').replace(encodeURIComponent('loop=n'),encodeURIComponent('loop=y'));
}
} else if (!document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl.replace('loop=y','loop=n').replace(encodeURIComponent('loop=y'),encodeURIComponent('loop=n'));
}
}
}
}, eval(1000 * eval(eval(document.getElementById('j' + i).value) - eval(thisstart) + 4)));
//alert('am here 22 isendof=' + isendof);
}
} else if (recallurl != '' && ieo && document.getElementById('j' + i).value != '0') {
ieo=false;
lhchk(' ');
setTimeout(function(){ document.title=document.getElementById('myh1').innerHTML; }, 2000);
setTimeout(function(){
if (comingurl == '') {
if (!document.getElementById('loopchk')) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl;
}
} else if (document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl.replace('loop=n','loop=y').replace(encodeURIComponent('loop=n'),encodeURIComponent('loop=y'));
}
} else if (!document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('startagain');
} else {
location.href=recallurl.replace('loop=y','loop=n').replace(encodeURIComponent('loop=y'),encodeURIComponent('loop=n'));
}
}
}
}, eval(1000 * eval(eval(document.getElementById('j' + i).value) - eval(thisstart) + 4)));
//alert('am here 222 isendof=' + isendof);
}
}
if (huhaudiow) document.title+=" well now thisstart=" + thisstart + " and lastfinish=" + lastfinish + " and thisd=" + thisd;
if (eval(lastfinish) >= 0.0) {
//if (Math.round(eval(lastfinish)) < Math.round(eval(thisstart))) {
if ((eval(0.3 + lastfinish)) < (eval(thisstart))) {
if (huhaudiow) document.title+=" gap detected ";
if (document.getElementById('conduit').value.indexOf('-') != -1 || eval(1.0 + eval(document.getElementById('conduit').value)) > eval(lastfinish)) {
//alert(thisstart + ' ... ' + lastfinish);
more=true;
if (audiof != '') {
if (audiof.indexOf('file') == 0) {
document.getElementById('areyousinging').innerHTML='<h1>Are you hearing your singing, by double clicking it in Finder or Windows Explorer etcetera, recorded in ' + audiof + ' along with ' + document.getElementById('myh1').innerHTML + ' yet?</h1>';
} else {
document.getElementById('areyousinging').innerHTML='<h1>Are you hearing your singing recorded in ' + audiof + ' along with ' + document.getElementById('myh1').innerHTML + ' yet?</h1>';
}
//closeaudio();
//alert(audiof);
if (1 == 10) {
if (document.getElementById('audiofiles').innerHTML == '') {
document.getElementById('audiofiles').innerHTML="<iframe id=audioif src='//www.rjmprogramming.com.au/HTMLCSS/legend_via_map.php?url=" + encodeURIComponent(audiof) + "' title='Audio'></iframe>";
} else {
document.getElementById('audioif').src="//www.rjmprogramming.com.au/HTMLCSS/legend_via_map.php?url=" + encodeURIComponent(audiof);
}
//audiow=new Audio();
//audiow.src=audiof;
//audiow.autoplay=true;
//audiow.play();
} else {
if (audiof.indexOf('file') != 0) {
if (audiof.indexOf('.wav') != -1) {
audiow=window.open(audiof, '_blank', 'top=60,left=0,width=240,height=80');
} else {
audiow=window.open(audiof, '_blank', 'top=100,left=0,width=420,height=590');
}
}
if (document.URL.indexOf('debug=') != -1) huhaudiow=true;
if (dorecord) setTimeout(closeaudio, Math.min(25000, eval(1000 * eval(eval(thisstart) + 5 - eval(lastfinish)))));
}
if (huhaudiow) document.title+=" h:setTimeout(queuenext, eval(1000 * eval(eval(thisstart) - eval(lastfinish)))); via thisstart=" + thisstart + " and lastfinish=" + lastfinish;
setTimeout(function(){ alert('here' + nextismedia); isendof=ieo; queuenext(); }, eval(1000 * eval(eval(thisstart) - eval(lastfinish))));
next++;
} else if (dorecord) {
document.getElementById('areyousinging').innerHTML='<h1>Are you recording your singing along with ' + document.getElementById('myh1').innerHTML + ' yet?</h1>';
audioask=true;
closeaudio();
if (1 == 6 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
audiow=window.open('https://www.rjmprogramming.com.au/HTMLCSS/audio_capture.html', '_blank', 'top=300,left=0,width=900,height=300');
} else {
audiow=window.open('https://online-voice-recorder.com/#google_vignette', '_blank', 'top=300,left=0,width=900,height=300');
}
if (document.URL.indexOf('debug=') != -1) huhaudiow=true;
document.title+=" a:setTimeout(queuenext, eval(1000 * eval(eval(thisstart) - eval(lastfinish)))); b:setTimeout(closeaudio, Math.min(25000, eval(1000 * eval(eval(thisstart) + 5 - eval(lastfinish))))); ";
setTimeout(function(){ alert('there' + nextismedia); isendof=ieo; queuenext(); }, eval(1000 * eval(eval(thisstart) - eval(lastfinish))));
setTimeout(closeaudio, Math.min(25000, eval(1000 * eval(eval(thisstart) + 5 - eval(lastfinish)))));
} else {
document.getElementById('areyousinging').innerHTML='<h1>Are you singing along with ' + document.getElementById('myh1').innerHTML + ' yet?</h1>';
if (huhaudiow) document.title+=" c:setTimeout(queuenext, eval(1000 * eval(eval(thisstart) - eval(lastfinish)))); ";
setTimeout(function(){ alert('where' + nextismedia); isendof=ieo; queuenext(); }, eval(1000 * eval(eval(thisstart) - eval(lastfinish))));
}
lastfinish=thisstart;
if (audiof != '') ioffset=-1;
if (audiof == '') ioffset=0;
return;
} else {
if (huhaudiow) document.title+=" j:setTimeout(queuenext, 1000); ";
setTimeout(function(){ alert('Where' + nextismedia); isendof=false; queuenext(); }, 1000);
return;
}
}
}
lastfinish=eval(document.getElementById('j' + i).value);
if (('' + document.URL + 'ss').replace('%23http','#http').indexOf('#httpss') != -1) { comingurl=''; }
if (eval('' + document.getElementById('i' + i).value.length) > 11 && document.getElementById('i' + i).value.indexOf(';') == -1 && comingurl != '') {
setTimeout(function(){
var lastcl='';
if (document.getElementById('shufflechk')) {
if (document.getElementById('shufflechk').checked) {
lastcl=encodeURIComponent('&shuffle=y');
if (ismobileplaylist) {
comingurl=comingurl.split(encodeURIComponent('&shuffle'))[0];
} else if (comingurl == '') {
comingurl=mixitup(document.URL.split(encodeURIComponent('&shuffle'))[0], false);
} else {
comingurl=mixitup(comingurl.split(encodeURIComponent('&shuffle'))[0], false);
}
} else if (('' + document.URL + 'ss').indexOf('#httpss') == -1) {
lastcl=encodeURIComponent('&shuffle=n');
comingurl=comingurl.split(encodeURIComponent('&shuffle'))[0];
}
} else if (('' + document.URL + 'ss').indexOf('#httpss') == -1) {
lastcl=encodeURIComponent('&shuffle=n');
comingurl=comingurl.split(encodeURIComponent('&shuffle'))[0];
}
if (!document.getElementById('loopchk')) {
if (ismobileplaylist) {
setcue('y');
} else if (('' + document.URL + 'ss').replace('%23http','#http').indexOf('#httpss') == -1) {
//alert('3:' + lastcl + ' ... ' + ('' + document.URL + 'ss').slice(-93));
location.href=comingurl + lastcl;
}
} else if (document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('y');
} else if (('' + document.URL + 'ss').replace('%23http','#http').indexOf('#httpss') == -1) {
//alert('4:' + comingurl + lastcl);
location.href=comingurl.replace('loop=n','loop=y').replace(encodeURIComponent('loop=n'),encodeURIComponent('loop=y')) + lastcl;
}
} else if (!document.getElementById('loopchk').checked) {
if (ismobileplaylist) {
setcue('y');
} else if (('' + document.URL + 'ss').replace('%23http','#http').indexOf('#httpss') == -1) {
//alert('5:' + comingurl + lastcl);
location.href=comingurl.replace('loop=y','loop=n').replace(encodeURIComponent('loop=y'),encodeURIComponent('loop=n')) + lastcl;
}
}
}, 8000);
}
var wasisendof=isendof;
isendof=false;
var wqe=neweval(document.getElementById('i' + i).value);
isendof=wasisendof;
thisd = eval(eval(document.getElementById('j' + i).value) - eval('' + ('' + wqe).split(';')[0].split(encodeURIComponent(';'))[0]));
document.getElementById('xx' + i).style.backgroundColor='lightgreen';
xnextwoin='' + i;
//alert('xx' + i);
ndt=new Date();
//document.getElementById('myiframe').src="stop_start_youtube.html?vid=" + ourvid + "&playtime=" + thisd + "&start=" + wqe + '&ct=' + encodeURIComponent(ndt.toUTCString());
if (huhaudiow) document.title+=" and now thisstart=" + thisstart + " and lastfinish=" + lastfinish + " and thisd=" + thisd;
//thisd = eval(eval(document.getElementById('j' + i).value) - eval(document.getElementById('i' + i).value.split(';')[0]));
//alert(thisd);
if (huhaudiow) document.title+=" now thisstart=" + thisstart + " and lastfinish=" + lastfinish + " and thisd=" + thisd;
document.getElementById('xx' + i).style.backgroundColor='lightgreen';
xnextwoin='' + i;
//alert('xx' + i);
//var ndt=new Date();
//if (onestodo.length > 1) alert('HEREsz');
//alert("onestodosuffiX=" + onestodosuffix);
if (document.getElementById('youtube_duration').value.indexOf('22223.') == -1) {
//console.warn('here at 13 ?vid=' + ourvid + "&playtime=" + thisd + "&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix));
//document.getElementById('myiframe').src="stop_start_youtube.html?vid=" + ourvid + "&playtime=" + thisd + "&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea;
if (wascomingurl == '') {
if (!ismobileplaylist) {
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title).indexOf('No more') != 0) {
//if (document.URL.replace(/\%23http$/g,'#http').replace(/\#http$/g,'') == document.URL || thonce) {
thone=false;
//if (ourvid != 'cannotenda2') {
console.warn('here at 13 ' + ('' + new Date()) + ' ' + document.getElementById('myiframe').title + ' ?vid=' + ourvid + "&playtime=" + thisd + "&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix));
document.getElementById('myiframe').src="stop_start_youtube.html?vid=" + ourvid + "&playtime=" + thisd + "&start=" + ('' + wqe).split(';')[0].split(encodeURIComponent(';'))[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea;
//}
//}
}
}
}
}
} else {
//document.getElementById('myiframe').src="stop_start_youtube.html?vid=" + ourvid + "&but=y&playtime=" + thisd + "&start=" + document.getElementById('i' + i).value.split(';')[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + hashidea;
if (wascomingurl == '') {
if (!ismobileplaylist) {
if (document.getElementById('myiframe')) {
if (('' + document.getElementById('myiframe').title) != 'No more') {
document.getElementById('myiframe').src="stop_start_youtube.html?vid=" + ourvid + "&but=y&playtime=" + thisd + "&start=" + ('' + wqe).split(';')[0].split(encodeURIComponent(';'))[0] + '&ct=' + encodeURIComponent(ndt.toUTCString()) + onestodoprefix + encodeURIComponent(onestodosuffix) + passthislhon + hashidea;
}
}
}
}
}
if (huhaudiow) document.title+=" " + document.getElementById('myiframe').src + " ";
//alert(" " + document.getElementById('myiframe').src + " ");
next++;
more=true;
if (3 == 3) {
document.getElementById('conduit').value='0';
nextdelay=eval(1000 * thisd);
xqn();
} else {
if (huhaudiow) document.title+=" f:setTimeout(queuenext, eval(1000 * thisd)); ";
setTimeout(function(){ alert('vhere' + nextismedia); isendof=ieo; queuenext(); }, eval(1000 * thisd));
}
}
}
}
}
if (audiof != '') ioffset=-1;
if (audiof == '') ioffset=0;
if (!more) next=0;
if (!somethingtodo && audiow != null) closeaudio();
}
function recif(iois) {
var oktoaize=true;
if (iois) {
if (iois != null) {
espo = (iois.contentWindow || iois.contentDocument);
if (espo != null) {
espw=espo;
if (espo.document) { espo = espo.document; }
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
var elev='';
//if (document.URL.indexOf('c0=on') != -1) {
// alert(document.URL);
//}
if (document.URL.indexOf('c0=on') != -1 && document.URL.indexOf('youtubeid=') != -1 && document.URL.indexOf('youtubeid=&') == -1 && document.URL.indexOf('youtube_duration=') != -1 && document.URL.indexOf('youtube_duration=&') == -1) {
elev=document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0];
maxva=document.URL.split('youtube_duration=')[1].split('&')[0].split('#')[0];
//alert(elev);
//setTimeout(function(){
//alert(elev);
//alert(parent.body.innerHTML.split('youtubeid=' + elev + '&')[0].slice(-200));
relifid=('' + parent.getlastrelifid()); //parent.body.innerHTML.split('youtubeid=' + elev + '&')[0].split('<iframe')[eval(-1 + parent.body.innerHTML.split('youtubeid=' + elev + '&')[0].split('<iframe').length)].split(' id="')[1].split('"')[0];
//alert(elev);
sumo=parent.document.getElementById(relifid.replace('if','sum'));
//alert(maxva);
if (sumo) {
//alert(relifid);
if (sumo.innerHTML.indexOf('<progress') == -1) {
if (sumo.innerHTML.indexOf('<span ') != -1) {
sumo.innerHTML=sumo.innerHTML.replace('<span ', '<span title="" id=progress' + elev + ' ');
}
sumo.innerHTML+=' <progress title="" value=0 min=0 max=' + maxva + ' id=progress_' + elev + '></progress>';
//alert(sumo.innerHTML);
} else if (parent.document.getElementById('progress_' + elev)) {
parent.document.getElementById('progress_' + elev).max=maxva;
parent.document.getElementById('progress_' + elev).value=0;
}
}
//}, 6000);
}
if (top.document.title.indexOf(' justaudio ') == -1) {
oktoaize=false;
//alert('671 ' + iois.style.marginTop);
if (('' + iois.style.marginTop).indexOf('-340px') != -1) {
//alert(67);
iois.style.marginTop='0px';
iois.style.filter="";
oktoaize=false;
}
} else if (bsuffis == '') {
bsuffis=' ';
//alert('2671 ' + iois.style.marginTop);
if (('' + iois.style.marginTop).indexOf('-340px') != -1) {
//alert(267);
iois.style.marginTop='0px';
iois.style.filter="";
oktoaize=false;
}
}
}
}
if (('' + top.document.URL).indexOf('justaudio=') != -1) {
iois.style.marginTop='-340px';
iois.style.filter="invert(45%)";
}
if (bsuffis != '' && oktoaize) {
if (('' + top.document.URL).indexOf('justaudio=') != -1 || (('' + top.document.URL).indexOf('isradio=') != -1 && ('' + top.document.URL).indexOf('audioyoutube=') != -1)) {
setTimeout(function(){
parent.document.getElementById('' + iois.id).style.marginTop='-340px';
parent.document.getElementById('' + iois.id).style.filter="invert(45%)";
}, 30000);
} else {
iois.style.marginTop='-340px';
iois.style.filter="invert(45%)";
}
}
}
}
}
}
function ouriframe(ift) {
if (!doemj) {
return ift;
}
emojistuff();
//return '<table style="text-align:center;width:100%;"><tbody style="text-align:center;width:100%"><tr><td>' + ift + '</td><td style="vertical-align:top;">' + document.getElementById('dkaraoke').outerHTML.replace(' style="',' style="margin-top:-600px;').replace('background-color:','margin-top:-600px;background-color:').replace(' value=',' value=\"🎮 Play as below\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '<br>' + document.getElementById('dkaraokem').outerHTML.replace(' style="',' style="margin-top:-600px;').replace('background-color:','margin-top:-600px;background-color:').replace(' value=', ' value=\"📼 ⏸ > 0 cell\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '<br>' + '<br>' + document.getElementById('dkaraoker').outerHTML.replace(' style="',' style="margin-top:-600px;').replace('background-color:','margin-top:-600px;background-color:').replace(' value=', ' value=\"📼 ⏸ < \" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '<br>' + document.getElementById('karaoke').outerHTML.replace(' style="',' style="margin-top:-600px;').replace(' value=',' value=\"🎮 Play as below\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '<br>' + document.getElementById('ddkaraoke').outerHTML.replace(/margin-top/g,'column-gap').replace(' style="',' style="margin-top:-600px;').replace(/<input /g,'<input class=emoji ').replace(' value=',' VALUE=\"🔂 Replay as above\" title=').replace(' value=',' VALUE=\"📧 Share Email to \" title=').replace(/karaoke/g, emojisuffix + "karaoke") + '</td></tr></tbody></table>';
if (1 == 2 && otheriframeoh != '') {
window.open(otheriframeoh.split('src=')[1].split(' ')[0].split('>')[0],'_blank','top=100,left=700,width=500,height=500');
otheriframeoh='';
}
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
return ('<table style="' + defidea + '"><tbody style="' + defidea + '"><tr><td style="vertical-align:top;">' + ift.replace('<iframe ','<iframe onload=recif(this); ') + '</td><td style="vertical-align:top;height:1200px;overflow-Y:scroll;"><div' + dotherurl + ' id=dotherurl' + ('>' + otheriframeoh + ' ').replace('> ','>').replace('><',' style="vertical-align:top;margin-top:-290px;margin-left:-120px;width:900px;overflow:scroll;"><') + '</div>' + '' + document.getElementById('ddkaraoke').outerHTML.replace(/margin-top/g,'column-gap').replace(/<input /g,'<input class=emoji ').replace(' value=',' VALUE=\"🔂 Replay as above\" title=').replace(' value=',' VALUE=\"📧 Share Email to \" title=').replace(/karaoke/g, emojisuffix + "karaoke") + document.getElementById('dkaraoke').outerHTML.replace(' value=',' value=\"🎮 Play as below\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + audiobut + '<br>' + document.getElementById('dkaraokem').outerHTML.replace(' value=', ' value=\"📼 ⏸ > 0 cell\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '' + document.getElementById('dkaraoker').outerHTML.replace(' value=', ' value=\"📼 ⏸ < \" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '<br>' + document.getElementById('karaoke').outerHTML.replace(' value=',' value=\"🎮 Play as below\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '</td></tr></tbody></table>').replace(/\&\;/g,'&');
}
//alert(parent.ajaxsih);
}
return ('<table style="' + defidea + '" id=tlhoster><tbody style="' + defidea + '" id=tbhoster><tr id=trhoster><td style="vertical-align:top;" id=tdhoster>' + ift + '</td><td style="vertical-align:top;height:1200px;overflow-Y:scroll;"><div id=dotherurl' + ('>' + otheriframeoh + ' ').replace('> ','>').replace('><',' style="vertical-align:top;margin-top:-290px;margin-left:-120px;width:900px;overflow:scroll;"><') + '</div>' + '' + document.getElementById('ddkaraoke').outerHTML.replace(/margin-top/g,'column-gap').replace(/<input /g,'<input class=emoji ').replace(' value=',' VALUE=\"🔂 Replay as above\" title=').replace(' value=',' VALUE=\"📧 Share Email to \" title=').replace(/karaoke/g, emojisuffix + "karaoke") + document.getElementById('dkaraoke').outerHTML.replace(' value=',' value=\"🎮 Play as below\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + audiobut + '<br>' + document.getElementById('dkaraokem').outerHTML.replace(' value=', ' value=\"📼 ⏸ > 0 cell\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '' + document.getElementById('dkaraoker').outerHTML.replace(' value=', ' value=\"📼 ⏸ < \" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '<br>' + document.getElementById('karaoke').outerHTML.replace(' value=',' value=\"🎮 Play as below\" title=').replace('<input ','<input class=emoji ').replace(/karaoke/g, emojisuffix + "karaoke") + '</td></tr></tbody></table>').replace(/\&\;/g,'&');
}
function emojistuff() {
document.getElementById('pretrbutton').style.display='none';
document.getElementById('trbutton').style.visibility='hidden';
document.getElementById('trrhead').style.display='table-row';
document.getElementById('ddkaraoke').style.visibility='hidden';
document.getElementById('dkaraoke').style.visibility='hidden';
document.getElementById('dkaraokem').style.visibility='hidden';
document.getElementById('dkaraoker').style.visibility='hidden';
document.getElementById('karaoke').style.visibility='hidden';
}
function xqn() {
if (document.getElementById('conduit').value.indexOf('-') != -1 || eval(1.0 + eval(document.getElementById('conduit').value)) > eval(lastfinish)) {
nextdelay=-1;
queuenext();
} else if (eval(nextdelay) > 200) {
nextdelay-=500;
setTimeout(xqn, 200);
} else {
nextdelay=-1;
queuenext();
}
}
function showd() {
if (!document.getElementById('youtube_duration')) {
setTimeout(showd, 200);
} else {
if (document.getElementById('youtube_duration').value == '') {
if ((location.search.split('youtube_duration=')[1] ? decodeURIComponent(location.search.split('youtube_duration=')[1].split('&')[0]) : '') != "") {
document.getElementById('youtube_duration').value=(location.search.split('youtube_duration=')[1] ? decodeURIComponent(location.search.split('youtube_duration=')[1].split('&')[0]) : '');
firstprefix=""; //"#";
}
}
if (document.getElementById('youtube_duration').value == '') {
setTimeout(showd, 200);
} else {
if (document.getElementById('youtube_duration').value.indexOf('.') == -1) {
if (document.getElementById('youtube_duration').value.indexOf('NaN') != -1) {
postputy(document.getElementById('ajaxs'), false);
//alert(bigdocbod);
}
document.getElementById('youtube_duration').value+='.0';
} else {
var xqw=document.getElementById('youtube_duration').value.split('.');
if (xqw[1].length > 3) {
document.getElementById('youtube_duration').value=xqw[0] + '.' + xqw[1].substring(0,3);
}
}
document.getElementById('myspan').style.visibility='visible';
addrow();
if (document.URL.indexOf('i0=') == -1) {
document.getElementById('mousei').style.visibility='visible';
document.getElementById('mousej').value=document.getElementById('mousej').value.replace(document.getElementById('youtube_duration').value + ' cell','') + eval('' + document.getElementById('youtube_duration').value).toFixed(2) + ' cell';
document.getElementById('mousej').style.visibility='visible';
}
}
}
}
function checkemailbits() {
document.getElementById('to').value=(location.search.split('email=')[1] ? decodeURIComponent(location.search.split('email=')[1].split('&')[0]) : '');
document.getElementById('karaokeemail').value=document.getElementById('to').value;
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
}
function playrandom() {
var choices=['_','-'];
sstr='v=';
for (var lp=0; lp<=9; lp++) choices.push('' + lp);
for (var clp='a'.charCodeAt(0); clp<='z'.charCodeAt(0); clp++) choices.push(String.fromCharCode(eval('' + clp)));
for (var clp='A'.charCodeAt(0); clp<='Z'.charCodeAt(0); clp++) choices.push(String.fromCharCode(eval('' + clp)));
document.getElementById('myform').innerHTML+='<input type=hidden name=random id=random value=></input>';
// More to do
for (var iwq=0; iwq<3; iwq++) sstr+=choices[Math.floor(Math.random() * eval(0 + choices.length))];
allowable=true;
getytlist(sstr, true);
}
function addrecline(intd) {
if (!pgive && document.getElementById('myvtable')) {
document.getElementById('myvtable').innerHTML=document.getElementById('myvtable').innerHTML.replace('<td id="td' + intd + '">','</tr><tr><td id="td' + intd + '">');
location.href='#td' + intd;
}
}
function totopjfsa() {
jfsa++;
if (jfsa > ifsa.length) { jfsa=1; }
for (var kfsa=1; kfsa<=ifsa.length; kfsa++) {
ifsa[eval(-1 + kfsa)].style.zIndex='' + Math.floor(Math.random() * 12);
document.getElementById('seltd' + kfsa).value='td' + jfsa;
document.getElementById('seltd' + kfsa).title=document.getElementById('seltd' + kfsa).innerHTML.replace(/\"/g,'').replace(/\'/g,'').split(' value=td' + jfsa + '>')[1].split('<')[0];
}
ifsa[eval(-1 + jfsa)].style.zIndex='19';
document.getElementById('topselbod').value='td' + jfsa;
document.getElementById('topselbod').title=document.getElementById('topselbod').innerHTML.replace(/\"/g,'').replace(/\'/g,'').split(' value=td' + jfsa + '>')[1].split('<')[0];
setTimeout(totopjfsa, 20000);
}
function aut() {
ifsa=document.getElementsByTagName('iframe');
//var iofftop=offtop.split(',');
for (var iaut=0; iaut<ifsa.length; iaut++) {
ifsa[iaut].style.zIndex='9';
ifsa[iaut].style.position='absolute';
ifsa[iaut].style.opacity=eval(1.0 / ifsa.length);
if (iofftop.length > iaut) {
if (iofftop[iaut] != '') {
ifsa[iaut].style.top='' + eval(eval('' + iofftop[iaut]) + 50) + 'px';
} else {
ifsa[iaut].style.top='50px';
}
} else {
ifsa[iaut].style.top='50px';
}
ifsa[iaut].style.left='0px';
}
if (pgive) { setTimeout(totopjfsa, 5000); }
}
function ifmyh1(iois, numifis) {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
if (iois.src.indexOf('&rnd=') != -1) {
if (pgive) { setTimeout(aut,2000); }
//alert('itt(czzyes)=' + itt(czzyes) + ' iois.src=' + iois.src);
if (itt(czzyes) != '' && iois.src.indexOf('&rnd=0') == -1) {
document.body.style.cursor='progress';
setTimeout(cejy, eval(eval(itt(czzyes)) * 1000));
}
}
iofftop.push(0);
var xrect=aconto.getElementById('youtubeid').getBoundingClientRect();
//top.document.title+=' [' + numifis + ']=' + aconto.body.innerHTML + ' ' + xrect.top + ' ';
iofftop[numifis]=eval(39 - eval('' + iois.title));
}
}
}
}
function dolc() {
//alert(lastconto[eval(-1 + lastconto.length)].body.innerHTML.split('Optionally chose ')[1]);
//if (lastconto[eval(-1 + lastconto.length)].getElementById('ajaxs')) {
//alert(11);
// alert(lastconto[eval(-1 + lastconto.length)].getElementById('ajaxs').innerHTML);
//alert(111);
//}
//alert(1111);
}
function ifchild(iois) {
if (iois != null) {
var aconto = (iois.contentWindow || iois.contentDocument);
if (aconto != null) {
if (aconto.document) { aconto = aconto.document; }
if (aconto.body != null) {
lastconto.push(aconto);
setTimeout(dolc, 2000);
}
}
}
}
function helpoutparent() {
ourvid=ourvids[0];
for (var iyt=1; iyt<ourvids.length; iyt++) {
document.getElementById('divh1s').innerHTML+='<iframe onload="ifchild(this);" src="' + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '?vid=%20%20%20%20%20%20%20%20%20%20%20%20' + encodeURIComponent(ourvids[iyt]) + '&pvostid=y' + '"></iframe>';
}
}
function pgiveit(yidis) {
if (lastwo != '<iframe style="position:absolute;top:100px;left:710px;" width="560" height="315" src="https://www.youtube.com/embed/' + yidis + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>') {
lastwo='<iframe style="position:absolute;top:100px;left:710px;" width="560" height="315" src="https://www.youtube.com/embed/' + yidis + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
//alert('<iframe style="position:absolute;top:100px;left:710px;" width="560" height="315" src="https://www.youtube.com/embed/' + yidis + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>');
if (woi) {
woi.close();
woi=null;
}
if (1 == 1) {
woi=window.open('https:' + lastwo.split('https:')[1].split('"')[0].replace('/embed/', '/watch?v='),'_blank','top=100,left=710,width=700,height=700');
} else {
woi=window.open('','_blank','top=100,left=710,width=700,height=700');
//document.getElementById('yreal').innerHTML='<iframe style="position:absolute;top:100px;left:710px;" width="560" height="315" src="https://www.youtube.com/embed/' + yidis + '" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
woi.document.write(lastwo);
}
}
}
function consolelog(inm) {
if (window.top) {
if (top.document.getElementById('postlist') && top.document.URL.indexOf('debug=') != -1) {
top.document.getElementById('postlist').style.display='block';
top.document.getElementById('postlist').innerHTML+='<br>' + inm;
} else {
console.log(inm);
}
} else {
console.log(inm);
}
}
function cejy() {
var pask=null;
document.body.style.cursor='pointer';
if (ptddp != '') {
var vid='' + ourvid;
if (('' + typeof window.top.getloopstatus) == 'function') {
consolelog('vid=' + ourvid + ' and looping=' + window.top.getloopstatus() + ' versus waslooping=' + window.top.getwasloopstatus() + ' starting at ' + window.top.getsecs() + ' and listeleven IH=' + top.document.getElementById('listeleven').innerHTML);
}
if (window.top) { // yeh but code
if (top.document.getElementById('listeleven') && eval('' + vid.trim().length) == 11) {
if (top.document.getElementById('listeleven').innerHTML != '') {
//alert(vid + ' *' + top.document.getElementById('listeleven').innerHTML + '*');
if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') != -1) {
if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') < 11) {
if (1 == 11) { // equivalent code below happens at stop_start_youtube.html
if (top.document.getElementById('listeleven').innerHTML.indexOf(' ' + vid + '##') == 0 || top.document.getElementById('listeleven').innerHTML.indexOf(' ' + vid + '##') == 0) {
//if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 0) { // playing
top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.replace(' ',' ').trim();
//} else if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 2) {
// top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.replace(' ',' ').trim();
//}
} else if (top.document.getElementById('listeleven').innerHTML.indexOf(' ' + vid + '##') == 0 || top.document.getElementById('listeleven').innerHTML.indexOf(' ' + vid + '##') == 0) { // paused
//if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 0) {
top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.replace(' ',' ').trim();
//} else if (top.document.getElementById('listeleven').innerHTML.indexOf(vid + '##') == 1) {
// top.document.getElementById('listeleven').innerHTML=' ' + top.document.getElementById('listeleven').innerHTML.replace(' ',' ').trim();
//}
} else if (1 == 11) { // if (event.data == YT.PlayerState.ENDED) {
if (top.document.getElementById('listeleven').innerHTML.indexOf('^') != -1) {
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '^',''); //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
} else {
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '',''); //.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
}
}
}
} else {
var thingos=top.document.getElementById('listeleven').innerHTML.split('^');
if ((top.document.getElementById('listeleven').innerHTML.indexOf(' ') == 0 || top.document.getElementById('listeleven').innerHTML.indexOf(' ') == 0) && eval('' + thingos.length) == 2) { // another ahead paused
if (eval(pausecount % 20) == 0) {
window.top.focus();
pask=prompt('Previous video ' + top.document.getElementById('listeleven').innerHTML.split('##')[1].split('^')[0] + ' is paused. Do you want to leave it that way and proceed attempting to play ' + thingos[1].split('##')[1] + ' now?', 'yes');
}
pausecount++;
if (pask == null) { pask=''; }
if ((pask + ' ').substring(0,1).toLowerCase() != 'y') {
setTimeout(cejy, 2000); // not yet was 3000
return '';
} else {
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '^','').replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
pausecount=0;
}
} else if (top.document.getElementById('listeleven').innerHTML.indexOf(' ') == 0 || top.document.getElementById('listeleven').innerHTML.indexOf(' ') == 0) { // another ahead paused
if (thingos[1].indexOf(' ' + vid) == 0 || thingos[1].indexOf(' ' + vid) == 0 || thingos[1].indexOf(vid) == 0) { // it is one ahead and here we are trying to autostart number 2 video
if (eval(pausecount % 20) == 0) {
window.top.focus();
pask=prompt('Previous video ' + top.document.getElementById('listeleven').innerHTML.split('##')[1].split('^')[0] + ' is on pause. Do you want to leave it that way and proceed attempting to play ' + thingos[1].split('##')[1] + ' now?', 'yes');
}
pausecount++;
if (pask == null) { pask=''; }
if ((pask + ' ').substring(0,1).toLowerCase() != 'y') {
setTimeout(cejy, 2000); // not yet
return '';
} else {
top.document.getElementById('listeleven').innerHTML=top.document.getElementById('listeleven').innerHTML.replace(top.document.getElementById('listeleven').innerHTML.split('^')[0] + '^','').replace(top.document.getElementById('listeleven').innerHTML.split('^')[0],'');
pausecount=0;
}
} else {
setTimeout(cejy, 2000); // not yet
return '';
}
} else if (top.document.getElementById('listeleven').innerHTML.indexOf(' ') == 0 || top.document.getElementById('listeleven').innerHTML.indexOf(' ') == 0) { // another ahead playing
var bypass=false;
consolelog('one ahead playing ' + ('' + typeof window.top.getloopstatus));
if (('' + typeof window.top.getloopstatus) == 'function') {
if (window.top.getloopstatus() == true && window.top.getwasloopstatus() == true && eval('' + window.top.getsecs()) <= 15.0) {
var topifs=top.document.getElementsByTagName('iframe');
for (var itop=0; itop<topifs.length; itop++) {
consolelog('itop=' + itop + ' vid=' + encodeURIComponent(vid.trim()) + ' topifs[itop].src=' + topifs[itop].src);
if (topifs[itop].src.indexOf('=' + encodeURIComponent(vid.trim()) + '&') != -1) {
topifs[itop].src=topifs[itop].src.split('&rnd=')[0] + '&rnd=' + itop + '' + Math.floor(Math.random() * 1237654567);
consolelog('Itop=' + itop + ' Vid=' + encodeURIComponent(vid.trim()) + ' Topifs[itop].src=' + topifs[itop].src);
bypass=true;
}
}
//if (('' + typeof window.top.particularrestart) == 'function') {
// window.top.particularrestart(-1, vid.trim());
// bypass=true;
//}
}
}
if (!bypass) { setTimeout(cejy, 2000); } // not yet
return '';
} else {
setTimeout(cejy, 2000); // not yet
return '';
}
}
}
}
}
}
if (!parent.document.getElementById('dt1')) {
parent.document.getElementById('myh1').style.textAlign='center';
parent.document.getElementById('myh1').style.width='100%';
}
if (!top.document.getElementById('dt1')) {
top.document.getElementById('myh1').style.textAlign='center';
top.document.getElementById('myh1').style.width='100%';
}
if (!parent.document.getElementById('dt1')) {
parent.document.getElementById('myh1').style.marginLeft='' + top.document.getElementById('td' + ptddp).getBoundingClientRect().left + 'px';
}
if (!top.document.getElementById('dt1')) {
top.document.getElementById('myh1').style.marginLeft='' + top.document.getElementById('td' + ptddp).getBoundingClientRect().left + 'px';
top.scrollTo(top.document.getElementById('td' + ptddp).getBoundingClientRect().left, 0);
}
if (1 == 3) { top.document.getElementById('td' + ptddp).onclick=function() { cejy(); }; }
}
if (window.top) {
if (top.document.closelastdet) {
top.document.closelastdet();
} else {
// close 0 ... Open 0 ... open 1
var readie=false;
var dets=top.document.getElementsByTagName('details');
//alert('' + dets.length);
for (var idets=0; idets<dets.length; idets++) {
//alert(('' + dets[idets].getAttribute('open')));
if (('' + dets[idets].getAttribute('open')).replace('undefined','n').replace('null','n') != 'n') {
try {
dets[idets].open=false; //removeAttribute('open');
} catch(cgf) { }
//alert('close ' + idets);
readie=true;
} else if (readie) {
readie=false;
try {
dets[idets].open=true; //setAttribute('open', true);
} catch(cgf) { }
//alert('open ' + idets);
//lastdet=('' + dets[idets].id);
}
if (readie && 1 == 2) {
//lastdet='dt1';
try {
dets[0].open=true; //top.document.getElementById('dt1').open=true; //setAttribute('open', true);
} catch(cgf) { }
//alert('Open 0');
}
}
}
//} else {
// alert('huh');
}
if (document.getElementById('c0')) { document.getElementById('c0').checked=true; }
if (document.getElementById('ejkaraoke')) { document.getElementById('ejkaraoke').click(); }
}
function redi() {
if (document.getElementById('youtubeid')) {
document.getElementById('youtubeid').style.width='120px';
document.getElementById('youtube_duration').style.width='60px';
}
}
function itt(incz) {
if (window.top) {
if (top.document.title.indexOf(' ') != -1 || ('' + top.tdt).indexOf(' ') != -1) { setTimeout(redi, 2000); if (tdt.indexOf(' ') != -1) { return '1'; } }
}
return incz;
}
function preajaxswatch() {
var tickis=' ' + String.fromCodePoint(10004);
var appis='';
var tcnt=1;
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
rep+=' --- ';
if (document.getElementById('ajaxs') && ourmto) {
rep+=' .-. ';
var sin=document.getElementById('ajaxs');
var lajaxs='', lajaxsd='';
for (var ii=0; ii<sin.options.length; ii++) {
if (sin.options[ii].selected) {
if (sin.options[ii].value != '' && (',' + lastajaxs + ',').indexOf(',' + sin.options[ii].value + ',') != -1) {
lajaxs+=lajaxsd + sin.options[ii].value; lajaxsd=','; tcnt++;
if (sin.options[ii].innerText.indexOf(tickis) == -1) {
sin.options[ii].innerText+=tickis + ' ' + eval(1 + eval('' + (',' + lastajaxs).split(', ' + sin.options[ii].value)[0].substring(1).split(',').length));
}
}
}
}
for (var iii=0; iii<sin.options.length; iii++) {
if (sin.options[iii].selected) {
if (sin.options[iii].value != '' && (',' + lastajaxs + ',').indexOf(',' + sin.options[iii].value + ',') == -1) {
appis+=lajaxsd + sin.options[iii].value;
lajaxs+=lajaxsd + sin.options[iii].value;
lajaxsd=',';
if (sin.options[iii].innerText.indexOf(tickis) == -1) {
sin.options[iii].innerText+=tickis + ' ' + tcnt;
}
tcnt++;
}
}
}
if (lajaxs != '' && lajaxs != lastajaxs && (eval('' + lajaxs.split(',').length) != eval('' + lastajaxs.split(',').length) || eval('' + lajaxs.length) != eval('' + lastajaxs.length))) {
//if (lajaxs.indexOf(',') != -1) { document.getElementById('myh1').innerHTML+=(rep + ' 2:' + lajaxs); }
if (appis != '') {
lastajaxs+=appis;
} else {
lastajaxs=lajaxs;
}
rep+=(' 2:' + lastajaxs);
ajaxclist=lastajaxs;
ajaxoncnt=eval('' + ajaxclist.split(',').length);
ajaxf='';
}
}
}
}
function bev(evt) {
if (document.getElementById('ajaxs') && ourmto) {
var rects=document.getElementById('ajaxs').getBoundingClientRect();
if (evt.clientX) {
if (eval('' + evt.clientX) >= eval('' + rects.left) && eval('' + evt.clientX) <= eval('' + rects.right)) {
bx.push(evt.clientX);
by.push(evt.clientY);
//document.getElemenyById('myh1').innerHTML+=(' Yes');
//} else {
//alert(0);
}
} else if (!evt.touches) {
if (eval('' + evt.pageX) >= eval('' + rects.left) && eval('' + evt.pageX) <= eval('' + rects.right)) {
bx.push(evt.pageX);
by.push(evt.pageX);
//alert('YeS');
//} else {
//alert(9);
}
} else {
if (eval('' + evt.touches[0].clientX) >= eval('' + rects.left) && eval('' + evt.touches[0].clientX) <= eval('' + rects.right)) {
bx.push(evt.touches[0].clientX);
by.push(evt.touches[0].clientY);
//alert('yes');
//} else {
//alert(19);
}
}
}
}
function getCourmto() {
return '' + courmto;
}
function andlt() {
if (document.getElementById('ajaxs')) {
document.getElementById('ajaxs').style.width='80%';
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
document.getElementById('ajaxs').style.top='52px';
}
}
}
if (document.getElementById('cajaxs')) {
if (courmto.length != 0) { document.getElementById('cajaxs').checked=true; } else if (window.top) { if (top.document.getCourmto) { if (top.document.getCourmto().length != 0) { document.getElementById('cajaxs').checked=true; } } }
}
}
function dosajaxs(inxc) {
csajaxs=inxc.value;
}
function twog() {
if (document.getElementById('spanner')) {
document.getElementById('spanner').innerHTML=document.getElementById('spanner').innerHTML.replace('>1 x', '>1' + ('<select style=width:50px; onchange="dosajaxs(this);" id=sajaxs><option value="x">x</option><option value="X">🔁 and loop</option></select>').replace(csajaxs + '">', csajaxs + '" selected>'));
}
}
function onexgt() {
if (document.body.innerHTML.indexOf('>' + '1' + 'x') != -1) {
if (document.getElementById('spanner')) {
document.getElementById('spanner').innerHTML=document.getElementById('spanner').innerHTML.replace('>1x', '>1 x'); //'>1' + ('<select style=width:30px; onchange="dosajaxs(this);" id=sajaxs><option value="x">x</option><option value="X"> and loop</option></select>').replace(csajaxs + '">', csajaxs + '" selected>'));
setTimeout(twog, 2000);
}
}
if (!clickcheckdone && document.URL.indexOf('clickcheck=') != -1) {
if (document.getElementById('sajaxs')) {
document.getElementById('sajaxs').title='Radio play playlists possible with checkbox usage ...';
}
if (document.getElementById('cajaxs')) {
if (document.getElementById('sajaxs')) {
document.getElementById('sajaxs').title='Radio play playlists possible with checkbox usage ...';
}
if (!document.getElementById('cajaxs').checked) {
clickcheckdone=true;
andlr(); //document.getElementById('cajaxs').click();
putintotoptitle=document.getElementById('youtubeid').value.trim();
}
}
}
}
function lfajxs() {
if (document.getElementById('ajaxs')) {
document.getElementById('ajaxs').style.zIndex='987';
}
}
function newcheck() {
var postpc='2';
var pc='';
// console.log(dprefix + qsel);
setTimeout(function(){
if (document.getElementById('i0')) {
document.getElementById('i0').placeholder='Can ; separate time to flag Just Audio';
}
}, 4000);
if (document.URL.indexOf('audiocard=') != -1) {
document.getElementById('youtubeid').style.position='absolute';
document.getElementById('youtubeid').style.left='0px';
document.getElementById('youtubeid').style.top='0px';
document.getElementById('youtubeid').style.width='120px';
document.getElementById('youtubeid').style.zIndex='999';
document.getElementById('youtubeid').placeholder='YouTube search ...';
setTimeout(function(){ document.getElementById('youtubeid').focus(); }, 5000);
} //else if (('' + document.referrer).indexOf('audiocard=') != -1) {
//document.getElementById('ajaxs').style.position='absolute';
//document.getElementById('ajaxs').style.left='0px';
//document.getElementById('ajaxs').style.top='0px';
//document.getElementById('ajaxs').style.width='120px';
//document.getElementById('ajaxs').style.zIndex='999';
//}
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
pc='26';
postpc='';
if (top.document.title.indexOf(' background:') != -1) {
document.getElementById('dddstyle').innerHTML+='<style> body { background:' + top.document.title.split(' background:')[1].replace(' !important; background','~ background').split(';')[0].replace('~',' !important;') + '; } </style>';
}
}
}
setTimeout(function(){
if (!document.getElementById('srcif')) {
if (window.parent) {
if (typeof(parent.checkip) == 'function') {
ipbit=parent.checkip(null);
}
}
}
}, 5000);
// ?youtubeid=kUI_P5eMVLo&youtube_duration=&email=&emoji=on
// &justaudio=[a look]
// ejkaraoke
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=++++++++++++Djibouti%2C%20Djibouti&minimize=y&youtube_duration=&email=&emoji=on&ir=140972061
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?youtubeid=kUI_P5eMVLo&youtube_duration=202.221&email=&email=&justaudio=&emoji=on&c0=on&i0=0&j0=202.221&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29=
if ((document.URL + location.hash).indexOf('minimize=Y') != -1) {
if (document.getElementById('ajaxs')) {
//alert(1);
document.getElementById('ajaxs').style.position='absolute';
if (document.getElementById('youtubeid')) {
document.getElementById('ajaxs').style.left='' + eval(-100 + eval('' + document.getElementById('youtubeid').getBoundingClientRect().right)) + 'px';
document.getElementById('ajaxs').style.width='100px';
} else {
document.getElementById('ajaxs').style.left='200px';
document.getElementById('ajaxs').style.width='100px';
}
document.getElementById('ajaxs').style.top='' + pc + postpc + 'px';
} else if (document.getElementById('youtubeid')) {
document.getElementById('youtubeid').style.position='absolute';
document.getElementById('youtubeid').style.left='0px';
document.getElementById('youtubeid').style.top='2px';
document.getElementById('myform').innerHTML+='<input type=hidden value=Y name=minimize></input>';
document.getElementById('myform').onsubmit=" alert(document.getElementById('myform').innerHTML.slice(-160)); return true;";
document.getElementById('myform').target='_self';
setInterval(lfajxs, 1000);
} else if (2 == 1) {
alert(3); // https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?minimize=Y#youtubeid=++++++++++++Djibouti%2C%20Djibouti&youtube_duration=&email=&emoji=on&ir=140972061
}
} else if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
if (1 == 1) {
//alert(4);
if (document.getElementById('ajaxs')) {
//alert(44);
document.getElementById('ajaxs').style.zIndex='987';
document.getElementById('ajaxs').style.left='200px';
document.getElementById('ajaxs').style.width='100px';
} else if (document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') == 0 && ('' + document.getElementById('youtubeid').value.length) == 11) {
if (1 == 2) { alert(444); }
}
return '';
}
document.getElementById('ajaxs').style.zIndex='987';
var icsare=document.getElementsByTagName('input');
for (var jics=0; jics<icsare.length; jics++) {
if (icsare[jics].outerHTML.split('>')[0].indexOf('checkbox') != -1) {
if (!icsare[jics].checked) { icsare[jics].checked=true; }
}
}
}
}
if (('' + top.document.URL).indexOf('justaudio=') != -1 || ((documentURL + asuffis).indexOf('justaudio=&') != -1 && (documentURL.indexOf('youtube_duration=&') == -1 && documentURL.indexOf('youtube_duration=') != -1) && documentURL.indexOf('youtubeid=') != -1 && documentURL.indexOf('emoji=') != -1)) {
if (!document.getElementById('myiframe')) {
setTimeout(newcheck, 5000);
//documentURL='';
} else {
//document.getElementById('myiframe').style.opacity='0.1';
if (('' + top.document.URL).indexOf('justaudio=') != -1 || (('' + top.document.URL).indexOf('isradio=') != -1 && ('' + top.document.URL).indexOf('audioyoutube=') != -1)) {
setTimeout(function(){
document.getElementById('myiframe').style.marginTop='-340px';
document.getElementById('myiframe').style.filter="invert(45%)";
}, 30000);
} else {
document.getElementById('myiframe').style.marginTop='-340px';
document.getElementById('myiframe').style.filter="invert(45%)";
}
if (document.getElementById('c0')) {
document.getElementById('c0').checked=true;
}
}
} else if (((documentURL + asuffis).indexOf('justaudio=&') == -1 && (documentURL + asuffis).indexOf('justaudio=') != -1) && documentURL.indexOf('youtubeid=') != -1 && documentURL.indexOf('emoji=') != -1) {
if (!document.getElementById('ejkaraoke')) {
setTimeout(newcheck, 5000);
documentURL='';
} else {
document.getElementById('ejkaraoke').value=((location.search + asuffis).split('justaudio=')[1] ? decodeURIComponent((location.search + asuffis).split('justaudio=')[1].split('&')[0]) : document.getElementById('ejkaraoke').value);
document.getElementById('ejkaraoke').style.position='fixed';
document.getElementById('ejkaraoke').style.top='0px';
document.getElementById('ejkaraoke').style.left='0px';
if (document.getElementById('c0')) {
document.getElementById('c0').checked=true;
}
}
} else if (((documentURL + asuffis).indexOf('justaudio=&') == -1 && (documentURL + asuffis).indexOf('justaudio=') != -1) && document.URL.indexOf('youtubeid=') != -1 && document.URL.indexOf('emoji=') != -1) {
if (!document.getElementById('ejkaraoke')) {
setTimeout(newcheck, 5000);
} else {
document.getElementById('ejkaraoke').value=((location.search + asuffis).split('justaudio=')[1] ? decodeURIComponent((location.search + asuffis).split('justaudio=')[1].split('&')[0]) : document.getElementById('ejkaraoke').value);
document.getElementById('ejkaraoke').style.position='fixed';
document.getElementById('ejkaraoke').style.top='0px';
document.getElementById('ejkaraoke').style.left='0px';
if (document.getElementById('c0')) {
document.getElementById('c0').checked=true;
}
}
}
if (document.URL.indexOf('minimize=') != -1) {
setInterval(function(){
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
//document.getElementById('ajaxs').style.position='absolute';
//document.getElementById('ajaxs').style.top='0px';
//document.getElementById('ajaxs').style.left='0px';
//document.getElementById('ajaxs').style.zIndex='999';
mintoajax();
//parent.document.getElementsByTagName('h1')[0].innerHTML=parent.document.getElementsByTagName('h1')[0].innerHTML.replace('</select>', '</select><br>');
//setTimeout(function(){ window.top.scrollTo(0,0); }, 2000);
}
}, 8000);
}
}
function honethreebit() {
if (document.getElementById('myh1')) {
if (document.getElementById('myh1').innerHTML.indexOf('Karaoke via ') != 0) {
//alert('here ' + document.URL);
if (window.top) {
if (top.document.URL.indexOf('/esp_ornot_esp.') != -1 || parent.document.URL.indexOf('/esp_ornot_esp.') != -1) {
setTimeout(function(){
var randis=Math.floor(Math.random() * 198786);
var ytvalue=top.document.getElementById('list_eleven').innerHTML;
var ytaot=('' + top.document.getElementById('list_eleven').title);
if (('' + ytaot).trim() != '') {
aotdur=eval('' + ('' + ytaot).trim());
} else if (document.getElementById('youtube_duration') && ('' + document.getElementById('youtube_duration').title.split(':').length) == 3) {
//alert('ytvalue ' + ytvalue);
//alert(document.getElementById('youtube_duration').title);
//alert(document.getElementById('youtube_duration').title.split(':')[1]);
aotdur=eval(eval(eval('' + document.getElementById('youtube_duration').title.split(':')[0]) * 60 * 24) + eval(eval('' + document.getElementById('youtube_duration').title.split(':')[1]) * 60) + eval(eval('' + document.getElementById('youtube_duration').title.split(':')[2]) * 1));
} else {
aotdur=214.0;
}
var wastop=top.document.getElementById('predivsp').innerHTML;
if (wastop.indexOf('>' + ytvalue + '<') == -1 && ytvalue.trim() != '') {
top.document.getElementById('predivsp').innerHTML='<details onclick="document.getElementById(' + String.fromCharCode(39) + 'ifbtobsix' + randis + String.fromCharCode(39) + ').src=document.getElementById(regit(' + String.fromCharCode(39) + 'ifbtobsix' + randis + String.fromCharCode(39) + ')).src.replace(' + String.fromCharCode(39) + 'c0=' + String.fromCharCode(39) + ',' + String.fromCharCode(39) + 'c0=on&rand=' + String.fromCharCode(39) + ');"><summary id=sumbtobsix' + randis + '>' + ytvalue + '</summary><p><iframe data-onclick="event.stopPropagation();" style="width:100%;height:900px;" id="ifbtobsix' + randis + '" onload=" cif(this); if (top.document.URL.indexOf(' + String.fromCharCode(39) + 'showit=' + String.fromCharCode(39) + ') != -1) { document.getElementById(' + String.fromCharCode(39) + 'divsp' + String.fromCharCode(39) + ').style.display=' + String.fromCharCode(39) + 'block' + String.fromCharCode(39) + '; } " src="/HTMLCSS/karaoke_youtube_api.htm?youtubeid=' + ytvalue + '&youtube_duration=' + ('' + aotdur).split('.')[0] + '.000&email=&email=&emoji=on&c0=off&i0=0&j0=' + ('' + aotdur).split('.')[0] + '&i1=&j1=&i2=&j2=&i3=&j3=&i4=&j4=&i5=&j5=&i6=&j6=&i7=&j7=&i8=&j8=&i9=&j9=&i10=&j10=&i11=&j11=&i12=&j12=&i13=&j13=&i14=&j14=&i15=&j15=&i16=&j16=&i17=&j17=&i18=&j18=&i19=&j19=&i20=&j20=&i21=&j21=&i22=&j22=&i23=&j23=&i24=&j24=&i25=&j25=&i26=&j26=&i27=&j27=&i28=&j28=&i29=&j29="></iframe><br></p></details>' + wastop;
top.document.getElementById('karit').src=top.document.getElementById('karit').src.split('rand=')[0] + 'rand=' + Math.floor(Math.random() * 1987865);
top.document.getElementById('tacode').innerHTML=top.document.getElementById('divsp').outerHTML;
}
}, 8000);
return '';
}
}
} else {
setTimeout(honethreebit, 1000);
}
} else {
setTimeout(honethreebit, 1000);
}
}
function getcomingurl() {
return comingurl;
}
function getlooping() {
var retvalb=false;
if (document.getElementById('loopchk')) {
if (document.getElementById('loopchk').checked) {
retvalb=true;
}
}
return retvalb;
}
function getcue() {
return gcue;
}
function setcue(towhat) {
gcue=towhat;
}
function justunsetieo() {
ieo=false;
}
function setieo() {
ieo=true;
}
function unsetieo() {
//alert('Four');
ismobileplaylist=true;
ieo=false;
}
function hoverplaylist(tboxrelo, doprompt) {
var p_ans='', justthelist='';
perused_list='';
Object.keys(window.localStorage).forEach(function(key){
if (('' + key).indexOf('tube') == 0) {
if (perused_list == '') { perused_list=tboxrelo.title.split(String.fromCharCode(10))[0] + String.fromCharCode(10) + ' ( and we found )'; }
justthelist+=' ' + key;
perused_list=perused_list.replace(' )', ' ' + String.fromCharCode(10) + key.replace('tube_','').replace(/\-/g,' ') + String.fromCharCode(10) + ' )');
} else if (('' + key).indexOf('karaoke_youtube_api-') == 0) {
if (perused_list == '') { perused_list=tboxrelo.title.split(String.fromCharCode(10))[0] + String.fromCharCode(10) + ' ( and we found )'; }
justthelist+=' ' + key;
perused_list=perused_list.replace(' )', ' ' + String.fromCharCode(10) + key.replace('karaoke_youtube_api-','').replace(/\-/g,' ') + String.fromCharCode(10) + ' )');
}
});
if (perused_list != '') { if (justthelist != '') { justthelist+=' '; } tboxrelo.title=perused_list; p_ans=null; if (doprompt) { p_ans=prompt(perused_list,justthelist); } if (p_ans != null) { if (p_ans != justthelist && p_ans.trim() != '') { if (document.getElementById('namethechk') && document.URL.replace(/\%23http$/g,'#http').indexOf('#http') != -1 && !document.getElementById('namechk').checked) { document.getElementById('namethechk').value=p_ans; saveplaylist(); } } } }
}
function saveplaylist() {
if (document.getElementById('namechk') && document.getElementById('namethechk') && document.URL.replace(/\%23http$/g,'#http').indexOf('#http') != -1) {
if (!document.getElementById('namechk').checked && document.getElementById('namethechk').value.trim() != '') {
if (document.getElementById('namethechk').value.indexOf('tube_') == 0 || document.getElementById('namethechk').value.indexOf('karaoke_youtube_api-') == 0) {
if (('' + window.localStorage.getItem(document.getElementById('namethechk').value.replace(/\ /g, '-'))).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.open(decodeURIComponent(window.localStorage.getItem(document.getElementById('namethechk').value.replace(/\ /g, '-'))), '_blank', 'top=100,left=100,width=800,height=800');
document.getElementById('namethechk').placeholder=document.getElementById('namethechk').value;
document.getElementById('namethechk').title=document.getElementById('namethechk').title.replace(document.getElementById('namethechk').value, String.fromCharCode(10) + ' and you selected ' + String.fromCharCode(10) + document.getElementById('namethechk').value);
document.getElementById('namethechk').value='';
}
} else if (('' + window.localStorage.getItem('karaoke_youtube_api-' + document.getElementById('namethechk').value.replace(/\ /g, '-'))).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.open(decodeURIComponent(window.localStorage.getItem('karaoke_youtube_api-' + document.getElementById('namethechk').value.replace(/\ /g, '-'))), '_blank', 'top=100,left=100,width=800,height=800');
document.getElementById('namethechk').placeholder=document.getElementById('namethechk').value;
document.getElementById('namethechk').title=document.getElementById('namethechk').title.replace(document.getElementById('namethechk').value, String.fromCharCode(10) + ' and you selected ' + String.fromCharCode(10) + document.getElementById('namethechk').value);
document.getElementById('namethechk').value='';
} else if (('' + window.localStorage.getItem('tube_' + document.getElementById('namethechk').value.replace(/\ /g, '-'))).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.open(decodeURIComponent(window.localStorage.getItem('tube_' + document.getElementById('namethechk').value.replace(/\ /g, '-'))), '_blank', 'top=100,left=100,width=800,height=800');
document.getElementById('namethechk').placeholder=document.getElementById('namethechk').value;
document.getElementById('namethechk').title=document.getElementById('namethechk').title.replace(document.getElementById('namethechk').value, String.fromCharCode(10) + ' and you selected ' + String.fromCharCode(10) + document.getElementById('namethechk').value);
document.getElementById('namethechk').value='';
}
} else if (document.getElementById('namechk').checked && document.getElementById('namethechk').value.trim() != '') {
if (('' + window.localStorage.getItem('karaoke_youtube_api-' + document.getElementById('namethechk').value.replace(/\ /g, '-'))).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.localStorage.removeItem('karaoke_youtube_api-' + document.getElementById('namethechk').value.replace(/\ /g, '-'));
}
if (('' + window.localStorage.getItem('tube_' + document.getElementById('namethechk').value.replace(/\ /g, '-'))).replace(/^null/g,'').replace(/^undefined/g,'') != '') {
window.localStorage.removeItem('tube_' + document.getElementById('namethechk').value.replace(/\ /g, '-'));
}
var wpd='';
if (window.parent) {
if (parent.document.URL.indexOf('/swipe_media.htm') != -1) {
wpd=parent.get_docurl();
if (wpd.indexOf('?') != -1 && wpd.indexOf('regarding=') == -1 && putintotoptitle != '') {
wpd=wpd.replace('?','?regarding=' + encodeURIComponent(putintotoptitle) + '&');
}
}
}
if (wpd != '') {
window.localStorage.setItem('tube_' + document.getElementById('namethechk').value.replace(/\ /g, '-'), encodeURIComponent(decodeURIComponent(wpd)));
} else if (docURL != document.URL || ('' + document.URL + 's').replace(/\#https/g,'') != ('' + document.URL + 's')) {
window.localStorage.setItem('karaoke_youtube_api-' + document.getElementById('namethechk').value.replace(/\ /g, '-'), encodeURIComponent(decodeURIComponent(docURL)));
} else {
window.localStorage.setItem('karaoke_youtube_api-' + document.getElementById('namethechk').value.replace(/\ /g, '-'), encodeURIComponent(decodeURIComponent(document.URL.split('#')[1]).split('&loop=')[0].split('&name=')[0] + '#' + document.URL.split('#')[1]));
}
}
}
}
function lookfornavig() {
setTimeout(lookfornavig, 1000);
var definite='-1';
var keepg=true;
//xnextwoin='999';
var knum=0;
while (document.getElementById('xx' + knum)) {
if (document.getElementById('i' + knum).indexOf(('' + document.getElementById('youtubeid').value)) != -1) {
xnextwoin='' + knum;
definite='' + knum;
}
if (('' + document.getElementById('xx' + knum).style.backgroundColor).indexOf('green') != -1 && eval('' + definite) < 0) {
xnextwoin='' + knum;
}
knum++;
}
//top.document.title='' + xnextwoin + ':' + document.getElementById('xx0').outerHTML.split('>')[0] + ':' + ('' + new Date());
if (window.opener) {
if (window.opener.document.getElementById('navig')) {
keepg=false;
if (window.opener.document.getElementById('navig').value.trim() != '') {
// alert('YEs ' + window.opener.document.getElementById('navig').value);
document.getElementById('c' + xnextwoin).checked=false;
// alert('YEsq ' + window.opener.document.getElementById('navig').value);
if (window.opener.document.getElementById('navig').value.trim() == 'sback') {
} else if (window.opener.document.getElementById('navig').value.trim() == 'snext') {
//player.seekTo(eval(-3 + eval('' + window.opener.document.getElementById('j' + ivid).value)));
// alert('yEsw ' + window.opener.document.getElementById('navig').value);
document.getElementById('c' + xnextwoin).checked=false;
// alert('yEs ' + window.opener.document.getElementById('navig').value);
setTimeout(function(){ document.getElementById('c' + xnextwoin).checked=true; }, 5000);
// alert('YES ' + nextwoin + window.opener.document.getElementById('navig').value);
} else if (window.opener.document.getElementById('navig').value.trim() == 'sfirst') {
} else if (window.opener.document.getElementById('navig').value.trim() == 'slast') {
}
window.opener.document.getElementById('navig').value='';
}
}
}
if (keepg) {
if (parent.document.getElementById('navig')) {
if (parent.document.getElementById('navig').value.trim() != '') {
if (parent.document.getElementById('navig').value.trim() == 'sback') {
} else if (parent.document.getElementById('navig').value.trim() == 'snext') {
//player.seekTo(eval(-3 + eval('' + parent.document.getElementById('j' + ivid).value)));
//alert('aYEsq ' + xnextwoin + ' ' + parent.document.getElementById('navig').value);
//top.document.title='' + xnextwoin + ' ' + ('' + new Date());
if (document.getElementById('c' + xnextwoin)) {
//top.document.title='' + xnextwoin + '/' + ('' + new Date());
document.getElementById('c' + xnextwoin).checked=false;
setTimeout(function(){ document.getElementById('c' + xnextwoin).checked=true; }, 5000);
}
//alert('bYES ' + nextwoin + parent.document.getElementById('navig').value);
} else if (parent.document.getElementById('navig').value.trim() == 'sfirst') {
} else if (parent.document.getElementById('navig').value.trim() == 'slast') {
}
parent.document.getElementById('navig').value='';
}
}
}
}
function moddocurl(fromst, tost) {
docURL=docURL.replace(fromst, tost);
}
function mod_a_docurl(fromst, tost) {
if (window.parent) {
if (('' + typeof window.parent.mod_docurl) == 'function') {
parent.mod_docurl(fromst, tost);
}
}
if (window.opener) {
if (('' + typeof window.opener.mod_docurl) == 'function') {
window.opener.mod_docurl(fromst, tost);
} else if (window.parent) {
if (('' + typeof window.parent.mod_docurl) == 'function') {
parent.mod_docurl(fromst, tost);
}
}
} else if (window.parent) {
parent.mod_docurl(fromst, tost);
}
}
function fixdoc(fixfrom, fixto) {
var ideastodo=['&c?=','&i?=','&j?='], ijh=0, suftitle='';
if (document.getElementById('thft')) {
if (fixfrom.indexOf('=') != -1) {
docURL=docURL.replace(fixfrom, fixto);
document.getElementById('thft').innerHTML=document.getElementById('thft').innerHTML.replace(encodeURIComponent(fixfrom),encodeURIComponent(fixto)).replace(encodeURIComponent(fixfrom),encodeURIComponent(fixto));
} else if (fixto.indexOf('#') != -1) {
//alert('fixfrom,fixto=' + fixfrom + ',' + fixto); // fixfrom,fixto=1,on#0|0Gz_7am23rk#172.10630385487528#Virtual Tour
var thingsz=fixto.split('#');
if (eval('' + thingsz.length) > 3) {
suftitle='#' + fixto.split(thingsz[0] + '#' + thingsz[1] + '#' + thingsz[2] + '#')[1];
}
var idxv=eval('' + fixfrom);
for (ijh=0; ijh<ideastodo.length; ijh++) {
ideastodo[ijh]=ideastodo[ijh].replace('?','' + idxv);
ideastodo[ijh]+=docURL.split(ideastodo[ijh])[1].split('&')[0].split('#')[0];
}
for (ijh=0; ijh<ideastodo.length; ijh++) {
if (ijh == 0) {
docURL=docURL.replace(ideastodo[ijh], ideastodo[ijh].split('=')[0] + '=' + thingsz[ijh]);
if (document.getElementById('thft')) {
document.getElementById('thft').innerHTML=document.getElementById('thft').innerHTML.replace(encodeURIComponent(ideastodo[ijh]), encodeURIComponent(ideastodo[ijh].split('=')[0] + '=' + thingsz[ijh])).replace(encodeURIComponent(ideastodo[ijh]), encodeURIComponent(ideastodo[ijh].split('=')[0] + '=' + thingsz[ijh]));
}
if (('' + thingsz[ijh]) == 'off') {
document.getElementById('c' + idxv).checked=false;
} else {
document.getElementById('c' + idxv).checked=true;
}
} else {
//alert(ideastodo[ijh].split('=')[0].replace(/\&/g,'') + ' = ' + thingsz[ijh] + suftitle);
docURL=docURL.replace(ideastodo[ijh], ideastodo[ijh].split('=')[0] + '=' + encodeURIComponent(thingsz[ijh]));
if (document.getElementById('thft')) {
document.getElementById('thft').innerHTML=document.getElementById('thft').innerHTML.replace(encodeURIComponent(ideastodo[ijh]), encodeURIComponent(ideastodo[ijh].split('=')[0] + '=' + encodeURIComponent(thingsz[ijh])).replace(encodeURIComponent(ideastodo[ijh]), encodeURIComponent(ideastodo[ijh].split('=')[0] + '=' + encodeURIComponent(thingsz[ijh]))));
}
document.getElementById(ideastodo[ijh].split('=')[0].replace(/\&/g,'')).value=thingsz[ijh] + suftitle;
suftitle='';
if (ideastodo[ijh].split('=')[0].indexOf('i') != -1) {
try {
top.mod_docurl(ideastodo[ijh].split('=')[eval(-1 + ideastodo[ijh].split('=').length)], thingsz[ijh].split('|')[eval(-1 + thingsz[ijh].split('|').length)].split('#')[0]);
} catch(trebnvc) {
}
}
}
}
}
}
}
function newpl(insvalo) {
var insval=insvalo.value, forgotthis='', afi=null;
if (insval.trim() != '' && insvalo.options[insvalo.selectedIndex].innerHTML.replace('Forget ... ','').replace('Email or SMS ... ','') != '') {
if (insval.indexOf('x ') == 0) {
forgotthis=insvalo.options[insvalo.selectedIndex].innerHTML.replace('Forget ... ','').replace('Email or SMS ... ','');
window.localStorage.removeItem('karaoke_youtube_api-' + insvalo.options[insvalo.selectedIndex].innerHTML.replace('Forget ... ','').replace('Email or SMS ... ','').replace(/\ /g,'-'));
insvalo.innerHTML=insvalo.innerHTML.replace(forgotthis,'').replace(forgotthis,'').replace(forgotthis,'');
} else if (insval.indexOf('s ') == 0) {
forgotthis=insvalo.options[insvalo.selectedIndex].innerHTML.replace('Forget ... ','').replace('Email or SMS ... ','');
var eors=prompt('Enter an email address or SMS number to send to?', '');
if (eors != null) {
if (eors.indexOf('@') != -1) {
afi=document.createElement('a');
afi.target='_top';
afi.href='mailto:' + eors + '?subject=Playlist%20of%20YouTube%20videos%20we%20have%20called%20' + encodeURIComponent('"' + forgotthis + '"') + '%20...&body=' + insval.substring(2);
document.head.appendChild(afi);
afi.click();
} else if (eors.trim() != '' && eors.replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'').trim() != '') {
afi=document.createElement('a');
afi.target='_top';
afi.href='sms:' + eors + '&body=' + insval.substring(2);
document.head.appendChild(afi);
afi.click();
}
}
} else {
location.href=decodeURIComponent(insval).replace('https:','').replace('http:','');
}
}
}
function playa() {
var thenextdu='', thisduris=0, thenextduris=0, newa=null;
thenextdu='';
if (document.URL.indexOf('&i' + wzero + '=data' + encodeURIComponent(':audio/')) != -1) {
if (document.URL.indexOf('&c' + wzero + '=on') != -1) {
thisduris=eval('' + decodeURIComponent(document.URL.split('&j' + wzero + '=')[1].split('&')[0].split('#')[0]));
newa=document.createElement('audio');
newa.onloadedmetadata=function(event){
event.target.play();
wzero++;
wone++;
setTimeout(playa, eval(1000 * thisduris));
acount++;
}
newa.type='audio/' + decodeURIComponent(document.URL.split('&i' + wzero + '=')[1].split('&')[0].split('#')[0]).split('/')[1].split(',')[0].split(';')[0];
newa.src=decodeURIComponent(document.URL.split('&i' + wzero + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+');
if (document.getElementById('myaudios').innerHTML.indexOf(newa.src) == -1) {
if (document.getElementById('thft').innerHTML == 'Finish') {
if (docURL != document.URL || ('' + document.URL + 's').replace(/\#https/g,'') != ('' + document.URL + 's')) {
document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(docURL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(docURL) + "\" title=SMS>📟</a>";
} else {
document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
}
if (window.opener) {
if (window.opener.document.getElementById('thft').innerHTML == 'Finish') {
window.opener.document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
} else {
if (window.opener.document.getElementById('femailthft')) {
window.opener.document.getElementById('femailthft').href=window.opener.document.getElementById('femailthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
if (window.opener.document.getElementById('fsmsthft')) {
window.opener.document.getElementById('fsmsthft').href=window.opener.document.getElementById('fsmsthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
}
}
}
document.getElementById('myaudios').innerHTML+="<audio onloadedmeta=\"this.setAttribute('data-duration','' + this.duration);\" data-duration=0 controls type=\"" + newa.type + "\" src=\"" + newa.src + "\"></audio><br>";
}
}
} else if (document.URL.indexOf('&i' + wzero + '=data' + encodeURIComponent(':video/')) != -1) {
if (document.URL.indexOf('&c' + wzero + '=on') != -1) {
thisduris=eval('' + decodeURIComponent(document.URL.split('&j' + wzero + '=')[1].split('&')[0].split('#')[0]));
newa=document.createElement('video');
newa.onloadedmetadata=function(event){
event.target.play();
wzero++;
wone++;
setTimeout(playa, eval(1000 * thisduris));
acount++;
}
newa.type='video/' + decodeURIComponent(document.URL.split('&i' + wzero + '=')[1].split('&')[0].split('#')[0]).split('/')[1].split(',')[0].split(';')[0];
newa.src=decodeURIComponent(document.URL.split('&i' + wzero + '=')[1].split('&')[0].split('#')[0]).replace(/\ /g,'+');
if (document.getElementById('myaudios').innerHTML.indexOf(newa.src) == -1) {
if (document.getElementById('thft').innerHTML == 'Finish') {
document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
if (window.opener) {
if (window.opener.document.getElementById('thft').innerHTML == 'Finish') {
window.opener.document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
} else {
if (window.opener.document.getElementById('femailthft')) {
window.opener.document.getElementById('femailthft').href=window.opener.document.getElementById('femailthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
if (window.opener.document.getElementById('fsmsthft')) {
window.opener.document.getElementById('fsmsthft').href=window.opener.document.getElementById('fsmsthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
}
}
}
document.getElementById('myaudios').innerHTML+="<video onloadedmeta=\"this.setAttribute('data-duration','' + this.duration);\" data-duration=0 controls type=\"" + newa.type + "\" src=\"" + newa.src + "\"></video><br>";
}
}
}
}
function playb() {
var thenextdu='', thisduris=0, thenextduris=0, newa=null, vsabcount=0, vsels=[], lvels=[], theabcount=0;
thenextdu='';
if (window.opener && 5 == 6) {
vsels=window.opener.getElementsByTagName('audio');
for (var ivels=0; ivels<vsels.length; ivels++) {
if (('' + vels[ivels].id).indexOf('ab') == 0) {
vsabcount++;
lvels.push(vels[ivels].src.length);
if (document.getElementById('myaudios').innerHTML.indexOf(newa.src) == -1) {
document.getElementById('myaudios').innerHTML+=vels[ivels].vels[ivels].outerHTML + "<br>";
}
wzero++;
}
}
}
if (eval('' + lvels.length) > wzero) {
} else if (document.URL.indexOf(encodeURIComponent('&i' + wzero + '=data' + encodeURIComponent(':audio/'))) != -1) {
if (document.URL.indexOf(encodeURIComponent('&c' + wzero + '=on')) != -1) {
thisduris=eval('' + decodeURIComponent(document.URL.split(encodeURIComponent('&j' + wzero + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]));
newa=document.createElement('audio');
newa.onloadedmetadata=function(event){
event.target.play();
wzero++;
wone++;
setTimeout(playb, eval(1000 * thisduris));
acount++;
}
newa.type='audio/' + decodeURIComponent(document.URL.split(encodeURIComponent('&i' + wzero + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]).split(encodeURIComponent('/'))[1].split(encodeURIComponent(','))[0].split(encodeURIComponent(';'))[0];
newa.src=decodeURIComponent(decodeURIComponent(document.URL.split(encodeURIComponent('&i' + wzero + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0])).replace(/\ /g,'+');
if (document.getElementById('myaudios').innerHTML.indexOf(newa.src) == -1) {
if (document.getElementById('thft').innerHTML == 'Finish') {
document.getElementById('thft').innerHTML="Finish <a target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
if (window.opener) {
if (window.opener.document.getElementById('thft').innerHTML == 'Finish') {
window.opener.document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
} else {
if (window.opener.document.getElementById('femailthft')) {
window.opener.document.getElementById('femailthft').href=window.opener.document.getElementById('femailthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
if (window.opener.document.getElementById('fsmsthft')) {
window.opener.document.getElementById('fsmsthft').href=window.opener.document.getElementById('fsmsthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
}
}
}
document.getElementById('myaudios').innerHTML+="<audio onloadedmeta=\"this.setAttribute('data-duration','' + this.duration);\" data-duration=0 controls type=\"" + newa.type + "\" src=\"" + newa.src + "\"></audio><br>";
}
}
} else if (document.URL.indexOf(encodeURIComponent('&i' + wzero + '=data' + encodeURIComponent(':video/'))) != -1) {
if (document.URL.indexOf(encodeURIComponent('&c' + wzero + '=on')) != -1) {
thisduris=eval('' + decodeURIComponent(document.URL.split(encodeURIComponent('&j' + wzero + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]));
newa=document.createElement('video');
newa.onloadedmetadata=function(event){
event.target.play();
wzero++;
wone++;
setTimeout(playb, eval(1000 * thisduris));
acount++;
}
newa.type='video/' + decodeURIComponent(document.URL.split(encodeURIComponent('&i' + wzero + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]).split(encodeURIComponent('/'))[1].split(encodeURIComponent(','))[0].split(encodeURIComponent(';'))[0];
newa.src=decodeURIComponent(decodeURIComponent(document.URL.split(encodeURIComponent('&i' + wzero + '='))[1].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0])).replace(/\ /g,'+');
if (document.getElementById('myaudios').innerHTML.indexOf(newa.src) == -1) {
if (document.getElementById('thft').innerHTML == 'Finish') {
document.getElementById('thft').innerHTML="Finish <a target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
if (window.opener) {
if (window.opener.document.getElementById('thft').innerHTML == 'Finish') {
window.opener.document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=My%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
} else {
if (window.opener.document.getElementById('femailthft')) {
window.opener.document.getElementById('femailthft').href=window.opener.document.getElementById('femailthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
if (window.opener.document.getElementById('fsmsthft')) {
window.opener.document.getElementById('fsmsthft').href=window.opener.document.getElementById('fsmsthft').href.split('body=')[0] + 'body=' + encodeURIComponent(document.URL);
}
}
}
}
document.getElementById('myaudios').innerHTML+="<video onloadedmeta=\"this.setAttribute('data-duration','' + this.duration);\" data-duration=0 controls type=\"" + newa.type + "\" src=\"" + newa.src + "\"></video><br>";
}
}
}
}
function norecown() {
if (document.getElementById('recown')) {
document.getElementById('recown').style.visibility='hidden';
//document.getElementById('recown').style.display='none';
}
}
function knaviga(evt) {
var oso=evt.target;
evt.stopPropagation();
if (eval('' + backtolist.length) > 0) {
for (var iik=0; iik<backtolist.length; iik++) {
document.getElementById('' + backtolist[iik]).checked=true;
}
}
backtolist=[];
var keepg=true, ik=0, lva='0';
prevwoin='0';
woinnext='0';
woinlast='0.0';
firstwoin='0.0';
//xnextwoin='999';
var knum=0;
while (document.getElementById('xx' + knum)) {
if (('' + document.getElementById('xx' + knum).outerHTML).indexOf('green') != -1) {
prevwoin='' + lva;
if (1 == 1 || eval('' + knum) > eval('' + xnextwoin)) { xnextwoin='' + knum; }
lva='' + knum;
woinnext=woinnext.replace('.0','');
}
if (document.getElementById('c' + knum)) {
if (document.getElementById('c' + knum).checked) {
if (firstwoin.indexOf('.0') != -1) {
firstwoin='' + knum;
woinlast='' + knum;
} else {
woinlast='' + knum;
}
if (eval('' + knum) == eval('' + xnextwoin)) {
woinnext='' + knum + '';
} else if (eval('' + knum) > eval('' + xnextwoin) && woinnext.indexOf('.0') == -1) {
woinnext='' + knum + '.0';
}
backtolist.push('c' + knum);
}
}
knum++;
}
knum=0;
while (document.getElementById('c' + knum)) {
if (eval('' + knum) < eval('' + xnextwoin)) { prevwoin='' + knum; }
knum++;
}
var ourthisval='' + oso.id;
//top.document.title='' + xnextwoin + ':' + document.getElementById('xx0').outerHTML.split('>')[0] + ':' + ('' + new Date());
if (keepg && window.parent) {
if (top.document.getElementById('navig')) {
if (ourthisval.trim() != '') {
if (ourthisval.trim() == 'sback') {
if (document.getElementById('c' + xnextwoin)) {
for (ik=0; ik<knum; ik++) {
if (('' + ik) != ('' + prevwoin) && document.getElementById('c' + ik)) {
document.getElementById('c' + ik).checked=false;
}
}
setTimeout(function(){ for (var ik=0; ik<backtolist.length; ik++) { document.getElementById(backtolist[ik]).checked=true; } backtolist=[]; }, 3500);
}
} else if (ourthisval.trim() == 'snext') {
if (document.getElementById('c' + xnextwoin)) {
for (ik=0; ik<knum; ik++) {
if (('' + ik) != ('' + woinnext.split('.')[0]) && document.getElementById('c' + ik)) {
document.getElementById('c' + ik).checked=false;
}
}
setTimeout(function(){ for (var ik=0; ik<backtolist.length; ik++) { document.getElementById(backtolist[ik]).checked=true; } backtolist=[]; }, 3500);
}
//alert('bYES ' + nextwoin + parent.document.getElementById('navig').value);
} else if (ourthisval.trim() == 'sfirst') {
if (document.getElementById('c' + xnextwoin)) {
for (ik=0; ik<knum; ik++) {
if (('' + ik) != ('' + firstwoin.split('.')[0]) && document.getElementById('c' + ik)) {
document.getElementById('c' + ik).checked=false;
}
}
setTimeout(function(){ for (var ik=0; ik<backtolist.length; ik++) { document.getElementById(backtolist[ik]).checked=true; } backtolist=[]; }, 3500);
}
} else if (ourthisval.trim() == 'slast') {
if (document.getElementById('c' + xnextwoin)) {
for (ik=0; ik<knum; ik++) {
if (('' + ik) != ('' + woinlast.split('.')[0]) && document.getElementById('c' + ik)) {
document.getElementById('c' + ik).checked=false;
}
}
setTimeout(function(){ for (var ik=0; ik<backtolist.length; ik++) { document.getElementById(backtolist[ik]).checked=true; } backtolist=[]; }, 3500);
}
}
parent.document.getElementById('navig').value='';
}
}
}
}
function afterlh() {
if (document.getElementById('inseconds')) {
document.getElementById('inseconds').innerHTML='<div style=display:inline-block; onclick=knaviga(event); id=sback><</div> <div style=display:inline-block; onclick=knaviga(event); id=snext>></div> <div style=display:inline-block; onclick=knaviga(event); id=slast>>></div> <div style=display:inline-block; onclick=knaviga(event); id=sfirst><<</div>';
} else {
setTimeout(afterlh, 3000);
}
}
function ptitleize(yourprefix) {
//alert('44:' + yourprefix);
if (window.parent) {
//alert('444:' + yourprefix);
if (parent.window.opener) {
if (parent.document.title.replace(' A-V',' A+V').indexOf(' A+V') != -1 && yourprefix != '') {
//alert(4444);
parent.document.title=parent.document.title.replace(parent.document.title.replace(' A-V',' A+V').split(' A+V')[0], decodeURIComponent(decodeURIComponent(yourprefix)));
}
}
}
}
function wolookfordivtitleschange() {
var alti=1, tent=10000;
if (parent.window.opener) {
if (parent.document.getElementById('divtitles').innerHTML.indexOf('>In play<') != -1 && parent.window.opener.document.getElementById('divtitles').innerHTML.indexOf('>In play<') == -1) {
parent.window.opener.document.getElementById('divtitles').innerHTML+='<p style="display:none;">In play</p>';
inplay=true;
}
if (parent.document.getElementById('divtitles').innerHTML.indexOf('>In play<') == -1 && parent.window.opener.document.getElementById('divtitles').innerHTML.indexOf('>In play<') != -1) {
parent.document.getElementById('divtitles').innerHTML+='<p style="display:none;">In play</p>';
inplay=true;
}
if (parent.document.getElementById('divnewtitles') && !parent.window.opener.document.getElementById('divnewtitles')) {
parent.window.opener.document.getElementById('divtitles').innerHTML+=parent.document.getElementById('divnewtitles').outerHTML;
inplay=true;
//if (firstblank == ' ') { tent=120000; }
playcont=parent.document.getElementById('divnewtitles').innerHTML + firstblank;
firstblank='';
}
if (!parent.document.getElementById('divnewtitles') && parent.window.opener.document.getElementById('divnewtitles')) {
parent.document.getElementById('divtitles').innerHTML+=parent.window.opener.document.getElementById('divnewtitles').outerHTML;
inplay=true;
//if (firstblank == ' ') { tent=120000; }
playcont=parent.window.opener.document.getElementById('divnewtitles').innerHTML + firstblank;
firstblank='';
}
if (parent.document.getElementById('divnewtitles') && parent.window.opener.document.getElementById('divnewtitles')) {
if (eval('' + parent.document.getElementById('divnewtitles').innerHTML.length) > eval('' + parent.window.opener.document.getElementById('divnewtitles').innerHTML.length)) {
parent.window.opener.document.getElementById('divnewtitles').innerHTML=parent.document.getElementById('divnewtitles').innerHTML;
}
if (eval('' + parent.document.getElementById('divnewtitles').innerHTML.length) < eval('' + parent.window.opener.document.getElementById('divnewtitles').innerHTML.length)) {
parent.document.getElementById('divnewtitles').innerHTML=parent.window.opener.document.getElementById('divnewtitles').innerHTML;
}
}
} else {
if (parent.document.getElementById('divtitles').innerHTML.indexOf('>In play<') == -1) {
parent.document.getElementById('divtitles').innerHTML+='<p style="display:none;">In play</p>';
inplay=true;
}
if (parent.document.getElementById('divnewtitles')) {
playcont=parent.document.getElementById('divnewtitles').innerHTML + firstblank;
}
//alert(4);
}
if (parent.document.getElementById('divtitles')) {
if (inplay && playcont == '') {
playcont=parent.document.getElementById('divtitles').innerHTML;
}
if (!inplay && parent.document.getElementById('divtitles').innerHTML.indexOf('>In play<') != -1) {
inplay=true;
}
if (inplay && playcont.trim() != '' && document.getElementById('i0') && document.getElementById('i1') && ('' + document.getElementById('i1').value).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
//alert(34);
if (parent.document.getElementById('divtitles').innerHTML != playcont) { // && document.getElementById('i0').outerHTML.indexOf(' data-noclash=') == -1) {
//alert(134);
if (parent.document.getElementById('divnewtitles')) {
//alert(234);
if (parent.document.getElementById('divnewtitles').innerHTML.trim() != '' && parent.document.getElementById('divnewtitles').innerHTML.indexOf(',') != -1) {
//alert(334);
if (listsofar.indexOf(parent.document.getElementById('divnewtitles').innerHTML.split(',')[0]) != -1) {
var kzero=0;
while (document.getElementById('i' + kzero)) {
if (document.getElementById('i' + kzero).value.indexOf('#') == -1 && document.getElementById('i' + kzero).value.trim() != '') {
kzero=-999;
}
kzero++;
}
if (kzero >= 0) { listsofar=','; }
}
var attendedto=false;
if (listsofar.indexOf(parent.document.getElementById('divnewtitles').innerHTML.split(',')[0]) == -1) {
//alert(444);
if (window.parent) {
if (parent.window.opener) {
if (('' + parent.window.opener.document.getElementById('divnewtitles').title).replace(/^null/g,'').replace(/^undefined/g,'').trim() != '') { ptitleize(parent.window.opener.document.getElementById('divnewtitles').title); } else { ptitleize(parent.document.getElementById('divnewtitles').title); }
} else {
if (4 == 4) { ptitleize(parent.document.getElementById('divnewtitles').title); }
}
}
listsofar+=parent.document.getElementById('divnewtitles').innerHTML.trim() + ',';
altarr=parent.document.getElementById('divnewtitles').innerHTML.trim().split(',');
var zeroval=document.getElementById('youtubeid').value;
//alert('1:' + parent.document.getElementById('divnewtitles').innerHTML);
if (document.getElementById('i0')) {
zeroval=document.getElementById('i0').value;
//alert(544);
document.getElementById('i0').setAttribute('data-noclash', '' + document.getElementById('youtubeid').value);
}
if (zeroval.indexOf(document.getElementById('youtubeid').value) == -1) {
alti=0;
document.getElementById('i0').value=parent.document.getElementById('divnewtitles').innerHTML;
} else if (document.getElementById('i' + alti)) {
//alert(644);
while (document.getElementById('i' + alti)) {
if (document.getElementById('i' + alti).value.indexOf(document.getElementById('youtubeid').value) == -1) {
document.getElementById('i' + alti).value=parent.document.getElementById('divnewtitles').innerHTML;
alti=eval(0 - eval('' + alti));
} else {
alti++;
}
}
if (alti >= 0) {
document.getElementById('i0').value=parent.document.getElementById('divnewtitles').innerHTML;
alti=0;
} else {
alti=-alti;
}
} else {
document.getElementById('i0').value=parent.document.getElementById('divnewtitles').innerHTML;
alti=0;
}
parent.document.getElementById('divnewtitles').innerHTML='';
if (eval('' + altarr.length) > 0 && 5 == 7) {
var newalti=alti;
var jalti=0
for (var ialt=alti; ialt<eval(alti + eval('' + altarr.length)); ialt++) {
if (document.getElementById('i' + newalti)) {
if (document.getElementById('i' + newalti).value.indexOf(document.getElementById('youtubeid').value) != -1) {
newalti++;
}
}
if (document.getElementById('i' + newalti)) {
if (document.getElementById('i' + newalti).value.trim() != -1) {
document.getElementById('i' + newalti).value='' + altarr[jalti];
} else {
newalti=0;
document.getElementById('i' + newalti).value='' + altarr[jalti];
}
} else {
newalti=0;
document.getElementById('i' + newalti).value='' + altarr[jalti];
}
newalti++;
jalti++;
}
} else if (document.getElementById('i1') && ('' + document.getElementById('i1').value).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
attendedto=true;
altbuti=Math.abs(alti);
butnotif=document.getElementById('youtubeid').value;
//parent.document.title=('butnotif=' + butnotif + ' and altbuti=' + altbuti);
//alert('altButi=' + altbuti + ' butnotif=' + butnotif + ' alti=' + alti);
checkval(document.getElementById('i' + alti));
}
}
}
}
if (butnotif != '' && butnotif == butnotif.trim() && !attendedto) {
attendedto=true;
altbuti=Math.abs(alti);
butnotif=document.getElementById('youtubeid').value;
//parent.document.title=('butnotif=' + butnotif + ' and altbuti=' + altbuti);
//alert('AltButI=' + altbuti + ' butnotif=' + butnotif + ' alti=' + alti);
checkval(document.getElementById('i' + alti));
}
playcont=parent.document.getElementById('divtitles').innerHTML;
}
} else if (inplay && parent.document.getElementById('divnewtitles')) {
if (parent.document.getElementById('divnewtitles').innerHTML.trim() != '') {
//alert('2:' + parent.document.getElementById('divnewtitles').innerHTML);
document.getElementById('i0').value=parent.document.getElementById('divnewtitles').innerHTML;
parent.document.getElementById('divnewtitles').innerHTML='';
checkval(document.getElementById('i0'));
}
playcont=parent.document.getElementById('divtitles').innerHTML;
}
}
if (tent == 10000) { setTimeout(wolookfordivtitleschange, tent); }
}
function lookfordivtitleschange() {
if (parent.document.getElementById('divtitles')) {
if (inplay && playcont == '') {
playcont=parent.document.getElementById('divtitles').innerHTML;
}
if (!inplay && parent.document.getElementById('divtitles').innerHTML.indexOf('>In play<') != -1) {
inplay=true;
}
if (inplay && playcont != '') {
if (parent.document.getElementById('divtitles').innerHTML != playcont) {
if (parent.document.getElementById('divnewtitles')) {
if (parent.document.getElementById('divnewtitles').innerHTML.trim() != '') {
//alert('3:' + parent.document.getElementById('divnewtitles').innerHTML);
document.getElementById('i0').value=parent.document.getElementById('divnewtitles').innerHTML;
parent.document.getElementById('divnewtitles').innerHTML='';
}
}
playcont=parent.document.getElementById('divtitles').innerHTML;
}
} else if (inplay && parent.document.getElementById('divnewtitles')) {
if (parent.document.getElementById('divnewtitles').innerHTML.trim() != '') {
//alert('7:' + parent.document.getElementById('divnewtitles').innerHTML);
document.getElementById('i0').value=parent.document.getElementById('divnewtitles').innerHTML;
parent.document.getElementById('divnewtitles').innerHTML='';
}
playcont=parent.document.getElementById('divtitles').innerHTML;
}
}
setTimeout(lookfordivtitleschange, 10000);
}
function lhchk(inmode) {
var lcchk=' checked', lcname='', shchk='', iijg=0, ibigc=bigc, accountedfor=false;
wzero=0;
wone=1;
if (window.parent) {
//alert(98);
if (parent.window.opener) {
//alert(99);
if (('' + parent.window.opener.document.URL).indexOf('/swipe_media.htm') != -1) {
//alert(89);
accountedfor=true;
setTimeout(wolookfordivtitleschange, 1000);
//alert(54);
}
} else if ((2 == 2 || navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) && (parent.document.URL.indexOf('=rad') != -1 || parent.document.URL.indexOf('isradio=') != -1 || parent.document.URL.indexOf('?b') != -1) && parent.document.URL.indexOf('/swipe_media.htm') != -1) {
accountedfor=true;
setTimeout(wolookfordivtitleschange, 1000);
//} else {
//alert('why? ' + parent.document.URL);
}
}
if (window.parent) {
if (9 == 6 && ('' + parent.document.URL).indexOf('/swipe_media.htm') != -1 && !accountedfor) {
accountedfor=true;
if (parent.document.getElementById('divtitles')) {
if (parent.document.getElementById('divtitles').innerHTML != '') {
setTimeout(lookfordivtitleschange, 1000);
//alert(45);
}
}
}
if (('' + top.document.URL).indexOf('isradio=') != -1) {
if (1 == 1) {
if (document.getElementById('inseconds')) {
document.getElementById('inseconds').innerHTML='<div style=display:inline-block; onclick=knaviga(event); id=sback><</div> <div style=display:inline-block; onclick=knaviga(event); id=snext>></div> <div style=display:inline-block; onclick=knaviga(event); id=slast>>></div> <div style=display:inline-block; onclick=knaviga(event); id=sfirst><<</div>';
} else {
setTimeout(afterlh, 3000);
}
} else {
if (('' + parent.document.getElementById('navig'))) {
if (('' + parent.document.getElementById('navig').title) == '') {
parent.document.getElementById('navig').title=' ';
//alert('started');
setTimeout(lookfornavig, 1000);
}
}
}
}
}
if (document.getElementById('recown')) {
norecown();
}
if (document.URL.indexOf('youtubeid=') != -1) {
browsebut=' <a style=display:inline-block;text-decoration:n one;cursor:pointer; title="Browse locally for media files ..." onclick=" newartwo=true; actbb(); setTimeout(function(){ newartwo=false; }, 5000);">📂</a> ';
bbaswell='<div id=myaudios></div><div id=myvideos></div>';
browseiframe='<br><iframe onload=usethistwo(this); src=/HTMLCSS/client_browsing.htm frameborder=0 id=browseif name=browseif style=opacity:0.9;width:100%;height:100px;></iframe>';
}
if (document.getElementById('thft')) {
if (document.URL.indexOf('youtube_duration=') != -1) {
if (('' + document.URL + 's').replace(/\%23http$/g,'#http').replace(/\#https$/g,'') != ('' + document.URL + 's')) {
document.getElementById('thft').innerHTML="Finish <a id=femailthft style=cursor:pointer;text-decoration:underline; onclick=\"clickto('');\" title=Email>📧</a> <a id=fsmsthft target=_top style=cursor:pointer;text-decoration:underline; onclick=\"clickto('sms');\" title=SMS>📟</a>";
} else {
document.getElementById('thft').innerHTML="Finish <a id=femailthft target=_top href=\"mailto:?subject=The%20Media&body=" + encodeURIComponent(document.URL) + "\" title=Email>📧</a> <a id=fsmsthft target=_top href=\"sms:&body=" + encodeURIComponent(document.URL) + "\" title=SMS>📟</a>";
}
}
}
if (inmode == '') {
for (const [key, value] of Object.entries(localStorage)) { // thanks to https://stackoverflow.com/questions/3138564/looping-through-localstorage-in-html5-and-javascript
if (('' + key).indexOf('karaoke_youtube_api-') == 0) {
if (recallsel == '') {
recallsel='<select style="width:80px;" onchange="newpl(this);"><option value="">Optionally choose a saved Playlist below ...</option></select>';
}
recallsel=recallsel.replace('</select>', '<option value="' + value + '">' + ('' + key).split('karaoke_youtube_api-')[1].replace(/\-/g, ' ') + '</option><option value="x ' + value + '">Forget ... ' + ('' + key).split('karaoke_youtube_api-')[1].replace(/\-/g, ' ') + '</option><option value="s ' + value + '">Email or SMS ... ' + ('' + key).split('karaoke_youtube_api-')[1].replace(/\-/g, ' ') + '</option></select>');
}
}
}
if ((document.URL + '').indexOf(encodeURIComponent('&i' + wzero + '=data' + encodeURIComponent(':audio/'))) != -1) {
//alert('playB');
playb();
} else if ((document.URL + '').indexOf('&i' + wzero + '=data' + encodeURIComponent(':audio/')) != -1) {
//alert('playa');
playa();
} else if ((document.URL + '').indexOf(encodeURIComponent('&i' + wzero + '=data' + encodeURIComponent(':audio/'))) != -1) {
//alert('playb');
playb();
} else if ((document.URL + '').replace(/\%23http$/g,'#http').indexOf('#http') == -1 && (document.URL + '').indexOf('#') != -1 && (document.URL + '').indexOf(encodeURIComponent('data:')) != -1) {
lhqw=(document.URL + '').split(encodeURIComponent('data'));
//alert('' + lhqw.length);
for (iijg=1; iijg<lhqw.length; iijg++) {
if ((lhqw[iijg].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]).slice(-20).toLowerCase().indexOf('%e2%80%a6') != -1 || 1 == 1) {
setTimeout(function(){
ijg++;
document.getElementById('bcc').value=' ';
document.getElementById('cc').value='' + bigc;
bigc++;
document.getElementById('to').value='';
document.getElementById('subject').value='';
//alert('1:' + 'data' + decodeURIComponent(lhqw[ijg].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].split('%e2%80%a6')[0].split('%E2%80%A6')[0]).replace(/\ /g,'+'));
document.getElementById('urlbig').value='data' + decodeURIComponent(lhqw[ijg].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].split('%e2%80%a6')[0].split('%E2%80%A6')[0]).replace(/\ /g,'+'); //.replace(/\.\.\.$/g,'');
document.getElementById('sendemail').click();
}, eval(eval(ibigc + 5) * 1000));
ibigc++;
}
}
} else if (('' + location.hash).indexOf('#http') == -1 && ('' + location.hash).indexOf('#') != -1 && ('' + location.hash).indexOf(encodeURIComponent('data')) != -1) {
lhqw=('' + location.hash).split(encodeURIComponent('data'));
//alert('' + lhqw.length);
for (iijg=1; iijg<lhqw.length; iijg++) {
if ((lhqw[iijg].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0]).slice(-20).toLowerCase().indexOf('%e2%80%a6') != -1 || 1 == 1) {
setTimeout(function(){
ijg++;
document.getElementById('bcc').value=' ';
document.getElementById('cc').value='' + bigc;
bigc++;
document.getElementById('to').value='';
document.getElementById('subject').value='';
//alert('2:' + 'data' + decodeURIComponent(lhqw[ijg].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].split('%e2%80%a6')[0].split('%E2%80%A6')[0]).replace(/\ /g,'+'));
document.getElementById('urlbig').value='data' + decodeURIComponent(lhqw[ijg].split(encodeURIComponent('&'))[0].split(encodeURIComponent('#'))[0].split('%e2%80%a6')[0].split('%E2%80%A6')[0]).replace(/\ /g,'+'); //.replace(/\.\.\.$/g,'');
document.getElementById('sendemail').click();
}, eval(eval(ibigc + 5) * 1000));
ibigc++;
}
}
}
if (document.URL.replace(/\%23http$/g,'#http').indexOf('#http') != -1) {
if (document.URL.indexOf('&shuffle=y') != -1) { shchk=' checked'; }
if (('' + document.URL + 's').replace(/\#https/g,'') != ('' + document.URL + 's')) {
if (decodeURIComponent(document.URL.split('#')[1]).toLowerCase().indexOf('&shuffle=y') != -1) { shchk=' checked'; }
document.getElementById('spanthst').innerHTML=browsebut + ' Loop: <input type=checkbox id=loopchk' + lcchk + '></input> Shuffle: <input type=checkbox id=shufflechk' + shchk + '></input> Saved <input type=checkbox onchange=saveplaylist(); id=namechk></input> as <input style="width:80px;" oncontextmenu="event.stopPropagation(); hoverplaylist(this,true);" onblur=saveplaylist(); id=namethechk title="Recallable name ... right click for list of stored playlists and chance to select one" type=text placeholder"Recallable name ... double click for list of stored playlists" value="' + lcname + '"></input> ' + recallsel;
hoverplaylist(document.getElementById('namethechk'),false);
} else {
if (decodeURIComponent(document.URL.split('#')[1]).toLowerCase().indexOf('&shuffle=y') != -1) { shchk=' checked'; }
if (inmode == '') {
recallurl=decodeURIComponent(document.URL.split('#')[1]).split('&loop=')[0].split('&name=')[0] + '#' + document.URL.split('#')[1];
document.getElementById('spanthst').innerHTML=' ... ' + browsebut + recallsel.replace('80px;', '160px;');
} else {
if (decodeURIComponent(document.URL.split('#')[1]).toLowerCase().indexOf('&loop=n') != -1) { lcchk=''; }
if (decodeURIComponent(document.URL.split('#')[1]).toLowerCase().indexOf('&name=') != -1 && decodeURIComponent((document.URL + encodeURIComponent('&')).split('#')[1]).toLowerCase().indexOf('&name=&') == -1) {
lcname=decodeURIComponent(document.URL.split('#')[1]).split('&name=')[1].split('&')[0];
}
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.getElementById('spanthst').innerHTML=browsebut + ' Loop: <input type=checkbox id=loopchk' + lcchk + '></input> Shuffle: <input type=checkbox id=shufflechk' + shchk + '></input> Saved <input type=checkbox onchange=saveplaylist(); id=namechk></input> as <input style="width:80px;" oncontextmenu="event.stopPropagation(); hoverplaylist(this,true);" onblur=saveplaylist(); id=namethechk title="Recallable name ... right click for list of stored playlists and chance to select one" type=text placeholder"Recallable name ... double click for list of stored playlists" value="' + lcname + '"></input> ' + recallsel;
hoverplaylist(document.getElementById('namethechk'),false);
} else {
if (shchk == '') {
shchk=' onchange="mixitup(comingurl,true);"';
}
document.getElementById('spanthst').innerHTML=browsebut + ' Loop: <input type=checkbox id=loopchk' + lcchk + '></input> Shuffle: <input type=checkbox id=shufflechk' + shchk + '></input> Saved <input type=checkbox onchange=saveplaylist(); id=namechk></input> as <input style="width:80px;" oncontextmenu="event.stopPropagation(); hoverplaylist(this,true);" onblur=saveplaylist(); id=namethechk title="Recallable name ... right click for list of stored playlists and chance to select one" type=text placeholder"Recallable name ... double click for list of stored playlists" value="' + lcname + '"></input> ' + recallsel;
hoverplaylist(document.getElementById('namethechk'),false);
}
}
}
} else if (recallsel != '') {
document.getElementById('spanthst').innerHTML=' ... ' + browsebut + recallsel.replace('80px;', '160px;');
}
}
function arwoaudioablook() {
var tian=false, absare=[], iabs=0, jabs=0, kabs=-1;
//alert(-5);
if (arwo) {
//alert(-2);
absare=arwo.document.getElementsByTagName('audio');
for (iabs=0; iabs<absare.length; iabs++) {
//alert(absare[iabs].outerHTML);
if (('' + absare[iabs].id).indexOf('ab') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '' && 2 == 5) {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
}
}
acount++;
//arwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=arwo.document.getElementsByTagName('video');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('vb') == 0) {
if (document.getElementById('myvideos').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '' && 2 == 5) {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
}
}
acount++;
//arwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=arwo.document.getElementsByTagName('img');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('gb') == 0) {
if (document.getElementById('myvideos').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '' && 2 == 5) {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
}
}
acount++;
//arwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
}
if (yaconto) {
absare=yaconto.getElementsByTagName('audio');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('ab') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '' && 2 == 5) {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
}
}
acount++;
//arwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=yaconto.getElementsByTagName('video');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('vb') == 0) {
if (document.getElementById('myvideos').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '' && 2 == 5) {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
}
}
acount++;
//arwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=yaconto.getElementsByTagName('img');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('gb') == 0) {
if (document.getElementById('myvideos').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '' && 2 == 5) {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myvideos').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
}
}
acount++;
//arwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
}
if (tian) {
setTimeout(audioanal, 6000);
}
}
function makerecallablemaybe(setit) {
if (document.URL.indexOf('srt=WEBVTT%20FILE') != -1 && document.URL.indexOf('youtubeid=') != -1 && document.URL.indexOf('youtubeid=&') == -1) {
if (('' + window.localStorage.getItem('capsub_' + document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0])).replace(/^undefined/g, '').replace(/^null/g, '') != '') {
window.localStorage.removeItem('capsub_' + document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0]);
}
if (setit) {
window.localStorage.setItem('capsub_' + document.URL.split('youtubeid=')[1].split('&')[0].split('#')[0], '#srt=WEBVTT%20FILE' + document.URL.split('srt=WEBVTT%20FILE')[1]);
}
} else if (('' + location.hash).indexOf('srt=WEBVTT%20FILE') != -1 && ('' + location.hash).indexOf('youtubeid=') != -1 && ('' + location.hash).indexOf('youtubeid=&') == -1) {
if (('' + window.localStorage.getItem('capsub_' + ('' + location.hash).split('youtubeid=')[1].split('&')[0].split('#')[0])).replace(/^undefined/g, '').replace(/^null/g, '') != '') {
window.localStorage.removeItem('capsub_' + ('' + location.hash).split('youtubeid=')[1].split('&')[0].split('#')[0]);
}
if (setit) {
window.localStorage.setItem('capsub_' + ('' + location.hash).split('youtubeid=')[1].split('&')[0].split('#')[0], '#srt=WEBVTT%20FILE' + ('' + location.hash).split('srt=WEBVTT%20FILE')[1]);
}
}
}
function arwotwoaudioablook() {
var tian=false, absare=[], iabs=0, jabs=0, kabs=-1;
//alert(-5);
if (arwotwo) {
//alert(-2);
absare=arwotwo.document.getElementsByTagName('audio');
for (iabs=0; iabs<absare.length; iabs++) {
//alert(absare[iabs].outerHTML);
if (('' + absare[iabs].id).indexOf('ab') == 0) {
if (!document.getElementById('myaudios')) { alert('oops'); }
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '') {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
document.getElementById('j' + kabs).disabled=true;
document.getElementById('i' + eval(1 + kabs)).focus();
setTimeout(arwotwoaudioablook, 5000);
return '';
}
}
acount++;
//arwotwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=arwotwo.document.getElementsByTagName('video');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('vb') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '') {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
document.getElementById('j' + kabs).disabled=true;
document.getElementById('i' + eval(1 + kabs)).focus();
setTimeout(arwotwoaudioablook, 5000);
return '';
}
}
acount++;
//arwotwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=arwotwo.document.getElementsByTagName('img');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('gb') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '') {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
document.getElementById('j' + kabs).disabled=true;
document.getElementById('i' + eval(1 + kabs)).focus();
setTimeout(arwotwoaudioablook, 5000);
return '';
}
}
acount++;
//arwotwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
}
if (waconto) {
absare=waconto.getElementsByTagName('audio');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('ab') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '') {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('ab','ab' + acount).replace("<audio ","<audio style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
document.getElementById('j' + kabs).disabled=true;
document.getElementById('i' + eval(1 + kabs)).focus();
setTimeout(arwotwoaudioablook, 5000);
return '';
}
}
acount++;
//arwotwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=waconto.getElementsByTagName('video');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('vb') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '') {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('vb','vb' + acount).replace("<video ","<video style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
document.getElementById('j' + kabs).disabled=true;
document.getElementById('i' + eval(1 + kabs)).focus();
setTimeout(arwotwoaudioablook, 5000);
return '';
}
}
acount++;
//arwotwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
absare=waconto.getElementsByTagName('img');
for (iabs=0; iabs<absare.length; iabs++) {
if (('' + absare[iabs].id).indexOf('gb') == 0) {
if (document.getElementById('myaudios').innerHTML.indexOf(absare[iabs].src) == -1 && absare[iabs].outerHTML.indexOf(' data-done') == -1) {
tian=true;
if (browsebut == '') {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
} else {
document.getElementById('myaudios').innerHTML+=absare[iabs].outerHTML.replace('gb','gb' + acount).replace("<img ","<img style=display:none; data-duration=0 onloadedmetadata=\"this.setAttribute('data-duration','' + this.duration);\" ") + '<br>';
while (document.getElementById('i' + jabs)) {
if (kabs < 0 && document.getElementById('i' + jabs).value.trim() == '') {
kabs=jabs;
}
jabs++;
}
if (kabs >= 0) {
document.getElementById('i' + kabs).value=absare[iabs].src;
checkval(document.getElementById('i' + kabs)); //document.getElementById('i' + kabs).blur();
document.getElementById('j' + kabs).disabled=true;
document.getElementById('i' + eval(1 + kabs)).focus();
setTimeout(arwotwoaudioablook, 5000);
return '';
}
}
acount++;
//arwotwo.document.getElementById('ab').setAttribute('data-done','y');
}
}
}
}
setTimeout(arwotwoaudioablook, 5000);
}
function actbb() {
if (document.getElementById('browseif')) {
if (document.getElementById('browseif').outerHTML.split('>')[0].toLowerCase().replace(/\ /g,'').indexOf('opacity:0') != -1) {
setTimeout(arwotwoaudioablook, 5000);
}
document.getElementById('browseif').style.opacity='1.0';
} else {
if (!arwotwo) { setTimeout(arwotwoaudioablook, 5000); }
if (arwotwo) {
if (!arwotwo.closed) {
arwotwo.close();
arwotwo=null;
}
}
arwotwo=window.open('/HTMLCSS/client_browsing.htm','_blank','top=' + eval(-500 + screen.height) + ',left=' + eval(-500 + screen.width) + ',width=500,height=500');
}
}
function maybedet(inid) {
if (document.getElementById('detdiv' + inid)) {
return 'detdiv' + inid;
} else if (document.getElementById(inid)) {
if (document.getElementById(inid).innerHTML == '') {
if (window.parent) {
if (parent.document.getElementById('refurl')) {
if (parent.document.getElementById('refurl').value.trim() != '') {
toddd=' <a target=_blank title="' + parent.document.getElementById('refurl').value.trim() + '# might refer to webpage with song lyrics" href="' + parent.document.getElementById('refurl').value.trim() + '" onclick="event.stopPropagation();">...</a>';
}
}
}
if (prefx != '') {
document.getElementById(inid).innerHTML='<details id="det' + inid + '" open><summary id="sum' + inid + '">' + gsandc + ' ...</summary><div ontouchdown="event.stopPropagation(); parent.ouralert(this.innerText,this.title,this.innerHTML,parent.parent.document.getElementById(' + "'curct'" + ').innerHTML);" onmousedown="event.stopPropagation(); parent.ouralert(this.innerText,this.title,this.innerHTML,parent.parent.document.getElementById(' + "'curct'" + ').innerHTML);" onclick="event.stopPropagation(); parent.ouralert(this.innerText,this.title,this.innerHTML,parent.parent.document.getElementById(' + "'curct'" + ').innerHTML);" data-onblur="divblur(this);" data-contenteditable="true" data-sanity="" id="detdiv' + inid + '"></div></details>';
} else {
document.getElementById(inid).innerHTML='<details id="det' + inid + '" open><summary id="sum' + inid + '">' + gsandc + ' ...</summary><div data-ontouchdown="event.stopPropagation();" data-onmousedown="event.stopPropagation();" data-onclick="event.stopPropagation();" data-onblur="divblur(this);" data-contenteditable="true" data-sanity="" id="detdiv' + inid + '"></div></details>';
}
checkthesum='detdiv' + inid;
setInterval(chkthesum, 500);
return 'detdiv' + inid;
}
}
return inid;
}
function chkthesum() {
if (checkthesum != '') {
if (document.getElementById(checkthesum)) {
if (document.getElementById(checkthesum).innerHTML.replace(/\ \;/g,'') == '') {
if (notallowed == 0) {
document.getElementById(checkthesum.replace('detdiv','sum')).innerHTML=(gsandc + ' ...').replace(fromddd,toddd);
}
}
}
}
}
function otherlegit(ineleven, iflegit, thiseleven) {
if (eval('' + ineleven.length) != thiseleven) {
return 'JUNK' + iflegit;
//} else if (ineleven.slice(-1).replace('A','').replace('E','').replace('I','').replace('M','').replace('Q','').replace('U','').replace('Y','').replace('c','').replace('g','').replace('k','').replace('o','').replace('s','').replace('w','').replace('0','').replace('4','').replace('8','') != '') {
// return 'JUNK' + iflegit;
}
for (var ijk=0; ijk<ineleven.length; ijk++) {
if (ineleven.substring(ijk).substring(0,1) >= 'a' && ineleven.substring(ijk).substring(0,1) <= 'z') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) >= 'A' && ineleven.substring(ijk).substring(0,1) <= 'Z') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) >= '0' && ineleven.substring(ijk).substring(0,1) <= '9') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) == '/' || ineleven.substring(ijk).substring(0,1) == '+') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) == '-' || ineleven.substring(ijk).substring(0,1) == '_') {
ijk=ijk;
} else {
return 'JUNK' + iflegit;
}
}
return iflegit;
}
function maybelegit(ineleven, iflegit) {
if (eval('' + ineleven.length) != 11) {
return iflegit.replace('tube','tuJUNKbe');
} else if (ineleven.slice(-1).replace('A','').replace('E','').replace('I','').replace('M','').replace('Q','').replace('U','').replace('Y','').replace('c','').replace('g','').replace('k','').replace('o','').replace('s','').replace('w','').replace('0','').replace('4','').replace('8','') != '') {
return iflegit.replace('tube','tuJUNKbe');
}
for (var ijk=0; ijk<ineleven.length; ijk++) {
if (ineleven.substring(ijk).substring(0,1) >= 'a' && ineleven.substring(ijk).substring(0,1) <= 'z') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) >= 'A' && ineleven.substring(ijk).substring(0,1) <= 'Z') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) >= '0' && ineleven.substring(ijk).substring(0,1) <= '9') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) == '/' || ineleven.substring(ijk).substring(0,1) == '+') {
ijk=ijk;
} else if (ineleven.substring(ijk).substring(0,1) == '-' || ineleven.substring(ijk).substring(0,1) == '_') {
ijk=ijk;
} else {
return iflegit.replace('tube','tuJUNKbe');
}
}
return iflegit;
}
function subalt(inalt, dtlid) {
var outalt=inalt;
//alert(outalt.split('google.com')[eval(-1 + outalt.split('google.com').length)]);
var wdsare=inalt.split(' ');
var opst='', putb='';
if (document.getElementById(dtlid)) {
opst='' + document.getElementById(dtlid).open;
}
if (opst != '') {
putb=" setTimeout(function(){ document.getElementById('" + dtlid + "').open=" + opst + "; }, 300); ";
}
for (var iws=0; iws<wdsare.length; iws++) {
var elevenlegit='', nv='', prefn='';
//if (wdsare[iws].indexOf('61') != -1 || 1 == 1) {
// alert(wdsare[iws]);
//}
if (wdsare[iws].trim() == '' && iws < eval(-1 + eval('' + wdsare.length))) {
nv=wdsare[eval(1 + iws)];
//alert(nv);
if (nv.substring(0,1) >= '0' && nv.substring(0,1) <= '9') {
prefn='+';
if ((prefn + nv) != (prefn + nv).replace(/^\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*(\d{1,2})$/g,'')) {
outalt=outalt.replace(wdsare[eval(1 + iws)], "<a title=\"SMS\" target=\"_top\" onclick=\"event.stopPropagation();\" href=\"sms:" + encodeURIComponent(prefn + wdsare[eval(1 + iws)]) + "&body=" + encodeURIComponent(inalt.replace(wdsare[eval(1 + iws)], prefn + wdsare[eval(1 + iws)])) + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[eval(1 + iws)] + "</a>");
//wdsare[eval(1 + iws)]=(prefn + wdsare[eval(1 + iws)]);
prefn='';
}
} else {
prefn='';
}
} else if (wdsare[iws].trim() != '') {
if (eval('' + wdsare[iws].length) == 11) {
elevenlegit=maybelegit(wdsare[iws], 'youtube');
} else if (eval('' + wdsare[iws].length) == 34) {
elevenlegit=otherlegit(wdsare[iws], 'youtube', 34);
} else if (eval('' + wdsare[iws].length) == 22) {
elevenlegit=otherlegit(wdsare[iws], 'spotify', 22);
}
// if (prefn != '') { alert('0:' + prefn + wdsare[iws]); }
if ((wdsare[iws].toLowerCase().indexOf('http') == 0 && wdsare[iws].toLowerCase().indexOf('//') != -1) || wdsare[iws].toLowerCase().indexOf('//') == 0) {
// if (prefn != '') { alert('1:' + prefn + wdsare[iws]); }
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here1 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"Link\" onclick=\"event.stopPropagation(); window.open('//" + prefn + wdsare[iws].split('//')[1] + "','_blank','top=100,left=120,width=600,height=600'); " + putb + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
} else if (elevenlegit == 'youtube') {
// if (prefn != '') { alert('2:' + prefn + wdsare[iws]); }
if (eval('' + wdsare[iws].length) == 11) {
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here11 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"YouTube video\" onclick=\"event.stopPropagation(); window.open('//www.youtube.com/watch?v=" + prefn + wdsare[iws] + "','_blank','top=120,left=100,width=600,height=600'); " + putb + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
} else {
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here111 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"YouTube playlist\" onclick=\"event.stopPropagation(); window.open('//www.youtube.com/playlist?list=" + prefn + wdsare[iws] + "','_blank','top=120,left=100,width=600,height=600'); " + putb + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
}
} else if (elevenlegit == 'spotify' && eval('' + wdsare[iws].length) == 22) {
// if (prefn != '') { alert('3:' + prefn + wdsare[iws]); }
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here2 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"Spotify album\" onclick=\"event.stopPropagation(); window.open('//open.spotify.com/playlist/" + prefn + wdsare[iws] + "','_blank','top=120,left=100,width=600,height=600'); " + putb + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
} else if (wdsare[iws].indexOf('@') > 0 && (wdsare[iws] + '~').indexOf('@~') == -1 && wdsare[iws].indexOf('.') != -1) {
// if (prefn != '') { alert('4:' + prefn + wdsare[iws]); }
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here3 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"Email\" target=\"_top\" onclick=\"event.stopPropagation();\" href=\"mailto:" + prefn + wdsare[iws] + "?subject=" + encodeURIComponent(inalt) + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
} else if ((prefn + wdsare[iws]).replace(/^\+(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*\d\W*(\d{1,2})$/g,'') != (prefn + wdsare[iws])) {
// if (prefn != '') { alert('5:' + prefn + wdsare[iws]); }
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here4 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"SMS\" target=\"_top\" onclick=\"event.stopPropagation();\" href=\"sms:" + prefn + wdsare[iws] + "&body=" + encodeURIComponent(inalt) + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
} else if (eval('' + wdsare[iws].length) > 4 && wdsare[iws].replace(/0/g,'').replace(/1/g,'').replace(/2/g,'').replace(/3/g,'').replace(/4/g,'').replace(/5/g,'').replace(/6/g,'').replace(/7/g,'').replace(/8/g,'').replace(/9/g,'') == '') {
// if (prefn != '') { alert('6:' + prefn + wdsare[iws]); }
//if (('' + top.document.URL).indexOf('/video_commentary.htm') != -1) { alert('here5 ' + wdsare[iws]); }
outalt=outalt.replace(wdsare[iws], "<a title=\"SMS\" target=\"_top\" onclick=\"event.stopPropagation();\" href=\"sms:" + prefn + wdsare[iws] + "&body=" + encodeURIComponent(inalt) + "\" style=text-decoration:underline;cursor:pointer;\">" + prefn + wdsare[iws] + "</a>");
}
prefn='';
}
}
return outalt;
}
function maybedetstart(inid, altg) {
var sandc='Subtitle and caption';
var snot=' ... not ...';
var sact=' ... actually ';
var sthething=' with song lyrics';
if (window.parent) {
if (parent.document.getElementById('conceptsubject')) {
sandc=parent.document.getElementById('conceptsubject').value;
if (('' + parent.document.getElementById('conceptsubject').getAttribute('data-not')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
if (('' + parent.document.getElementById('conceptsubject').getAttribute('data-not')).replace(/^undefined/g,'').replace(/^null/g,'').indexOf('...') == -1) {
snot=('' + parent.document.getElementById('conceptsubject').getAttribute('data-not')).replace(/^undefined/g,'').replace(/^null/g,'') + ' ...';
} else {
snot=('' + parent.document.getElementById('conceptsubject').getAttribute('data-not')).replace(/^undefined/g,'').replace(/^null/g,'');
}
}
if (('' + parent.document.getElementById('conceptsubject').getAttribute('data-actually')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
//if (('' + parent.document.getElementById('conceptsubject').getAttribute('data-actually')).replace(/^undefined/g,'').replace(/^null/g,'').indexOf('...') == -1) {
// sact=' ... ' + ('' + parent.document.getElementById('conceptsubject').getAttribute('data-actually')).replace(/^undefined/g,'').replace(/^null/g,'') + '';
//} else {
sact=('' + parent.document.getElementById('conceptsubject').getAttribute('data-actually')).replace(/^undefined/g,'').replace(/^null/g,'');
//}
}
if (('' + parent.document.getElementById('conceptsubject').getAttribute('data-thing')).replace(/^undefined/g,'').replace(/^null/g,'') != '') {
sthething=('' + parent.document.getElementById('conceptsubject').getAttribute('data-thing')).replace(/^undefined/g,'').replace(/^null/g,'');
}
} else if (parent.document.URL.indexOf('/video_commentary.htm') != -1) {
sandc='Commentary notes';