7c7
<
---
>
21d20
< var saveemoji='', expat='';
26,31d24
< var fx=0, fy=0;
< var first=true;
< var arr=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];
< var xscalestuff="Scale Width: Height:
Cropping X: Y:
Cropping Width: Height:
";
<
<
68c61
< var twothousand=2000; //4000;
---
> var twothousand=2000;
76,79c69,72
< var ConBigFontSize = "24px";
< var ProBigFontSize = "24px";
< var ConNormalFontSize = "20px";
< var ProNormalFontSize = "20px";
---
> var ConBigFontSize = "18px";
> var ProBigFontSize = "18px";
> var ConNormalFontSize = "14px";
> var ProNormalFontSize = "14px";
125,127d117
< var grd, grdf, grds;
< var scratch=null, pattern=null, scratchc=null;
<
133,146d122
< if (!String.fromCodePoint) { // thanks to http://xahlee.info/js/js_unicode_code_point.html
< // ES6 Unicode Shims 0.1 , © 2012 Steven Levithan , MIT License
< String.fromCodePoint = function fromCodePoint () {
< var chars = [], point, offset, units, i;
< for (i = 0; i < arguments.length; ++i) {
< point = arguments[i];
< offset = point - 0x10000;
< units = point > 0xFFFF ? [0xD800 + (offset >> 10), 0xDC00 + (offset & 0x3FF)] : [point];
< chars.push(String.fromCharCode.apply(null, units));
< }
< return chars.join("");
< }
< }
<
149,169d124
<
< pattern=null;
<
< if (proposed.indexOf(' ') == -1 || 1 == 1) {
< if (askidea == "Big") {
< context.shadowBlur = 1;
< context.shadowColor = "black";
< if (scratch && !pattern) {
< pattern = context.createPattern(scratch, 'repeat');
< }
< //return pattern;
< } else {
< context.shadowBlur = 2;
< context.shadowColor = "black";
< if (scratch && !pattern) {
< pattern = context.createPattern(scratch, 'repeat');
< }
< //return pattern;
< }
< }
<
307d261
< omyfih = omyfih.replace(/eisnap/g, "qeisnap");
315c269
< document.body.innerHTML = document.body.innerHTML.replace(fpc, '100%').replace(we600, 'width="' + dw + '"').replace(twp, '4' + '5%;display:none;') + "
";
---
> document.body.innerHTML = document.body.innerHTML.replace(fpc, '100%').replace(we600, 'width="' + dw + '"').replace(twp, '4' + '5%;display:none;') + "";
326,328d279
<
<
<
347,437d297
< function measureTextHeight(ctx, left, top, width, height) { // thanks to https://stackoverflow.com/questions/1134586/how-can-you-find-the-height-of-text-on-an-html-canvas
<
< // Draw the text in the specified area
< //ctx.save();
< //ctx.translate(left, top + Math.round(height * 0.8));
< //ctx.mozDrawText('gM'); // This seems like tall text... Doesn't it?
< //ctx.restore();
<
< // Get the pixel data from the canvas
< var data = ctx.getImageData(left, top, width, height).data,
< first = false,
< last = false,
< r = height,
< c = 0;
<
< // Find the last line with a non-white pixel
< while(!last && r) {
< r--;
< for(c = 0; c < width; c++) {
< if(data[r * width * 4 + c * 4 + 3]) {
< last = r;
< break;
< }
< }
< }
<
< // Find the first line with a non-white pixel
< while(r) {
< r--;
< for(c = 0; c < width; c++) {
< if(data[r * width * 4 + c * 4 + 3]) {
< first = r;
< break;
< }
< }
<
< // If we've got it then return the height
< if(first != r) return last - first;
< }
<
< // We screwed something up... What do you expect from free code?
< return 0;
< }
<
<
< function emojicodepoints() {
< if (expat != '') {
< saveemoji=prompt("Optionally use as background to circles Emoji Codepoint(s) eg. Your Answer Last Time (" + expat + ") or Australian Flag (" + String.fromCodePoint(127462) + String.fromCodePoint(127482) + ") would be 127462.127482", saveemoji);
< } else {
< saveemoji=prompt("Optionally use as background to circles Emoji Codepoint(s) eg. Australian Flag (" + String.fromCodePoint(127462) + String.fromCodePoint(127482) + ") would be 127462.127482", saveemoji);
< }
< if (saveemoji == null) { saveemoji=""; }
< if (saveemoji.trim() != "") { emojipattern(saveemoji); } else { scratch=null; }
< }
<
<
< function emojipattern(inpat) {
< if (('' + inpat) != '') {
< if (('' + inpat + ' ').substring(0,1) >= '0' && ('' + inpat + ' ').substring(0,1) <= '9') {
< inpat=eval("String.fromCodePoint(" + inpat.replace(/\./g, ") + String.fromCodePoint(") + ")");
< expat=inpat;
< scratch=document.getElementById('scratch');
< scratchc=scratch.getContext('2d');
< } else {
< scratch=document.getElementById('scratch');
< scratchc=scratch.getContext('2d');
< scratch.width=eval(24 * inpat.length);
< scratch=document.getElementById('scratch');
< scratchc=scratch.getContext('2d');
< }
< scratchc.font="24px Verdana";
< scratchc.strokeStyle='blue';
< scratchc.strokeText(inpat, 0, scratch.height); //String.fromCodePoint(127462) + String.fromCodePoint(127482), 0, scratch.height); //71);
< scratchc.stroke();
< var thi=measureTextHeight(scratchc, 0, 0, scratch.width, scratch.height); //scratchc.measureText(String.fromCodePoint(127462) + String.fromCodePoint(127482)).height;
< var twi=scratchc.measureText(inpat).width;
< //alert(thi);
< scratch=document.getElementById('scratch');
< scratchc=scratch.getContext('2d');
< //alert('' + twi + ',' + thi);
< scratch.width=twi;
< scratch.height=thi;
< scratch.style.width='' + twi + 'px';
< scratch.style.height='' + thi + 'px';
< scratchc.font="24px Verdana";
< scratchc.strokeStyle='blue';
< scratchc.strokeText(inpat, 0, scratch.height); //71);
< scratchc.stroke();
< }
< }
<
439,440d298
< saveemoji=(location.search.split('codepoints=')[1] ? decodeURIComponent(location.search.split('codepoints=')[1].split('&')[0]) : '');
< emojipattern(saveemoji);
472,473d329
< context.shadowBlur = 7;
< context.shadowColor = "black";
479,480d334
< context.shadowBlur = 7;
< context.shadowColor = "black";
492,493d345
< context.shadowBlur = 7;
< context.shadowColor = "black";
645a498
> //alert(toe.href);
651c504
< //alert(toe.href);
---
> //alert(toe.href);
655c508
< //alert(1111);
---
> //alert(1111);
720c573
< var diameters=[0], thisxpro=35, thisxcon=eval(eval('' + threehundred) + 30), thisypro=90, thisycon=90, offs, iii;
---
> var diameters=[0], thisxpro=5, thisxcon=threehundred, thisypro=90, thisycon=90, offs, iii;
748c601
< context.moveTo(20, eval(offset + 40));
---
> context.moveTo(0, eval(offset + 40));
763,764c616
< context.strokeText("Definitely",55,eval(offset + 64));
<
---
> context.strokeText("Definitely",5,eval(offset + 60));
768c620,621
< context.strokeText("Not so much",eval(threehundred + 55),eval(offset + 64));
---
> context.strokeText("Not so much",eval(threehundred + 5),eval(offset + 60));
>
772c625
< context.moveTo(20, eval(offset + 70));
---
> context.moveTo(0, eval(offset + 70));
817,821d669
< context.shadowBlur = 7;
< context.shadowColor = "black";
< if (pattern) {
< context.fillStyle = pattern;
< }
832,836d679
< context.shadowBlur = 7;
< context.shadowColor = "black";
< if (pattern) {
< context.fillStyle = pattern;
< }
844,845c687
< thisycon = eval(thisycon + 25 - (diameters[ii] * magnification / 2.0)); //+ 30);
<
---
> thisycon = eval(thisycon + 15 - (diameters[ii] * magnification / 2.0)); //+ 30);
859c701
< thisypro = eval(thisypro + 25 + (diameters[ii] * magnification / 2.0)); //+ 30);
---
> thisypro = eval(thisypro + 15 + (diameters[ii] * magnification / 2.0)); //+ 30);
881c723
< context.moveTo(20, eval(thisypro + 30));
---
> context.moveTo(0, eval(thisypro + 30));
907,911d748
< context.shadowBlur = 7;
< context.shadowColor = "black";
< if (pattern) {
< context.fillStyle = pattern;
< }
916c753
< thisypro = eval(thisypro + 100);
---
> thisypro = eval(thisypro + 60);
925c762
< context.moveTo(20, eval(thisypro + 30));
---
> context.moveTo(0, eval(thisypro + 30));
932c769
< context.moveTo(20, eval(thisycon + 30));
---
> context.moveTo(0, eval(thisycon + 30));
957,961d793
< context.shadowBlur = 7;
< context.shadowColor = "black";
< if (pattern) {
< context.fillStyle = pattern;
< }
975c807
< context.moveTo(20, eval(thisycon + 30));
---
> context.moveTo(0, eval(thisycon + 30));
982d813
< document.getElementById(q + 'eisnap').style.display = 'block';
1012,1127d842
< function emailhtmlit() {
< var pemail=prompt("Who do you want to email to? Comma separate a To emailee from optional From emailer.", document.getElementById('mylemail').value);
< if (pemail != null) {
< if (pemail.replace("fill.in.email@address", "").indexOf("@") != -1) {
< document.getElementById('mylemail').value=pemail;
< var zhr = new XMLHttpRequest();
< var zform=new FormData();
< zform.append('inline', encodeURIComponent('
'));
< if (pemail.replace(/\;/g,',').indexOf(',') != -1) {
< zform.append('to', pemail.replace(/\;/g,',').split(',')[0]);
< zform.append('bcc', pemail.replace(/\;/g,',').split(',')[1]);
< zform.append('subj', 'My Pros and Cons ... ' + topic.split('<')[0].split(String.fromCharCode(10))[0] + ' from ' + pemail.replace(/\;/g,',').split(',')[1]);
< } else {
< zform.append('to', pemail);
< zform.append('subj', 'My Pros and Cons ... ' + topic.split('<')[0].split(String.fromCharCode(10))[0]);
< }
< zform.append('tdhuhta', encodeURIComponent('
'));
< zhr.open('post', '//www.rjmprogramming.com.au/HTMLCSS/emailhtml.php', true);
< zhr.send(zform);
< }
< }
< }
<
<
< function recxy(event) {
< var isok=true;
< //if (document.getElementById('dpf')) {
< // if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('cliCk ' + wording + ' ' + bodyclick); }
< //}
< if (event.touches) { // thanks to https://stackoverflow.com/questions/24567441/how-do-i-detect-two-fingers-at-touchstart-in-javascript
< if (event.touches.length > 1) { isok=false; }
< }
< if (isok) {
< if (x == 0 && y == 0 && lastx == 0 && lasty == 0) {
<
< if (event.touches) {
< var touches1 = event.changedTouches;
< var first1 = touches1[0];
< x = first1.clientX;
< y = first1.clientY;
< } else if (event.clientX || event.clientY) {
< x = event.clientX; // - elemLeft;
< y = event.clientY; // - elemTop;
< } else {
< x = event.pageX; // - elemLeft;
< y = event.pageY; // - elemTop;
< }
< lastx=x;
< lasty=y;
< //document.title='lastx_one';
< //if (document.getElementById('dpf')) {
< // if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('Click ' + wording + ' ' + bodyclick); }
< //}
< //setTimeout(xthen, 2000);
< //setTimeout(andthen, 1000);
< } else {
<
< if (event.touches) {
< //document.title='pre lastx_2';
< var touches2 = event.changedTouches;
< var first2 = touches2[0];
< lastx=x;
< lasty=y;
< //document.title='lastx_2';
< fx = first2.clientX;
< fy = first2.clientY;
< //setTimeout(xthen, 2000);
< //setTimeout(andthen, 1000);
< } else if (event.clientX || event.clientY) {
< if (x != event.clientX || y != event.clientY) {
< lastx=x;
< lasty=y;
< //document.title='lastX_2';
< //if (document.getElementById('dpf')) {
< // if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('ClIck ' + wording + ' ' + bodyclick); }
< //}
< //setTimeout(xthen, 2000);
< //setTimeout(andthen, 1000);
< //} else {
< //document.title+=' ! ';
< }
< } else {
< if (x != event.pageX || y != event.pageY) {
< lastx=x;
< lasty=y;
< //document.title='LastX_2';
< //if (document.getElementById('dpf')) {
< // if (('' + document.getElementById('dpf').style.display).toLowerCase().indexOf('block') != -1) { alert('clicK ' + wording + ' ' + bodyclick); }
< //}
< //setTimeout(xthen, 2000);
< //setTimeout(andthen, 1000);
< //} else {
< //document.title+=' ? ';
< }
< }
<
< if (event.touches) {
< var touches3 = event.changedTouches;
< var first3 = touches3[0];
< //lastx=x;
< //lasty=y;
< x = first3.clientX;
< y = first3.clientY;
< } else if (event.clientX || event.clientY) {
< x = event.clientX; // - elemLeft;
< y = event.clientY; // - elemTop;
< } else {
< x = event.pageX; // - elemLeft;
< y = event.pageY; // - elemTop;
< }
< }
< //alert('x=' + eval(sxoff + xoff + x) + ' and y=' + y);
< }
<
< }
<
1131c846
<
---
>
1139c854
<
1201,1213d913
< document.querySelector('.readBytesButtons').addEventListener('click', function(evt) {
< alert(145);
< alert(2);
< //wnotc();
< if (evt.target.tagName.toLowerCase() == 'button') {
< var startByte = evt.target.getAttribute('data-startbyte');
< var endByte = evt.target.getAttribute('data-endbyte');
< alert(22);
< readBlob(startByte, endByte);
< alert(222);
< }
< }, false);
<
1257,1285c957,961
< var prex=-10, prey=-10, touches, first;
< if (event.touches) { // thanks to https://stackoverflow.com/questions/24567441/how-do-i-detect-two-fingers-at-touchstart-in-javascript
< if (event.touches.length > 1) {
< touches = event.changedTouches;
< first = touches[0];
< prex = first.clientX;
< prey = first.clientY;
< }
< } else if ((event.pageX || event.pageY)) {
< prex = event.pageX; // - elemLeft;
< prey = event.pageY; // - elemTop;
< } else if (1 == 1) {
< prex = event.clientX; // - elemLeft;
< prey = event.clientY; // - elemTop;
< }
< //alert('prepreclick ' + prex + ',' + prey);
< if (eval(prex) <= eval(elem.width) && eval(prey) <= eval(elem.height)) { // && allowc) {
< //alert('preclick ' + prex + ',' + prey);
< if (x == 0 && y == 0 && lastx == 0 && lasty == 0) {
< if (event.touches) { // thanks to https://stackoverflow.com/questions/24567441/how-do-i-detect-two-fingers-at-touchstart-in-javascript
< if (event.touches.length > 1) {
< touches = event.changedTouches;
< first = touches[0];
< x = first.clientX;
< y = first.clientY;
< }
< } else if (event.pageX || event.pageY) {
< x = event.pageX; // - elemLeft;
< y = event.pageY; // - elemTop;
---
> if (eval(x) <= eval(elem.width) && eval(y) <= eval(elem.height) && allowc) {
> if (x == 0 && y == 0 && lastx == 0 && lasty == 0) {
> if (event.pageX || event.pageY) {
> x = event.pageX - elemLeft;
> y = event.pageY - elemTop;
1287,1288c963,964
< x = event.clientX; // - elemLeft;
< y = event.clientY; // - elemTop;
---
> x = event.clientX - elemLeft;
> y = event.clientY - elemTop;
1296,1297c972,973
< x = event.pageX; // - elemLeft;
< y = event.pageY; // - elemTop;
---
> x = event.pageX - elemLeft;
> y = event.pageY - elemTop;
1299,1300c975,976
< x = event.clientX; // - elemLeft;
< y = event.clientY; // - elemTop;
---
> x = event.clientX - elemLeft;
> y = event.clientY - elemTop;
1304c980
< //alert('click ' + x + ',' + y);
---
> //alert('click');
1335,1336d1010
<
<