<!doctype html>
<html>
<head data-live-domain="api.jquery.com">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="jQuery Foundation - jquery.org">
<meta name="description" content="jQuery: The Write Less, Do More, JavaScript Library">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="//api.jquery.com/jquery-wp-content/themes/api.jquery.com/i/favicon.ico">
<link rel="stylesheet" href="//api.jquery.com/jquery-wp-content/themes/jquery/css/base.css?v=1">
<link rel="stylesheet" href="//api.jquery.com/jquery-wp-content/themes/api.jquery.com/style.css">
<link rel="pingback" href="//api.jquery.com/xmlrpc.php" />
<!--[if lt IE 7]><link rel="stylesheet" href="css/font-awesome-ie7.min.css"><![endif]-->
<!--script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/modernizr.custom.2.6.2.min.js"></script-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write(unescape('%3Cscript src="//api.jquery.com/jquery-wp-content/themes/jquery/js/jquery-1.9.1.min.js"%3E%3C/script%3E'))</script>
<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/plugins.js"></script>
<script src="//api.jquery.com/jquery-wp-content/themes/jquery/js/main.js"></script>
<script src="//use.typekit.net/wde1aof.js"></script>
<script>try{Typekit.load();}catch(e){}</script>
<script type='text/javascript' src='//api.jquery.com/wp-includes/js/comment-reply.min.js?ver=3.8'></script>
<link href='//www.rjmprogramming.com.au/PHP/emboss_h1.css' rel='stylesheet' type='text/css'>
<title>Karaoke via YouTube API - RJM Programming - September, 2016</title>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.1, maximum-scale=8, user-scalable=yes" >
<script type='text/javascript' src='keep_parent_background.js'></script>
<style>
body {
background-color: lightblue;
padding-top: 20px;
background: -webkit-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: -o-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: -moz-linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent;
background: linear-gradient(180deg, rgb(255, 255, 0), rgb(0, 255, 255)); /* linear-gradient(center top , rgb(255, 255, 0), rgb(0, 255, 255)) repeat scroll 0% 0% transparent */
}
input { z-index: 5; }
.emoji { border: 8px solid white; font-size: 20px; }
#youtubeid { width:300px; }
</style>
<script type='text/javascript'>
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?feedoffurl=%2e%2e%2fPHP%2fspeech%5fsupervisor%2ephp%3fmode%3d9%26csneg%3d%2d&youtubeid=7v6t3N8YI8g&youtube_duration=180.0&email=&email=&emoji=on&c0=on&i0=92&j0=94&i1=244&j1=246&i2=171&j2=174&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=
//7v6t3N8YI8g 1:32 1:34 2:24-2:26 2:51-2:54
// https://www.rjmprogramming.com.au/HTMLCSS/karaoke_youtube_api.htm?feedoffurl=%2e%2e%2fPHP%2fspeech%5fsupervisor%2ephp%3fmode%3d9%26csneg%3d%2d&youtubeid=Q0Dn5k_MtZM&youtube_duration=30.021&email=&email=&emoji=on&c0=on&i0=11&j0=14&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=
var otheriframeoh=location.search.split('feedoffurl=')[1] ? '<iframe style="vertical-align:top;width:100%;height:1200px;transform:scale(0.55);" src=' + decodeURIComponent(location.search.split('feedoffurl=')[1].split('&')[0]).replace(/\+/g,' ') + '></iframe>' : '';
if (otheriframeoh != '' && document.URL.indexOf('http:') == 0) { location.href=document.URL.replace('http://rjm','https://www.rjm').replace('http:','https:'); }
var lastgetytlist=''; // store and compare against the last YouTube (perhaps search functionality) query (if the same, do not repeat)
var amwaiting=null; // variable for a setInterval call dampening down the YouTube request rate ... via the control of ...
var allowable=true; // if true, you are clear to request from YouTube, else false
var additionalask=[''];
var sstr='';
var pgiveprefix='';
var emojisuffix='ej';
var firstsuffix="&playtime=0&start=0";
var firstprefix="";
var snippet=-1;
var ourvid=location.search.split('vid=')[1] ? decodeURIComponent(location.search.split('vid=')[1].split('&')[0]).replace(/\+/g,' ') : '';
var ourvids=ourvid.split('!||!');
if (ourvids.length == 1) {
ourvids=ourvid.split('|!!|');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('|!|!');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('!|!|');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('!!||');
}
if (ourvids.length == 1) {
ourvids=ourvid.split('||!!');
}
var doemoji=location.search.split('emoji=')[1] ? location.search.split('emoji=')[1].split('&')[0] : 'on';
var doemj=false, ech='';
if (doemoji == 'on') {
doemj=true;
ech='checked';
}
var ajaxclist='', ajaxoncnt=0, ajaxf='';
var ajaxsih='';
var offtop='';
var iofftop=[];
var givefactor=0;
var sgive=false;
var pgive=false;
var givefifteen=-1;
var thisonetodo=0;
var onestodoprefix='';
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 onestodo=[];
var onestododur=[];
var morethanone=false;
var preselc='';
var defval='0';
var next=0;
var nextthing='mytbody';
var lastfinish=-1;
var next_thing='xx0';
var mbmode=false;
var ifsa=[];
var jfsa=0;
var nine=29;
var bcol='#f0f0f0';
var nextdelay=-1;
var lastokn='';
var okn='';
var lastconto=[];
var morechanges=true;
var lastwo='';
var woi=null;
var oko=null;
var cbut="<br><div style='text-align:center; width: 100%;'><div id='ddkaraoke' style='display:inline; visibility: hidden; '><input onclick=\"if (document.URL.indexOf('i0=') != -1) { alert(987); location.href=document.URL; } \" id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input><br><input onclick=clickto(); id=karaokeshare value='Email Share to ' type='button'></input> <input style=width:60%; onblur=doto(this.value); type=text name=email id=karaokeemail value=></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '><input id='mousej' type='button' style='background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Below via Mouse Video Pauses Starting with '></input> <input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Starting with 0 cell'></input> <input id='karaoke' onclick=\" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();\" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '></div></div>";
var cbutl="<div style=' text-align:center; width: 100%; height: 60px;'><div style=' text-align:center; width: 100%; height: 60px;'><div id='dkaraoke' style=' display:inline; visibility: hidden; '><div style='text-align:center; width: 100%;'><div style='text-align:center; width: 100%;'><input id='karaoke' onclick=\" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();\" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div></div></div><br><div id='ddkaraoke' style='margin-top:-100px; visibility: hidden; text-align:center; width: 100%; '><div style='text-align:center; width: 100%;'><div style='text-align:center; width: 100%;'><input onclick=\"if (document.URL.indexOf('i0=') != -1) { location.href=document.URL; } \" id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input><br><input onclick=clickto(); id=karaokeshare value='Email Share to ' type='button'></input><input onblur=doto(this.value); type=text name=email id=karaokeemail value=></input></div></div></div></div></div><br><br>✔ (<a target=_blank title='Thanks to https://webaudiodemos.appspot.com/AudioRecorder ... if it works for your browser. If not, you can consider using a desktop microphone recorder app such as Mac OS X QuickTime Player as an alternative perhaps.' href='https://webaudiodemos.appspot.com/AudioRecorder/index.html'>Record</a> own parts? <input onchanged='dorecord=!dorecord;' type=checkbox name=recown id=recown value='Record own parts?'></input>) ";
var cbutm="<div style='text-align:center; width: 100%; height: 60px;'><div id='dkaraokem' style='display:inline; visibility: hidden; '><input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Below via Mouse Video Pauses'></input></div></div><br>Start time in seconds <span id=nm style='display:none;'>(negative means you will be singing or Prefix by Audio file URL or YouTube ID delimited by :)</span>";
var cbutr="<div style='text-align:center; width: 100%; height: 60px;'><div id='dkaraoker' style='display:inline; visibility: hidden; '> <input id='mousej' type='button' style=' background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Starting with '></input></div></div><br><span style=text-align:right;width:100%;>Finish</span>";
var zeroplay=-1;
var ylastokn='';
var yokn='';
var yoko=null;
var donef=false;
var huhaudiow=false;
var audiow=null;
var audiof='';
var audioi=0;
var audioask=false;
var dorecord=false;
var ourrec=location.search.split('recown=')[1] ? location.search.split('recown=')[1].split('&')[0] : 'off';
var ioffset=0;
var domin=false;
function mintoajax() {
document.getElementById('ominpossible').innerHTML='📹';
if (1 == 1) {
document.getElementById('ajaxs').style.position='absolute';
document.getElementById('ajaxs').style.left='0px';
document.getElementById('ajaxs').style.top='2px';
} else {
var rect=document.getElementById('ajaxs').getBoundingClientRect();
window.scrollTo(eval(('' + rect.left).replace('px','').split('.')[0]), eval(('' + rect.top).replace('px','').split('.')[0]));
}
}
function oncntapp(sva,svatl) {
// var ajaxclist='', ajaxoncnt=0;
if (eval('' + sva.trim().length) == 11 && sva.trim().indexOf(' ') == -1) {
ajaxoncnt++;
if (ajaxclist == '') {
ajaxclist=sva.trim();
ajaxf=svatl.split('(')[0];
} else {
ajaxclist+=',' + sva.trim();
}
} else if (sva.trim() == '') {
ajaxclist='';
ajaxoncnt=0;
ajaxf='';
}
//document.title='ajaxclist=' + ajaxclist + ' and ajaxoncnt=' + ajaxoncnt;
}
function oncnt(inih) {
return inih.replace(/\<option\ /g, "<option onclick=oncntapp(this.value,this.innerText); ");
}
function putmorethanone(mto) {
morethanone=mto;
if (morethanone) {
document.getElementById('ajaxs').multiple=true;
if (ajaxsih != '') {
document.getElementById('ajaxs').innerHTML=oncnt(ajaxsih);
} else {
document.getElementById('ajaxs').style.height='300px';
}
givefactor=0;
document.getElementById('dajaxs').innerHTML='<input title="Select Video(s) and then Click Here When Ready to Play them (with up to 20 seconds pause or time for your clicks between each)" type=button onclick=" givefactor=givefifteen; " style=display:inline;width:100px;background-color:yellow; value="Ready?" id=iajaxs></input> <br><input title="Select Video(s) and then Click Here When Ready to Play them in a 3x3 grid (where click matches to end result matches keep that order)" type=button onclick=" dnineit(); " style=display:inline;width:100px;background-color:orange; value="Grid?" id=gridajaxs></input> <br> <input title="Select Video(s) and then Click Here When Ready to Play them synchronously, if possible" type=button onclick=" sgive=true; givefactor=givefifteen; " style=display:inline;width:100px;background-color:lightgreen; value="Synchronize?" id=iiajaxs></input> <br> <input title="Select Video(s) and then Click Here When Ready to Play them synchronously and superimposed, if possible" type=button onclick=" pgive=true; sgive=true; givefactor=givefifteen; " style=display:inline;width:100px;background-color:lightblue; value="Superimpose?" id=iiajaxs></input> ';
} else {
document.getElementById('ajaxs').multiple=false;
}
}
function clickto() {
if (1 == 11) {
var ibitis=document.getElementById('emailer').src.split('?')[0].split('#')[0];
ibitis+='?to=' + encodeURIComponent(document.getElementById('to').value);
ibitis+='&cc=' + encodeURIComponent(document.getElementById('cc').value);
ibitis+='&bcc=' + encodeURIComponent(document.getElementById('bcc').value);
ibitis+='&url=' + encodeURIComponent(document.getElementById('url').value);
ibitis+='&urlbig=' + encodeURIComponent(document.getElementById('urlbig').value);
ibitis+='&subject=' + encodeURIComponent(document.getElementById('subject').value);
document.getElementById('emailer').src=ibitis;
} else {
document.getElementById('sendemail').click();
}
}
function doto(etv) {
document.getElementById('to').value=etv;
}
function closeaudio() {
try {
if (audiow != null) {
audiow.close();
audioask=false;
if (audiof == '') {
//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')) {
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';
// alert(emojisuffix + 'karaoke');
emojistuff();
}
}
} else {
ioffset=-1;
}
}
}
} catch (ee) { }
audiow=null;
}
function toms(inf) {
if (inf.value != '') {
if (inf.value.split(';')[0].substring(0,1) >= '0' && inf.value.split(';')[0].substring(0,1) <= '9') {
var secsare=eval(inf.value.split(';')[0]);
//alert(Math.floor(secsare / 3600.0));
//alert(('0' + Math.floor(secsare / 60.0)));
//alert(('0' + eval(secsare,60.0)));
//alert('take two off length of ' + ('0' + Math.floor(eval(secsare,60.0))));
inf.title=Math.floor(secsare / 3600.0) + ':' + ('0' + Math.floor(secsare / 60.0)).substring(eval(-2 + ('0' + Math.floor(secsare / 60.0)).length)) + ':' + ('0' + eval(secsare % 60.0)).substring(eval(-2 + ('0' + Math.floor((secsare % 60.0))).length));
//alert(secsare + ' ' + inf.title);
}
}
}
function andthe() {
var ii=eval(1 + eval(document.getElementById('updatethisplease').value.replace('i','').replace('j','')));
next_thing='xx' + ii;
document.getElementById(next_thing).style.visibility='visible';
document.getElementById(document.getElementById('updatethisplease').value).style.backgroundColor=bcol;
setTimeout(andthe, 1000);
}
function andth() {
document.getElementById('mousei').style.visibility='hidden';
document.getElementById('mousej').style.visibility='hidden';
}
function mousebelowj(omo) {
//alert(omo.id.replace('j','i'));
document.getElementById(omo.id.replace('j','i')).style.visibility='hidden';
//alert(9000);
mbmode=true;
omo.value='When finished with Table Settings click Orange button to Play your Table Settings';
//alert(90000);
bcol='#f0f0f0';
document.getElementById('updatethisplease').value='j0';
document.getElementById(document.getElementById('updatethisplease').value).style.backgroundColor=bcol;
//alert(900000);
document.getElementById('c0').checked=true;
document.getElementById('thft').innerHTML='Via Mouse Video Click Pauses ... <br>' + 'where Click, DoubleClick for the Finish entries <br>would mean no user Karaoke part ... <br>' + document.getElementById('thft').innerHTML;
//alert(9000000);
//document.getElementById('karaoke').click();
next=0;
queuenext();
setTimeout(andth, 5000);
andthe();
//alert(90000000);
}
function mousebelowi(omo) {
//alert(900);
document.getElementById(omo.id.replace('i','j')).style.visibility='hidden';
omo.value='When finished with Table Settings click Orange button to Play your Table Settings';
document.getElementById('updatethisplease').value='i0';
bcol='#f5f5f5';
document.getElementById(document.getElementById('updatethisplease').value).style.backgroundColor=bcol;
document.getElementById('thst').innerHTML='Via Mouse Video Click Pauses ... <br>' + document.getElementById('thst').innerHTML;
document.getElementById('c0').checked=true;
//document.getElementById('karaoke').click();
mbmode=true;
next=0;
queuenext();
setTimeout(andth, 5000);
andthe();
}
function ofc(iois) {
okn=iois.value;
oko=iois;
lastokn=okn;
}
function precval(iois) {
//okn=iois.value;
oko=iois;
lastokn=okn;
if (okn.indexOf(':x') != -1) {
var cvi=okn.split(':');
if (cvi.length > 1) {
var scs=0.0, factor=1.0;
for (var ij=eval(-1 + cvi.length); ij>=0; ij--) {
if (cvi[ij] == "") cvi[ij]="00";
scs+=eval(factor * eval(cvi[ij]));
factor*=60.0;
}
okn='' + scs;
oko.value=okn;
lastokn=okn.replace(':','');
//document.title=oko.value;
//setTimeout(fixval,30);
}
}
}
function fixval() {
if (okn != '') {
oko.value=okn;
} else if (lastokn != '') {
oko.value=lastokn;
lastokn='';
} //else {
//document.title='why';
//}
}
function cval(eiois) {
if (document.URL.indexOf('i0=') == -1) {
//alert(eiois.which);
//okn+=String.fromCharCode(eiois.which || eiois.keyCode);
if ((eiois.which || eiois.keyCode) == 8) {
okn='';
} else if ((eiois.which || eiois.keyCode) == 186 || (eiois.which || eiois.keyCode) == 900000016) {
okn=okn.replace(':','') + ':';
//document.title=okn + ' ' + (eiois.which || eiois.keyCode);
var cvi=okn.split(':');
if (cvi.length > 1) {
var scs=0.0, factor=1.0;
for (var ij=eval(-1 + cvi.length); ij>=0; ij--) {
if (cvi[ij] == "") cvi[ij]="00";
scs+=eval(factor * eval(cvi[ij]));
factor*=60.0;
}
//alert(scs + ' ' + okn);
okn='' + scs;
oko.value=okn;
lastokn=okn.replace(':','');
//document.title=okn + ' ' + (eiois.which || eiois.keyCode) + ' ' + oko.value;
//setTimeout(fixval,30);
}
} else if ((eiois.which || eiois.keyCode) < 46 || (eiois.which || eiois.keyCode) > 58) {
okn=okn;
} else {
okn+=String.fromCharCode(eiois.which || eiois.keyCode);
//document.title+='=' + okn + '+' + eiois.which + ' ' + eiois.keyCode + ' ... ';
}
}
}
function checkval(iois) {
if (document.URL.indexOf('i0=') == -1) {
var cvi=iois.value.split(':');
if (cvi.length > 1) {
var scs=0.0, factor=1.0;
for (var ij=eval(-1 + cvi.length); ij>=0; ij--) {
scs+=eval(factor * eval(cvi[ij]));
factor*=60.0;
}
iois.value='' + scs;
}
addrow();
} else {
snippet=eval(iois.id.replace('i','').replace('j','').replace('c',''));
snippet++;
document.getElementById('xx' + snippet).style.visibility='visible';
}
}
function yofc(iois) {
yokn=iois.value;
yoko=iois;
ylastokn=yokn;
}
function yprecval(iois) {
//yokn=iois.value;
yoko=iois;
ylastokn=yokn;
}
function yfixval() {
if (yokn != '') {
yoko.value=yokn;
} else if (ylastokn != '') {
yoko.value=ylastokn;
ylastokn='';
}
}
function ycval(eiois) {
if (document.URL.indexOf('i0=') == -1) {
//alert(eiois.which);
//yokn+=String.fromCharCode(eiois.which || eiois.keyCode);
if ((eiois.which || eiois.keyCode) == 8) {
yokn='';
} else if ((eiois.which || eiois.keyCode) < 33 || (eiois.which || eiois.keyCode) > 126) {
yokn=yokn;
} else {
yokn+=String.fromCharCode(eiois.which || eiois.keyCode);
getytlist(yokn, false);
}
}
}
function addrow() {
var suffix='', vmode='visible';
snippet++;
var csnippet=location.search.split('c' + snippet + '=')[1] ? location.search.split('c' + snippet + '=')[1].split('&')[0] : 'off';
var isnippet=location.search.split('i' + snippet + '=')[1] ? decodeURIComponent(location.search.split('i' + snippet + '=')[1].split('&')[0]) : ' ';
var jsnippet=location.search.split('j' + snippet + '=')[1] ? decodeURIComponent(location.search.split('j' + snippet + '=')[1].split('&')[0]) : ' ';
if (isnippet == ' ' && jsnippet == ' ') {
if (defval != '') {
//alert(0);
for (var ii=1; ii<=nine; ii++) {
suffix+='<tr style=visibility:' + vmode + ';background-color:pink; id=xx' + eval(ii + snippet) + '><td><input type=checkbox id=c' + eval(ii + snippet) + ' name=c' + eval(ii + snippet) + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + eval(ii + snippet) + ' name=i' + eval(ii + snippet) + ' value=></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 id=j' + eval(ii + snippet) + ' name=j' + eval(ii + snippet) + ' step=0.000001 value=></input></td></tr>';
vmode='hidden';
}
document.getElementById(nextthing).innerHTML+='<tr id=xx0 style=background-color:pink;><td><input onclick=andth(); type=checkbox id=c' + snippet + ' name=c' + snippet + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + snippet + ' name=i' + snippet + ' value=' + defval + '></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 max=' + eval(document.getElementById('youtube_duration').value).toFixed(3) + ' id=j' + snippet + ' name=j' + snippet + ' step=0.000001 value=' + eval(document.getElementById('youtube_duration').value).toFixed(3) + '></input></td></tr>' + suffix;
} else {
//alert(90);
document.getElementById(nextthing).style.visibility='visible';
}
} else if (csnippet == 'off') {
if (defval != '') {
//alert(0);
for (var ii=1; ii<=nine; ii++) {
suffix+='<tr style=visibility:' + vmode + ';background-color:pink; id=xx' + eval(ii + snippet) + '><td><input type=checkbox id=c' + eval(ii + snippet) + ' name=c' + eval(ii + snippet) + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + eval(ii + snippet) + ' name=i' + eval(ii + snippet) + ' value=></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 id=j' + eval(ii + snippet) + ' name=j' + eval(ii + snippet) + ' step=0.000001 value=></input></td></tr>';
vmode='hidden';
}
document.getElementById(nextthing).innerHTML+='<tr id=xx0 style=background-color:pink;><td><input onclick=andth(); type=checkbox id=c' + snippet + ' name=c' + snippet + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + snippet + ' name=i' + snippet + ' value=' + isnippet + '></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 max=' + document.getElementById('youtube_duration').value + ' id=j' + snippet + ' name=j' + snippet + ' step=0.000001 value=' + jsnippet + '></input></td></tr>' + suffix;
} else {
//alert(90);
document.getElementById(nextthing).style.visibility='visible';
document.getElementById('i' + snippet).value=isnippet;
document.getElementById('j' + snippet).value=jsnippet;
}
} else {
if (defval != '') {
//alert(0);
for (var ii=1; ii<=nine; ii++) {
suffix+='<tr style=visibility:' + vmode + ';background-color:pink; id=xx' + eval(ii + snippet) + '><td><input type=checkbox id=c' + eval(ii + snippet) + ' name=c' + eval(ii + snippet) + '></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + eval(ii + snippet) + ' name=i' + eval(ii + snippet) + ' value=></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 id=j' + eval(ii + snippet) + ' name=j' + eval(ii + snippet) + ' step=0.000001 value=></input></td></tr>';
vmode='hidden';
}
document.getElementById(nextthing).innerHTML+='<tr id=xx0 style=background-color:pink;><td><input onclick=andth(); type=checkbox id=c' + snippet + ' name=c' + snippet + ' checked></input></td><td><input style=width:400px; onblur=checkval(this); type=text onmouseover=toms(this); id=i' + snippet + ' name=i' + snippet + ' value=' + isnippet + '></input></td><td><input style=width:100px; type=number onkeyup=cval(event); oninput=precval(this); onclick=ofc(this); onmouseover=toms(this); min=0 max=' + document.getElementById('youtube_duration').value + ' id=j' + snippet + ' name=j' + snippet + ' step=0.000001 value=' + jsnippet + '></input></td></tr>' + suffix;
} else {
//alert(90);
document.getElementById(nextthing).style.visibility='visible';
document.getElementById('c' + snippet).checked=true;
document.getElementById('i' + snippet).value=isnippet;
document.getElementById('j' + snippet).value=jsnippet;
}
csnippet=location.search.split('c' + eval(1 + snippet) + '=')[1] ? location.search.split('c' + eval(1 + snippet) + '=')[1].split('&')[0] : 'off';
isnippet=location.search.split('i' + eval(1 + snippet) + '=')[1] ? location.search.split('i' + eval(1 + snippet) + '=')[1].split('&')[0] : ' ';
jsnippet=location.search.split('j' + eval(1 + snippet) + '=')[1] ? location.search.split('j' + eval(1 + snippet) + '=')[1].split('&')[0] : ' ';
//alert('isnippet=' + isnippet + '*and* jsnippet=' + jsnippet + '*');
if (isnippet.trim() == '' && jsnippet.trim() == '') {
//alert('isNippet=' + isnippet + '*and* snippet=' + snippet + '*');
queuenext(); //document.getElementById('dkaraoke').click();
// alert(11);
return;
} else {
nextthing='xx' + eval(1 + snippet);
defval='';
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';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
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(11111);
emojistuff();
}
//alert('isnippet=' + isnippet + '*and* jsnippet=' + jsnippet + '*');
addrow();
// alert(111);
return;
}
}
nextthing='xx' + eval(1 + snippet);
defval='';
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';
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
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(1111);
emojistuff();
}
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);
}
}
var nosup=' ';
// alert(zeroplay);
if (zeroplay != 0 && document.getElementById('c0')) {
// alert(4);
if (!top.window) {
// alert(44);
nosup='';
}
// alert(444);
}
if (zeroplay == 0) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('hERe');
if (document.getElementById('dd' + emojisuffix + 'karaoke')) {
document.getElementById(emojisuffix + 'karaoke').click();
} else {
document.getElementById('karaoke').click();
}
} else if (nosup == '') {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('hERE');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (top.document.title.indexOf("Country ") == 0 && top.document.title.indexOf(" Quiz") != -1 && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('hERE');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (((top.document.title.indexOf("Indigenous ") == 0 && top.document.title.indexOf(" Australia") != -1) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (((top.document.title.indexOf("Health ") == 0 && top.document.title.indexOf(" Meaning") != -1) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (((top.document.title.indexOf("Dams ") == 0 && top.document.title.indexOf(" United States") != -1) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (((top.document.title.indexOf("Australian ") == 0) || (top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1)) && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (top.document.title.indexOf("Nostalgia ") == 0 && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (top.document.title.indexOf("(at least on Google Chrome)") != -1 && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (top.document.title.indexOf("Top Look") == 0 && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
} else if (top.document.title.indexOf("The Other Side of the World") == 0 && document.getElementById('c0')) {
document.getElementById('c0').checked=true;
//if (onestodo.length > 1) alert('HEre');
if (document.getElementById('ejkaraoke')) {
document.getElementById('ejkaraoke').click();
}
}
}
function nextv() {
if (thisonetodo < onestodo.length) {
ourvid=onestodo[thisonetodo];
//if (thisonetodo > 0) alert(ourvid);
document.getElementById('ajax').innerHTML='';
document.getElementById('youtubeid').value=ourvid;
document.getElementById('performance').innerHTML=ouriframe("<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></iframe>");
firstprefix="";
if (document.getElementById(emojisuffix + 'karaokeemail')) document.getElementById(emojisuffix + 'karaokeemail').value=document.getElementById('to').value;
document.getElementById('performance').style.display='block';
//if (onestodo.length > 1) {
// top.document.title+=" ; " + onestodosuffix;
// alert(eval(1000 * onestododur[thisonetodo]) + " ; " + onestodosuffix);
//}
setTimeout(showd, 200);
setTimeout(nextv, eval(1000 * onestododur[thisonetodo]));
thisonetodo++;
}
}
function yourprefix(suggestedone) {
var outsug=suggestedone, ione=1;
var lastlslook=' ';
if (window.localStorage) {
while (lastlslook != '') {
outsug=('000' + ione).slice(-3);
lastlslook=decodeURIComponent(('' + localStorage.getItem('list' + outsug))).replace(/\+/g,' ').replace(/^null$/g,'').trim();
ione++;
}
}
return outsug;
}
function dnineit() {
var allinc=true;
var wasvl=ajaxoncnt;
var sin=document.getElementById('ajaxs');
var qtitle='', commalist='', commadelim='';
for (var i=0; i<sin.options.length; i++) {
if (sin.options[i].selected) {
if (sin.options[i].value != '') {
ajaxoncnt--;
if (ajaxclist.indexOf(sin.options[i].value) == -1) { allinc=false; }
if (qtitle == '') { qtitle='&atitle=' + encodeURIComponent(('' + sin.options[i].innerText).split(' (')[0]); }
commalist+=commadelim + sin.options[i].value;
commadelim=',';
}
}
}
if (commalist != '') {
if (ajaxoncnt == 0 && allinc && wasvl != 0) {
//alert("./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + qtitle + '&alist=' + encodeURIComponent(' ' + ajaxclist + ' '));
if (ajaxf != '') {
document.getElementById('dnine').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='#myh1' title=Down>👇</a><br><iframe style='width:100%;height:800px;' id=ifnine src='./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + '&atitle=' + encodeURIComponent(ajaxf) + '&alist=' + encodeURIComponent(' ' + ajaxclist + ' ') + "'></iframe>";
} else {
document.getElementById('dnine').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='#myh1' title=Down>👇</a><br><iframe style='width:100%;height:800px;' id=ifnine src='./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + qtitle + '&alist=' + encodeURIComponent(' ' + ajaxclist + ' ') + "'></iframe>";
}
} else {
document.getElementById('dnine').innerHTML="<a style='cursor:pointer;text-decoration:none;' href='#myh1' title=Down>👇</a><br><iframe style='width:100%;height:800px;' id=ifnine src='./the_wrecking_crew.html?aprefix=" + encodeURIComponent(yourprefix('kar')) + qtitle + '&alist=' + encodeURIComponent(commalist) + "'></iframe>";
}
}
ajaxoncnt=wasvl;
}
function postputy(sin) {
var xrect;
var retval='', oneto=true;
var docbod='', docbodi=1, selbod='';
var aot,jaot=0,aotfactor=1.0,iaot,aotdur=0.0,faot=[60.0,60.0,24.0];
var kbitis=document.URL.split('#')[0].split('?')[0].split('/')[eval(-1 + document.URL.split('#')[0].split('?')[0].split('/').length)];
var utemplate='https://www.rjmprogramming.com.au/HTMLCSS/' + kbitis + '?youtubeid=SuJFdLxisPs&youtube_duration=575.621&email=&email=&emoji=on&c0=on&i0=0&j0=575.621&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=';
for (var i=0; i<sin.options.length; i++) {
if (sin.options[i].selected) {
if (sin.options[i].value != '') {
//alert(sin.options[i].value);
if (oneto) {
oneto=false;
onestodo=[];
onestododur=[];
}
aotdur=0.0;
aotfactor=1.0;
jaot=0;
aot=sin.options[i].text.split('(')[eval(-1 + sin.options[i].text.replace(')','').split('(').length)].replace(')','').split(':');
for (iaot=eval(-1 + aot.length); iaot>=0; iaot--) {
aotdur+=eval(aotfactor * aot[iaot]);
jaot++;
aotfactor *= faot[jaot];
}
if (sgive) {
document.getElementById('myh1').style.maxWidth='700px';
if (docbod == '') {
selbod='<select style="width:60px;display:inline-block;" onchange="if (this.value.length > 1 || this.value.trim().length == 1) { if (!pgive) { location.href=' + "'#' + this.value;" + ' } } else if (this.value.length == 1 && this.value.trim().length == 0) { addrecline(this.value); }" title="Focus on"><option value="">...</option></select>';
docbod='<h1>YouTube API - RJM Programming - September, 2016 <a target=_blank title="Search again" href="' + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + '">...</a> selected from "' + document.getElementById('youtubeid').value.trim() + '" below ' + selbod + '</h1><table id="myvtable" style="border:1px solid red;"><tbody><tr></tr></tbody></table>';
}
selbod=selbod.replace('</select>', '<option value="td' + docbodi + '">' + sin.options[i].text.split('(0')[0].split('(1')[0].split('(2')[0].split('(3')[0].split('(4')[0].split('(5')[0].split('(6')[0].split('(7')[0].split('(8')[0].split('(9')[0] + '</option></select>');
docbod=docbod.replace(/\<\/select\>/g, '<option value="td' + docbodi + '">' + sin.options[i].text.split('(0')[0].split('(1')[0].split('(2')[0].split('(3')[0].split('(4')[0].split('(5')[0].split('(6')[0].split('(7')[0].split('(8')[0].split('(9')[0] + '</option></select>');
document.getElementById('myh1').innerHTML=sin.options[i].text.split('(0')[0].split('(1')[0].split('(2')[0].split('(3')[0].split('(4')[0].split('(5')[0].split('(6')[0].split('(7')[0].split('(8')[0].split('(9')[0];
xrect=document.getElementById('myh1').getBoundingClientRect();
if (pgive) {
docbod=docbod.replace('</tr>', '<td id="td' + docbodi + '"><iframe id=iftd' + docbodi + ' title="' + eval(0 * xrect.height) + '" onload="ifmyh1(this,' + eval(-1 + docbodi) + ');" style="width:700px;height:85vh;" src="' + utemplate.replace('SuJFdLxisPs',sin.options[i].value).replace(/575\.621/g,'' + aotdur) + '&fixedh1h=y"></iframe>' + selbod.replace("(this.value);","('" + docbodi + "');").replace('...</option>','...</option><option value=" ">... ... Move this video over to left</option>').replace('<select ','<select id=seltd' + docbodi + ' ') + '</td></tr>');
} else {
docbod=docbod.replace('</tr>', '<td id="td' + docbodi + '"><iframe title="' + eval(0 * xrect.height) + '" onload="ifmyh1(this,' + eval(-1 + docbodi) + ');" style="width:700px;height:85vh;" src="' + utemplate.replace('SuJFdLxisPs',sin.options[i].value).replace(/575\.621/g,'' + aotdur) + '&fixedh1h=y"></iframe>' + selbod.replace("(this.value);","('" + docbodi + "');").replace('...</option>','...</option><option value=" ">... ... Move this video over to left</option>') + '</td></tr>');
}
docbodi++;
}
thisonetodo=0;
if (onestodo.length <= 1) {
if (onestodo.length == 1) {
onestodoprefix='&andthen=';
onestodosuffix=onestododur[0] + ";" + sin.options[i].value + "," + aotdur;
}
} else {
onestodosuffix+=";" + sin.options[i].value + "," + aotdur;
}
onestodo.push(sin.options[i].value);
onestododur.push(aotdur);
//alert('Expected duration for ' + sin.options[i].value + ' (' + eval(i + 1) + ') is ' + aotdur + ' seconds');
}
}
}
if (onestodo.length > 0) {
if (onestodo.length > 1) {
if (prevonestodosuffix == "") {
document.getElementById('myformdiv').innerHTML="<input type=hidden name=andthen value='" + onestodosuffix + "'></input>";
}
//top.document.title+=" ; " + onestodosuffix;
}
nextv();
}
if (docbod != '') {
retval='';
document.title="Top Look";
if (pgive) {
//docbod+=String.fromCharCode(10) + "<scr" + "ipt type='text/javascript'> " + String.fromCharCode(10);
//docbod+= "function aut() { var ifsa=document.getElementsByTagName('iframe'); for (var iaut=0; iaut<ifsa.length; iaut++) { ifsa[iaut].style.position='absolute'; ifsa[iaut].style.opacity='0.5'; ifsa[iaut].style.top='100px'; ifsa[iaut].style.left='0px'; } } " + String.fromCharCode(10) + " setTimeout(aut, 2000); " + String.fromCharCode(10);
//docbod+="</scr" + "ipt> " + String.fromCharCode(10);
docbod=docbod.replace('ifmyh1(', ' setTimeout(aut,2000); ifmyh1(');
docbod=docbod.replace('<select ', '<select id=topselbod ');
}
document.body.innerHTML=docbod;
}
return retval;
}
function givethemfifteen() {
givefifteen-=givefactor;
if (givefifteen <= 0) {
postputy(document.getElementById('ajaxs'));
} 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) {
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix), '_blank', 'left=10,top=10,width=600,height=600');
} else {
document.getElementById('performance').innerHTML=ouriframe("<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></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 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 (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>";
parent.document.getElementById('parnext' + cellnum).innerHTML="<table style=display:table-cell;><tr><td id=parnext" + eval(1 + eval('' + cellnum)) + "></td></tr></table><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>";
} else if (parent.document.getElementById('myiframe') && parent.document.getElementById('divideo')) {
parent.document.getElementById('myiframe').src=document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix);
} 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>";
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 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></tr></table></details>";
if (parent.document.getElementById('divnoresize')) {
parent.document.getElementById('divnoresize').innerHTML='xxx';
}
} else {
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix), '_blank', 'left=10,top=10,width=600,height=600');
}
} else {
window.open(document.URL.split('karaoke_')[0] + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix), '_blank', 'left=10,top=10,width=600,height=600');
}
} else {
document.getElementById('performance').innerHTML=ouriframe("<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></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; }
$.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 + " ";
}
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; }
selc=preselc + "<select" + sze + " 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] + ')';
//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] + ')';
}
} else {
console.log(tqbits[eval(-1 + tqbits.length)].substring(0,60) + ' ??? ' + tqbits[eval(-1 + tqbits.length)].slice(-60));
}
if (teqx != '') { selc=selc.replace('</select>',oncnt('<option value=' + ttqqbits + '>' + teqx + durbits + '</option></select>'));
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];
location.href='//www.rjmprogramming.com.au/HTMLCSS/' + kbitis + '?youtubeid=' + attqqbits[thisois].replace(/\+/g, '%20') + urlextra + '&youtube_duration=' + afosecs[thisois] + '&c0=on&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; 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 findduration(vidiso,vtxt) {
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('performance').innerHTML=ouriframe("<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></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);
document.getElementById('performance').innerHTML=ouriframe("<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></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 || 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) {
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');
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);
document.getElementById('performance').innerHTML=ouriframe("<iframe id='myiframe' style='z-index:-4;width:720px;height:410px;' src='" + firstprefix + "stop_start_youtube.html?vid=" + ourvid + firstsuffix + onestodoprefix + encodeURIComponent(onestodosuffix) + "'></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 queuenext() {
var which=next, thisd=0.0, more=false, thisstart=0.0, audios, somethingtodo=false;
//if (onestodo.length > 1) {
// top.document.title+=" ; " + onestodosuffix;
// alert(onestodo[1] + " ; " + onestodosuffix);
//}
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')) {
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';
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')) {
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')) {
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='visible';
document.getElementById(emojisuffix + 'karaoke').style.visibility='hidden'; //
emojistuff();
}
}
for (var i=0; i<=snippet; i++) {
if (document.getElementById('c' + i).checked) {
if (i == eval(ioffset + which)) {
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=eval(audios[0]);
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(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();
audiow=window.open('https://webaudiodemos.appspot.com/AudioRecorder/index.html', '_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(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(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(queuenext, 1000);
return;
}
}
}
lastfinish=eval(document.getElementById('j' + i).value);
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';
//alert('xx' + i);
var ndt=new Date();
//if (onestodo.length > 1) alert('HEREsz');
//alert("onestodosuffiX=" + 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);
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(queuenext, eval(1000 * thisd));
}
}
}
}
}
if (audiof != '') ioffset=-1;
if (audiof == '') ioffset=0;
if (!more) next=0;
if (!somethingtodo && audiow != null) closeaudio();
}
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='';
}
return '<table style="text-align:center;width:100%;"><tbody style="text-align:center;width:100%"><tr><td style="vertical-align:top;">' + 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") + '<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>';
}
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').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) {
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) {
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);
}
}
}
</script>
</head>
<body style='background-color: lightblue;' onunload=" closeaudio(); " onload=" if (ourvids.length > 1) { helpoutparent(); } if (document.URL.indexOf('minimize=') != -1) { document.getElementById('dstyle').innerHTML='<style> * { overflow: hidden !important; } </style>'; } preselc='<br><div id=dajaxs style=display:inline;vertical-align:top;>>1x <input onchange=putmorethanone(this.checked); type=checkbox id=cajaxs></input></div>'; if (document.URL.indexOf('nokaraoke=') != -1 || (top.document.title.indexOf('Country ') == 0 && top.document.title.indexOf(' Quiz') != -1) || top.document.title.indexOf('The Other Side of the World') == 0 || top.document.title.indexOf('(at least on Google Chrome)') != -1 || top.document.title.indexOf('Nostalgia ') == 0 || (top.document.title.indexOf('Dams ') == 0 && top.document.title.indexOf(' United States') != -1) || (top.document.title.indexOf('Health ') == 0 && top.document.title.indexOf(' Meaning') != -1) || (top.document.title.indexOf('Australian ') == 0) || (top.document.title.indexOf('Indigenous ') == 0 && top.document.title.indexOf(' Australia') != -1) || top.document.URL.indexOf('rjmprogramming.com.au/wordpress') != -1 || top.document.URL.indexOf('rjmprogramming.com.au/ITblog') != -1) { document.getElementById('myh1').innerHTML=document.getElementById('myh1').innerHTML.replace('Karaoke via ',ourvid + ' 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); } } ">
<div id=dnine></div>
<script>
var h1bit="Karaoke via ";
zeroplay=ourvid.replace('%20',' ').indexOf(' ');
if (zeroplay == 0 || document.URL.indexOf('justplay=') != -1) h1bit="Research via ";
if (document.URL.indexOf('&fixedh1h=') != -1) {
pgiveprefix='Play YouTube video to right. ';
document.write("<h1 id='myh1' style='width: 100%; height: 125px; max-height: 125px;'>" + h1bit + "YouTube API - RJM Programming - September, 2016</h1><form id='myform' style='margin-top:-15px;' action='" + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + "' method='GET'><div style='text-align:center; width: 100%;'><span>YouTube URL or <a target=_blank placeholder=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" title=\"' + pgiveprefix + 'Start again ... Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" href='" + document.URL.split('?')[0].split('#')[0] + "'>Video ID</a> or <a target=_blank title='Useful link' href='//helpdeskgeek.com/how-to/advanced-google-searching-using-search-operators/'>Search Words</a>: <input title=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" onblur=\"findduration(this,'');\" onfocus=\" if (document.URL.indexOf('&fixedh1h=') != -1 && this.value.length > 0) { pgiveit(this.value); }\" name='youtubeid' id='youtubeid' placeholder=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" type='text' value='' onkeyup='ycval(event);' oninput=yprecval(this); onclick='yofc(this);'></input> <div style='display:inline;' id='ajax'></div><div id='myspan' style='display:inline; visibility: hidden;'> Duration in seconds: <input onmouseover='toms(this);' type='text' name='youtube_duration' id='youtube_duration' value=''></input></div></span></div><input type=text onmouseover='toms(this);' style='margin-left:-9000px;' value=''></input>");
} else if (pgive) {
pgiveprefix='Play YouTube video to right. ';
document.write("<h1 id='myh1' style='text-align:center; width: 100%;'>" + h1bit + "YouTube API - RJM Programming - September, 2016</h1><form id='myform' style='margin-top:-15px;' action='" + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + "' method='GET'><div style='text-align:center; width: 100%;'><span>YouTube URL or <a target=_blank placeholder=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" title=\"' + pgiveprefix + 'Start again ... Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" href='" + document.URL.split('?')[0].split('#')[0] + "'>Video ID</a> or <a target=_blank title='Useful link' href='//helpdeskgeek.com/how-to/advanced-google-searching-using-search-operators/'>Search Words</a>: <input title=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" onblur=\"findduration(this,'');\" onfocus=\" if (document.URL.indexOf('&fixedh1h=') != -1 && this.value.length > 0) { pgiveit(this.value); }\" name='youtubeid' id='youtubeid' placeholder=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" type='text' value='' onkeyup='ycval(event);' oninput=yprecval(this); onclick='yofc(this);' style='width:450px;'></input> <div style='display:inline;' id='ajax'></div><div id='myspan' style='display:inline; visibility: hidden;'> Duration in seconds: <input onmouseover='toms(this);' type='text' name='youtube_duration' id='youtube_duration' value=''></input></div></span></div><input type=text onmouseover='toms(this);' style='margin-left:-9000px;' value=''></input>");
} else {
document.write("<h1 id='myh1' style='text-align:center; width: 100%;'>" + h1bit + "YouTube API - RJM Programming - September, 2016</h1><form id='myform' style='margin-top:-15px;' action='" + document.URL.replace('ht' + 'tp:','ht' + 'tps:').split('?')[0].split('#')[0] + "' method='GET'><div style='text-align:center; width: 100%;'><span>YouTube URL or <a target=_blank placeholder=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" title=\"' + pgiveprefix + 'Start again ... Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" href='" + document.URL.split('?')[0].split('#')[0] + "'>Video ID</a> or <a target=_blank title='Useful link' href='//helpdeskgeek.com/how-to/advanced-google-searching-using-search-operators/'>Search Words</a>: <input title=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" onblur=\"findduration(this,'');\" onfocus=\" if (document.URL.indexOf('&fixedh1h=') != -1 && this.value.length > 0) { pgiveit(this.value); }\" name='youtubeid' id='youtubeid' placeholder=\"Can use , or && for 'and' and |!!| for separated 'or' and || for 'or' search logics. Prefix && enforces in title search.\" type='text' value='' onkeyup='ycval(event);' oninput=yprecval(this); onclick='yofc(this);' style='width:450px;'></input> <div style='display:inline;' id='ajax'></div><div id='myspan' style='display:inline; visibility: hidden;'> Duration in seconds: <input onmouseover='toms(this);' type='text' name='youtube_duration' id='youtube_duration' value=''></input></div></span></div><input type=text onmouseover='toms(this);' style='margin-left:-9000px;' value=''></input>");
}
</script>
<script>
if (1 == 7 && navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.write(cbut);
}
</script>
<div id='performance' style='text-align:center; width:100%;height:410px;display:none;overflow-y:hidden;'></div>
<div id='areyousinging' style='text-align:center; width: 100%; font-size:36px; font-color='red;'></div>
<script>
if (1 == 7 && !navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
document.write(cbut);
}
</script>
<!--br><div style='text-align:center; width: 100%;'><div id='ddkaraoke' style='display:inline; visibility: hidden; '></input><input onclick="if (document.URL.indexOf('i0=') != -1) { location.href=document.URL; } " id='repeat' type='button' style='background-color:red;' value='Replay Karaoke Style YouTube Above'></input></div><div id='dkaraoke' style='display:inline; visibility: hidden; '><input id='mousej' type='button' style='background-color:#f0f0f0; display:inline; visibility: hidden;' onclick=' mousebelowj(this);' value='Fill Table Below via Mouse Video Pauses Starting with '></input><input id='mousei' type='button' style='background-color:#f5f5f5; display:inline; visibility: hidden;' onclick=' mousebelowi(this);' value='Fill Table Starting with 0 cell'></input><input id='karaoke' onclick=" mbmode=false; document.getElementById('ddkaraoke').style.visibility='visible'; if (document.URL.indexOf('i0=') != -1) { next=0; } queuenext();" type='submit' style='background-color:orange;' value='Play Karaoke Style YouTube Via Entries Below'></input></div></div-->
<div style='text-align:center; width: 100%; display:block;' id='pretrbutton'>
<script>
document.write("<div id='trbutton' style='visibility:hidden;background-color:yellow; width:100%;' ><div style=' display:table-cell; left:3%; width: 33%; height: 60px;'>" + cbutl.replace('<br>','') + "</div><div id='thst' style=' display:table-cell; left:36%; width: 33%; height: 60px;'>" + cbutm.replace('<br>','') + "</div><div style=' display:table-cell; left:69%; width: 30%; height: 60px; text-align: right;'>" + cbutr.replace('<br>','') + "</div></div>");
</script>
</div>
<table border=10 style='text-align:center; width: 100%;'>
<thead style='text-align:center; width: 100%;'>
<script>
document.write("<tr id='trrhead' style='background-color:yellow;'><th>✔ (<a target=_blank title='Thanks to https://webaudiodemos.appspot.com/AudioRecorder ... if it works for your browser. If not, you can consider using a desktop microphone recorder app such as Mac OS X QuickTime Player as an alternative perhaps.' href='https://webaudiodemos.appspot.com/AudioRecorder/index.html'>Record</a> own parts? <input onchanged='dorecord=!dorecord;' type='checkbox' name='recown' id='recown'></input>) <input onchanged='doemj=!doemj;' type='checkbox' name='emoji' id='emoji' style='visibility:hidden;' " + ech + "></input></th><th>Start time in seconds <span id=nm style='display:none;'>(negative means you will be singing or Prefix by Audio file URL or YouTube ID delimited by :)</span></th><th id='thft'>Finish</th>");
</script>
</thead>
<tbody id='mytbody' style='text-align:center; width: 100%;'>
</tbody>
</table>
<input id='conduit' type='hidden' value='-1'></input><input id='updatethisplease' type='hidden' value=''></input>
<div id='audiofiles' style='position:absolute;z-index:7;top:0;left:0;'></div>
<script>
if (onestodoprefix != "") {
document.write("<input type=hidden name=andthen value='" + onestodosuffix + "'></input>");
}
</script>
<div id='myformdiv'></div>
</form>
<form target='emailer' id=emailform style=display:none; method='POST' action='//www.rjmprogramming.com.au/HTMLCSS/legend_via_map.php'>
<input type='hidden' name=to id=to value=></input>
<input type='hidden' name=cc id=cc value=></input>
<input type='hidden' name=bcc id=bcc value=></input>
<input type='hidden' name=url id=url value=></input>
<input type='hidden' name=urlbig id=urlbig value=></input>
<input type='hidden' name=subject id=subject value='Karaoke via YouTube API and RJM Programming'></input>
<input type='submit' style=display:none; value='Email' id='sendemail'></input>
</form>
<iframe name=emailer id=emailer style=display:none; src='//www.rjmprogramming.com.au/HTMLCSS/legend_via_map.php'></iframe><div id=dstyle></div>
<div style='display:none;' id='divh1s'>
</div>
<div id=yreal></div>
</body>
</html>