Tag Archives: hash

Image Element Dynamic CSS Hashtag Sharing Tutorial

Our recent realization that “hashtag sharing” could be the alternative to our “PHP mail” exploits of the past meant that … that “proof of concept” idea we had of involving the HTML canvas sharing conduit we wanted to tell about, as yet, has not happened because our CSS filters did not flow through via the [canvasContext].drawImage functionality … was not the end of our sharing endeavours because … hashtag sharing of the image outerHTML alternative approach … … comes into play, today. We’ll see what can be done at the canvas element end regarding more “filter CSS flow through” research into the future. Meanwhile, also below see a mechanism by which users can tweak dropdown CSS styling options … function doemail() { var emailee=prompt(‘Please enter email address to share with.’, ”); if (emailee == null) { emailee=”; } if (emailee.indexOf(‘@’) != -1) { document.getElementById(‘aemail’).href=’mailto:’ + emailee + ‘?subject=Image%20Filters&body=’ + encodeURIComponent(document.URL.split(‘?’)[0].split(‘#’)[0] + ‘#image=’ + encodeURIComponent(document.getElementById(‘animg’).outerHTML)); document.getElementById(‘aemail’).click(); } } function dosms() { var emailee=prompt(‘Please enter SMS number to share with.’, ”); if (emailee == null) { emailee=”; } if (emailee != ” && emailee.trim().replace(/0/g,”).replace(/1/g,”).replace(/2/g,”).replace(/3/g,”).replace(/4/g,”).replace(/5/g,”).replace(/6/g,”).replace(/7/g,”).replace(/8/g,”).replace(/9/g,”) == ”) { document.getElementById(‘asms’).href=’sms:’ + emailee + ‘&body=’ + encodeURIComponent(document.URL.split(‘?’)[0].split(‘#’)[0] + ‘#image=’ + encodeURIComponent(document.getElementById(‘animg’).outerHTML)); document.getElementById(‘asms’).click(); } } function embellish() { var newstyling=prompt(‘Optionally change styling.’, document.getElementById(‘selopt’).innerText); if (newstyling == null) { newstyling=”; } if (newstyling != document.getElementById(‘selopt’).innerText && newstyling.indexOf(‘:’) != -1) { document.getElementById(‘selopt’).innerText=newstyling; ais=document.getElementById(‘animg’).src; document.getElementById(‘danimg’).innerHTML=”<img style=\”” + newstyling + “\” id=animg src=\”” + ais + “\”></img>”; } } And so, onto yesterday’s Image Element Dynamic CSS Primer Tutorial we have a changed second draft Image Element Dynamic CSS web application you can also try below. Previous relevant Image Element Dynamic CSS Primer Tutorial is shown below. We’re curious about something and need to start a new “proof of concept” (first draft) phase involving, at this early stage … HTML img elements … applied dynamic user selected CSS (with an emphasis on dropdown suggested filter property usage) … powered by … browsed for or image URL defined content logic Luckily we have precedents for all this, and this can be a good start! So please try our first draft Image Element Dynamic CSS web application you can also try below. Tomorrow’s work will see whether our theory comes to fruition! If this was interesting you may be interested in this too. If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Photography, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Google Geo Chart and Map Chart Hashtag SMS Tutorial

We’ve reached limits! Yes, researching for SMS sharing conduits within the macOS arrangement here, we believe for iMessage SMS messages there may be a length limit that kicks in around the 18k mark. Anyway, along the line, with SMS messaging (via hashtagging) in … Google Charts Map Chart Google Charts Geo Chart … further to the hashtag emailing in yesterday’s Google Geo Chart and Map Chart Hashtag Emailing Tutorial we ask for a mobile number to send to, and forewarn the user if we suspect it may not work, which our testing showed happens, even though the iPhone Message app declares the SMS “Delivered”, sometimes it isn’t, when the SMS messages are very long. For a few days now, there seemed to be “no limits”, and that can be an uneasy way to go about software development. It is advantageous to know what might be a problem down the track. The changes feature … Collect a method=POST (and now a method=GET) (perhaps large data set) into a potentially useful (later) PHP variable hashtag part to an “a” “mailto:” href … <?php $shto=””; $gshto=””; if (isset($_POST[‘title’])) { foreach ($_POST as $name => $val) { if (strpos($val, ‘data:’) !== false) { $fval=urlencode($val); //str_replace(” “, “%20”, str_replace(“‘”, urlencode(“‘”), str_replace(‘”‘, urlencode(‘”‘), str_replace(‘=’, urlencode(‘=’), str_replace(‘>’, urlencode(‘>’), str_replace(”), str_replace(”), str_replace(”), str_replace(‘

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Google Geo Chart and Map Chart Hashtag Emailing Tutorial

Before we got sidetracked, but along the same “where of life” themes, before the latest recent web application predilections … Earth Scanner Region Picker … we were delving into passing on work from the Google Chart‘s Map Chart to the Google Chart Geo Chart and Image Chart Map Chart more often, where we started that thread (at Google Chart Image Chart Map Chart Mainstream Primer Tutorial at the end of last year) with a three point plan (which became four point two days later) … Help itself … map.php … phase 1 Redirect to Image Chart Map Chart … map.php and/or geo_chart.php … just after first prompt … phase 2 Caller form method=POST map.php action interventions at onsubmit event … non map.php … phase 3 Transfer the onclick prompt window functionality over to geo_chart.php … phase 4 And then yesterday’s work in Earth Bearing Distance Missing Two Earth Scanner Integration Tutorial involving the Missing Two web application’s interfacing to the Google Chart Map Chart saw a more happy interfacing with this Map Chart, and reminding us with both … Google Charts Map Chart Google Charts Geo Chart … how on occasions we could have large data set scenarios relying on PHP $_POST data (via form method=POST (or you can use Ajax FormData post) arrangements) that had not passed on their data parts when the user clicked the “Email” link down the bottom. But ever since that happy discovery from around about the time of Earth Scanner Sharing Itinerary Detail Tutorial that … hashtagging … was the friend of … “a” “mailto:” and/or “sms:” link hrefs … replacing the need for … PHP mail via a local mail server methodologies … when the email body is a single link whose length was greater than about 850 (ie. no such stringent limitations with “just clientside” hashtagging (which we’re yet to know what the limit is, but it seems huge)) … and … spoiler alert … we could not break (where we do not count as broken the clicking of a “Message clipped” message link, which we always click to fully show the whole link, as a warning from your email client application (eg. Gmail)) it with any large amounts of data from our PHP Wikipedia Australian List Integration Tutorial “peer to peer” suite of linked PHP web applications passing large amounts of data to those Google Charts and emailing that on to an emailee recipient. Good news indeed! The changes feature … Collect a method=POST (perhaps large data set) into a potentially useful (later) PHP variable hashtag part to an “a” “mailto:” href … <?php $shto=””; if (isset($_POST[‘title’])) { foreach ($_POST as $name => $val) { if (strpos($val, ‘data:’) !== false) { $fval=urlencode($val); //str_replace(” “, “%20”, str_replace(“‘”, urlencode(“‘”), str_replace(‘”‘, urlencode(‘”‘), str_replace(‘=’, urlencode(‘=’), str_replace(‘>’, urlencode(‘>’), str_replace(”), str_replace(”), str_replace(”), str_replace(‘

Posted in eLearning, Event-Driven Programming, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Earth Scanner Google Chrome Speech to Text Tutorial

We’re interested in methodologies, even if they are not fully cross-browser and/or cross platform ones, if only to reassure that a concept is possible, and that applies to today’s … Google Chrome … only … non-mobile … only … https:// protocol … only … interfacing of our recent Earth Scanner web application to Google’s Web Speech API demonstration integration, further to yesterday’s Earth Scanner User Emoji Entities Tutorial. At first, reimagining how the Web Speech API worked, we remembered place names always coming out with a capitalized first letter, and so suits our requirements perfectly, but when testing the other two words we wanted to integrate … email SMS … guess what?! The email still reads as “Email” in the API. It just capitalizes starts of sentences or phrases. Game show da–dong buzzer goes here. Nevertheless, we can count on the infinite good sense of our readers and users, and know that out of their mouths we’ll only hear place names or “and” or “to” or “email” or “SMS” (coded for English, so far) and that no swear words (that aren’t place names) would ever pass their lips?! To make this integration happen, for us, involved … new HTML … <input type=hidden id=posturl style=display:none; value=””></input><input type=button id=dbutton onclick=checkforstt(); style=display:none;></input> new just after webpage onload event popup window opening of our inhouse Web Speech API interfacer … var speechtotextwo=null; var screenwidth=screen.width; if (document.URL.indexOf(‘https:’) != -1 && navigator.userAgent.toLowerCase().indexOf(‘chrome’) > -1 && !navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { speechtotextwo=window.open(‘https://www.rjmprogramming.com.au/PHP/speech_supervisor.php?mode=3’, ‘_blank’, ‘top=0,left=’ + eval(-300 + screenwidth) + ‘,width=300,height=500′); setTimeout(checkforstt, 6000); setTimeout(function(){ speechtotextwo.document.title=’Places for Earth Scanner’; }, 5000); } new timed Javascript function acting on spoken findings … var stt=”, potentialstt=”; var firststt=true, firstdone=false; function checkforstt() { var azx=null; if (document.getElementById(‘posturl’).value.trim() != ”) { if (document.getElementById(‘posturl’).value == ‘Email’) { document.getElementById(‘posturl’).value = ’email’; } if (document.getElementById(‘posturl’).value == ‘SMS’) { document.getElementById(‘posturl’).value = ‘sms’; } if (document.getElementById(‘posturl’).value.substring(0,1) == document.getElementById(‘posturl’).value.substring(0,1).toUpperCase() && document.getElementById(‘posturl’).value.substring(0,1) != document.getElementById(‘posturl’).value.substring(0,1).toLowerCase()) { if (potentialstt.indexOf(document.getElementById(‘posturl’).value) == -1) { if (potentialstt.trim() == ”) { potentialstt=document.getElementById(‘posturl’).value; } else { if ((” + potentialstt + ‘ ‘).replace(‘ and ‘, ‘ to ‘).replace(/\ to\ $/g, ”) != (” + potentialstt + ‘ ‘)) { potentialstt+=’ ‘ + document.getElementById(‘posturl’).value; } else { potentialstt+=’,’ + document.getElementById(‘posturl’).value; } } //alert(potentialstt); if ((” + potentialstt + ‘ ‘).replace(‘ and ‘, ‘ to ‘).replace(/\ to\ $/g, ”) == (” + potentialstt + ‘ ‘)) { stt=potentialstt.replace(/\ and\ /g, ‘,’).replace(/\ to\ /g, ‘-‘); if (2 == 2) { gdefv=(stt + ‘?!’).replace(/\,/g, ‘?!,’).replace(/\-/g,’?!-‘); scmok=true; movesallowed=true; gmovesallowed=true; five=5; gfive=5; dountilnoquestion(); //document.getElementById(‘myimg’).click(); //scmove(); } else { document.getElementById(‘sdurl’).value=((document.getElementById(‘sdurl’).value.split(‘#’)[0].split(‘?’)[0] + thecssarg + ((argstuff + ‘#’) == ‘#’ ? argstuff + ‘#’ : ‘#’ + argstuff.substring(1) + ‘&’) + (‘#’ + (” + stt.replace(/\ /g,’_’)).substring(0).replace(/^\%2C/g,”)).replace(/^\#$/g, ”)).replace(‘&#’, ‘&’)).replace(‘##’,’#’); //alert(‘stt=’ + stt + ‘ and ‘ + document.getElementById(‘sdurl’).value); if (document.getElementById(‘sdurl’).value.indexOf(‘#’) != -1) { location.hash=’#’ + document.getElementById(‘sdurl’).value.split(‘#’)[1]; } } } } } else if (document.getElementById(‘posturl’).value == ’email’) { potentialstt=”; stt=”; if (1 == 1) { //if (shareb) { shareb.click(); … Continue reading →

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Earth Scanner User Emoji Entities Tutorial

Recently we’ve been trying to add to the flexibility and power of the user using our recent Earth Scanner web application to tailor what it looks like and how it works via settings the user can control. Adding to this work up to yesterday’s Earth Scanner Intranet Feeling Externals Tutorial, today, we’d like to allow the user to control the look of two types of emojis used, they being … the pin emoji for place locations … and … the compass emoji in the middle of a trip leg Emojis, as we’ve said a few times now, are really useful, as that hybrid between text and graphics, for we graphically challenged, and as Internationalization aids, and clarifiers. But how are they defined. Our favourite way, of many, is via … HTML Decimal Entities … in HTML or Javascript code, but you can also use … HTML Hexadecimal Entity … in HTML or Javascript code, or … String.fromCodePoint([HTML Decimal Entity]) … in Javascript code or … CSS (selector) content property value expressed like content:’\000031\0020e3′; … ie. UTF-32 expression(s) The emoji contents, copied, within the CSS content or HTML or Javascript code, as applicable We like to look up the concept at Emojipedia. We … make initial example of Google Search (today, “Bow and Arrow emojipedia”) … leads to link to … get off Emojipedia, in its “Technical Information”, these days, the Codepoint eg. U+1F3F9 … then we just type that into an address bar … to get to a … relevant Google search … and in its list, for the more fundamental emoji arrangements we look for … relevant Fileformat.info web page … where this entity information is laid out for you … used by the Javascript of the Earth Scanner … var thepin=’&#128205;’, thecompass=’&#129517;’; … used, now in code lines like … // Pin … bmeridian+='<span class=place style=”z-index:1675;position:’ + posval + ‘;top:’ + eval(0 + eval(eval(lglat – eval(” + plotlat[iplot])) / eval(lglat – smlat) * eval(screenheight))) + ‘px;left:’ + eval(0 + eval(eval(” + plotlong[iplot]) – smlong) / eval(lglong – smlong) * eval(screenwidth)) + ‘px;” onclick=”event.stopPropagation(); woit(‘ + “‘” + plotplace[iplot].split(‘, ‘)[0] + “‘” + ‘);”>’ + thepin + ‘</span>’; // Compass … bmeridian+='<hr’ + clabit + ‘ onclick=”event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(‘ + “‘//www.google.com/maps/dir/” + encodeURIComponent(plotplace[eval(thisleg.split(‘.’)[0])]) + ‘/’ + encodeURIComponent(plotplace[eval(thisleg.split(‘.’)[1])]) + “#In a minute we will start moving the map again’,’_blank’,’top=50,left=50,width=1000,height=900′)” + ‘; canlooknow=true; alert(this.title); ” ondblclick=”event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(‘ + “‘//www.google.com/maps/dir/” + plotlat[eval(thisleg.split(‘.’)[0])] + ‘,’ + plotlong[eval(thisleg.split(‘.’)[0])] + ‘/’ + plotlat[eval(thisleg.split(‘.’)[1])] + ‘,’ + plotlong[eval(thisleg.split(‘.’)[1])] + “#In a minute we will start moving the map again’,’_blank’,’top=50,left=50,width=1000,height=900′)” + ‘; canlooknow=true; alert(this.title); ” title=”‘ + plusbit + ” + plotplace[eval(thisleg.split(‘.’)[0])] + ‘ to ‘ + plotplace[eval(thisleg.split(‘.’)[1])] + ‘ has the crow flying (‘ + gbrgtoset + ‘ degrees setting off at versus on Mercator Projection …) ‘ + eval(eval(brgtoset + 450) % 360) + ‘ degrees for ‘ + eval(gdisttoset / 1000.0) … Continue reading →

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Earth Scanner Intranet Feeling Externals Tutorial

Yesterday’s Earth Scanner Externals Tutorial left off with … HTTP://localhost:8888/newstuff.js … and if it had been called http://localhost:8888/newstuff.JS it could have persevered. … as an “Intranet feeling” idea for the styling and scripting that users can get involved with, working with our latest Earth Scanner web application. As you can imagine, to share this, in our case, local MAMP external Javascript, you can’t expect the recipient to necessarily have MAMP installed, let alone have MAMP and have your scripting and/or styling in place with its proper name. And so, to share with collaborators in this scenario, we have to convert the script URL types, as above into inline HTML script elements that will make their way into the location.hash (ie hashtagging) arrangements we’ve got going with our sharing functionalities. So here’s the thing. We perennially battle the “Intranet feeling” restrictions out there, trying HTML iframes and Ajax and PHP curl (via window.open within the Intranet realms) before settling on the non-automated but “user participation possible” idea of using the FileReader API to read the contents of the relevant external script file the user has browsed for (off their local computer system) and selected. It’s contents are held in base64 and we’re using window.atob (via our inhouse tweaked client_browsing.htm Client Browsing FileReader API interfacer) to bring it back from the decoding into the clientside wooooorrrrlllllddd. We warn here, we’ve seen flaky window.atob arrangements, and so we’ll ease into all this, starting with small amounts of scripting for now. This is wise, too, in that we don’t know yet, about the limits, even to hashtagged URLs in “a” link mailto: and sms: URLs. Our coding conduit into it all was a Javascript wrapper function also concerned with “user induced” mixed content issues … function nomc(hashttpmaybe) { var nohttp=hashttpmaybe; var ihp=0, hparts=nohttp.split(‘https://’); for (ihp=1; ihp<hparts.length; ihp++) { if (hparts[ihp].indexOf(‘localhost’) == -1) { nohttp=nohttp.replace(‘https://’ + hparts[ihp], ‘//’ + hparts[ihp]); } else if (hparts[ihp].indexOf(‘.js’) != -1) { if (scrto == ‘youllneverfindthis’) { scrto=’filescript:https://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’; nohttp=nohttp.replace(‘filescript:https://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’, ajaxit(scrto)); } else { scrfrom=’filescript:https://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’; } } else if (hparts[ihp].indexOf(‘.JS’) != -1) { if (scrto == ‘youllneverfindthis’) { scrto=’filescript:https://’ + hparts[ihp].split(‘.JS’)[0] + ‘.JS’; nohttp=nohttp.replace(‘filescript:https://’ + hparts[ihp].split(‘.JS’)[0] + ‘.JS’, ajaxit(scrto)); } else { scrfrom=’filescript:https://’ + hparts[ihp].split(‘.JS’)[0] + ‘.JS’; } } else if (hparts[ihp].indexOf(‘.css’) != -1) { if (styto == ‘youllneverfindthis’) { styto=’filecss:https://’ + hparts[ihp].split(‘.css’)[0] + ‘.css’; nohttp=nohttp.replace(‘filecss:https://’ + hparts[ihp].split(‘.css’)[0] + ‘.css’, ajaxit(styto)); } else { styfrom=’filecss:https://’ + hparts[ihp].split(‘.css’)[0] + ‘.css’; } } else if (hparts[ihp].indexOf(‘.CSS’) != -1) { if (styto == ‘youllneverfindthis’) { styto=’filecss:https://’ + hparts[ihp].split(‘.CSS’)[0] + ‘.CSS’; nohttp=nohttp.replace(‘filecss:https://’ + hparts[ihp].split(‘.CSS’)[0] + ‘.CSS’, ajaxit(styto)); } else { styfrom=’filecss:https://’ + hparts[ihp].split(‘.CSS’)[0] + ‘.CSS’; } } } hparts=nohttp.split(‘HTTPS://’); for (ihp=1; ihp<hparts.length; ihp++) { if (hparts[ihp].indexOf(‘localhost’) == -1) { nohttp=nohttp.replace(‘HTTPS://’ + hparts[ihp], ‘//’ + hparts[ihp]); } else if (hparts[ihp].indexOf(‘.js’) != -1) { if (scrto == ‘youllneverfindthis’) { scrto=’filescript:HTTPS://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’; nohttp=nohttp.replace(‘filescript:HTTPS://’ … Continue reading →

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Earth Scanner Externals Tutorial

The “externals” we’re talking about in today’s “Earth Scanner Externals Tutorial” blog posting title refer to … <style> … CSS code … </style> … (or </STYLE> for persevering) … CSS styling (then/or external CSS via URL ending with .css or .CSS (for persevering CSS)) <script> … Javascript code … </script> … (or </SCRIPT> for persevering) … Javascript coding (then/or external Javascript via URL ending with .js or .JS (for persevering Javascript)) … we’re encouraging you, as users of our current Earth Scanner, to try, to further personalize your Earth Scanner web application, should you be interested. And so, onto yesterday’s Earth Scanner Image Styling Tutorial‘s map image, only, styling functionalities, we’ve got more generic ideas to control proceedings today, resulting in a new Javascript “function processinline” called via … function processinline(zretc) { var ssss=[], jpos=-1, endtag=”, jss=0, suffis=”, prefis=”; var wasprefixingstuff=prefixingstuff; var wasdstylestuff=dstylestuff; var wasdscriptstuff=dscriptstuff; var wasexdstylestuff=exdstylestuff; var wasexdscriptstuff=exdscriptstuff; ssss=zretc.replace(/\<\/S/g, ‘</s’).split(‘</s’); if (eval(” + ssss.length) > 1) { for (jss=eval(-1 + ssss.length); jss>=1; jss–) { switch (ssss[jss].substring(0,4).toLowerCase()) { case ‘tyle’: endtag='</st’ + ‘yle>’; if (ssss[jss].substring(0,4).toLowerCase() != ssss[jss].substring(0,4)) { endtag='</sT’ + ‘YLE>’; } if (jss > 1) { jpos=eval(eval(” + zretc.indexOf(ssss[eval(-1 + jss)])) + eval(” + (ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’).length)); dstylestuff+=ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag; zretc=zretc.replace(zretc.substring(jpos).substring(0,eval(” + (ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag).length)), ”); if (document.getElementById(‘xdstylestuff’).innerHTML.indexOf(ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”)) == -1) { document.getElementById(‘xdstylestuff’).innerHTML+=ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag; //alert(endtag + ‘ … ‘ + ssss[jss].substring(0,4) + ‘ … ‘ + document.getElementById(‘xdstylestuff’).innerHTML); if (ssss[jss].substring(0,4).toLowerCase() != ssss[jss].substring(0,4)) { prefixingstuff+=ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag; //alert(prefixingstuff); } } } else { jpos=eval(eval(” + zretc.indexOf(ssss[eval(-1 + jss)])) + 0); dstylestuff+=ssss[eval(-1 + jss)] + endtag; zretc=zretc.replace(zretc.substring(jpos).substring(0,eval(” + (ssss[eval(-1 + jss)] + endtag).length)), ”); if (document.getElementById(‘xdstylestuff’).innerHTML.indexOf(ssss[eval(-1 + jss)]) == -1) { document.getElementById(‘xdstylestuff’).innerHTML+=ssss[eval(-1 + jss)] + endtag; //alert(endtag + ‘ .;. ‘ + ssss[jss].substring(0,4) + ‘ .;. ‘ + document.getElementById(‘xdstylestuff’).innerHTML); if (ssss[jss].substring(0,4).toLowerCase() != ssss[jss].substring(0,4)) { prefixingstuff+=ssss[eval(-1 + jss)] + endtag; //alert(prefixingstuff); } } } break; case ‘crip’: endtag='</sc’ + ‘ript>’; if (ssss[jss].substring(0,4).toLowerCase() != ssss[jss].substring(0,4)) { endtag='</sC’ + ‘RIPT>’; } if (jss > 1) { jpos=eval(eval(” + zretc.indexOf(ssss[eval(-1 + jss)])) + eval(” + (ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’).length)); dscriptstuff+=ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag; zretc=zretc.replace(zretc.substring(jpos).substring(0,eval(” + (ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag).length)), ”); if (document.getElementById(‘xdscriptstuff’).innerHTML.indexOf(ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”)) == -1) { document.getElementById(‘xdscriptstuff’).innerHTML+=ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag; if (ssss[jss].substring(0,4).toLowerCase() != ssss[jss].substring(0,4)) { prefixingstuff+=ssss[eval(-1 + jss)].replace(ssss[eval(-1 + jss)].split(‘>’)[0] + ‘>’, ”) + endtag; } } } else { jpos=eval(eval(” + zretc.indexOf(ssss[eval(-1 + jss)])) + 0); dscriptstuff+=ssss[eval(-1 + jss)] + endtag; zretc=zretc.replace(zretc.substring(jpos).substring(0,eval(” + (ssss[eval(-1 + jss)] + endtag).length)), ”); if (document.getElementById(‘xdscriptstuff’).innerHTML.indexOf(ssss[eval(-1 + jss)]) == -1) { document.getElementById(‘xdscriptstuff’).innerHTML+=ssss[eval(-1 + jss)] + endtag; if (ssss[jss].substring(0,4).toLowerCase() != ssss[jss].substring(0,4)) { prefixingstuff+=ssss[eval(-1 + jss)] + endtag; } } … Continue reading →

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Earth Scanner Image Styling Tutorial

Today’s improvement on yesterday’s Earth Scanner Delimitation Cover Tutorial is simple on paper … allow users to change the CSS styling of the map that is an image (img element) for our Earth Scanner … but quite involved, to make work, in practice Why? Well, we want a meaningful change, it having such big implications. And then there is the thought about whether it can or should be propagated through to any sharing or collaboration friends? Easy answer … yes. Because we cater for the nullifying of any of these image styling. And can an image styling persevere to the next web browser session? Easy answer … yes. We’ve got HTTP Cookies, or what we’ve plumped for … Window localStorage … as alternatives, to allow for perseverence on a web browser platform, of your CSS image styling, between sessions. Here are the various bits of Javascript contributing to the addition of this functionality … get argument acceptance and variable cseplocans becomes global … var earth_scanner_css=location.search.split(‘css=’)[1] ? (decodeURIComponent(location.search.split(‘css=’)[1].split(‘&’)[0]).replace(/\+/g,’ ‘)) : ”; var cseplocans=”; as used in the document.write equivalence to a usual document.body onload scenario … thecss=earth_scanner_css; if (thecss == ”) { thecss=decodeURIComponent((” + window.localStorage.getItem(‘earth_scanner_css’)).replace(/^null/g,”).replace(/^undefined/g,”)); } else if (thecss.replace(‘nocssplease’,’:’).indexOf(‘:’) != -1) { var cflds=thecss.split(‘:’); if ((” + window.localStorage.getItem(‘earth_scanner_css’)).replace(/^null/g,”).replace(/^undefined/g,”) != ”) { window.localStorage.removeItem(‘earth_scanner_css’); } if (cflds[eval(-1 + cflds.length)].trim() != ”) { window.localStorage.setItem(‘earth_scanner_css’, encodeURIComponent(thecss)); } else { thecss=”; thecssarg=”; } } if (thecss.replace(‘nocssplease’,’:’).indexOf(‘:’) == -1) { thecss=”; } else { thecssarg=’?css=’ + encodeURIComponent(thecss); processcss(thecss); } document.write(“<img src=’/HTMLCSS/HYP_50M_SR_W.jpg’ id=myimg width=” + eval(zoomf * 10800) + ” height=” + eval(zoomf * 5400) + ” style=’margin:0 0 0 0;margin-left:10px;margin-top:10px;” + thecss + “‘></img><div id=dstyle></div><input id=sdtitle type=hidden value=’Earth Scanner’></input><input id=sdtext type=hidden value=’Earth Scanner – RJM Programming’></input><input id=sdurl type=hidden value='” + document.URL.split(‘#’)[0] + (” + location.hash).replace(/^null/g,”).replace(/^undefined/g,”) + “‘></input><iframe scrolling=no farmeborder=0 style=’z-index:3456;position:fixed;top:55px;left:15px;width:30px;height:24px;’ src=’/HTMLCSS/web_share_api_test.html?emojize=128231′></iframe><input type=hidden id=itworked value=”></input><iframe onload=coordit(this); id=wif style=display:none;margin-left:50px; src=’//wikipedia.org/wiki/Saint_George,_Antigua_and_Barbuda’></iframe><iframe onload=coordittwo(this); id=wiftwo style=display:none; src=></iframe><input type=hidden id=placegeo title=” value=”></input>” + atend); start wrapping the Javascript prompt window where relevant … cseplocans=cssprompt(ourblurb, defv); in new wrapper function … function cssprompt(inb, ind) { var xretc=prompt(inb, ind); if (xretc != null) { xretc=processcss(xretc); } return xretc; } calling a new user entry analysis Javascript function … function processcss(retc) { var labels=[], ilab=0, thislab=”; if (retc.indexOf(‘;’) != -1 && retc.indexOf(‘:’) != -1) { if (eval(” + retc.indexOf(‘;’)) > eval(” + retc.indexOf(‘:’))) { thecss=”; thecssarg=”; while (eval(” + retc.indexOf(‘;’)) > eval(” + retc.indexOf(‘:’))) { thecss+=’ ‘ + retc.split(‘:’)[0].split(‘ ‘)[eval(-1 + retc.split(‘:’)[0].split(‘ ‘).length)] + ‘:’ + retc.split(retc.split(‘:’)[0].split(‘ ‘)[eval(-1 + retc.split(‘:’)[0].split(‘ ‘).length)] + ‘:’)[1].split(‘;’)[0] + ‘; ‘; labels=retc.split(‘:’)[0].split(‘ ‘)[eval(-1 + retc.split(‘:’)[0].split(‘ ‘).length)].split(‘-‘); thislab=labels[0].toLowerCase(); for (ilab=1; ilab<labels.length; ilab++) { thislab+=labels[ilab].substring(0,1).toUpperCase() + labels[ilab].substring(1).toLowerCase(); } try { undos.push(” document.getElementById(‘myimg’).style.” + thislab + “=’none’;”); eval(” document.getElementById(‘myimg’).style.” + thislab + “='” + retc.split(retc.split(‘:’)[0].split(‘ ‘)[eval(-1 + retc.split(‘:’)[0].split(‘ ‘).length)] + ‘:’)[1].split(‘;’)[0] + “‘;”); } catch(hgfjh) { } retc=retc.replace(retc.split(‘:’)[0].split(‘ ‘)[eval(-1 + retc.split(‘:’)[0].split(‘ ‘).length)] + ‘:’ + retc.split(retc.split(‘:’)[0].split(‘ ‘)[eval(-1 + retc.split(‘:’)[0].split(‘ ‘).length)] + ‘:’)[1].split(‘;’)[0] + ‘;’, ”); } if (thecss.replace(‘nocssplease’,’:’).indexOf(‘:’) != -1) { thecssarg=’?css=’ + encodeURIComponent(thecss); … Continue reading →

Posted in eLearning, Event-Driven Programming, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment