Further to yesterday’s Autumn Leaves One Image Webpage Tutorial another discovery in the category of “generic issue” (and so moves up priority lists around here) was the discovery that …
the optional audio playing functionality of One Image Webpage ideas around here worked on non-mobile via HTML webpages (calling an *.mp3 iframe URL) or a *.mp3 URL as the destination href attribute of an “a” link encompassing the image img elements … but …
these same programmatical approaches do not “cut the mustard” on mobile platforms, where, to play media, the user needs to tap (with a real non-programmatical gesture) the media element
… and so we needed a “generic makeover”. Luckily we had an external Javascript called onrightclick.js called on every One Image Webpage we could call upon as a good place to affect all the behaviour of all these webpages, as per …
function audiolook() {
var ifsare=document.getElementsByTagName('a');
if (eval('' + ifsare.length) > 0) {
// alert(ifsare[eval(-1 + ifsare.length)].href);
if (ifsare[eval(-1 + ifsare.length)].href.slice(-4) == '.mp3') {
//document.title='' + ifsare[eval(-1 + ifsare.length)].href;
var parisis=null, parisisx=null;
if (window.opener) {
parisis=window.opener;
if (parisis.document.getElementById('xxsource')) {
parisisx=parisis.document.getElementById('xxsource');
}
}
if (parisisx) {
if (parisisx.src != ifsare[eval(-1 + ifsare.length)].href) {
if (6 == 8) { parisisx.src=ifsare[eval(-1 + ifsare.length)].href; }
}
var ifzsare=parisis.document.getElementsByTagName('a');
if (eval('' + ifzsare.length) > 0) {
if (ifzsare[eval(-1 + ifzsare.length)].href.slice(-4) == '.mp3') {
if (ifzsare[eval(-1 + ifzsare.length)].href != ifsare[eval(-1 + ifsare.length)].href) {
if (6 == 8) { ifzsare[eval(-1 + ifzsare.length)].href=ifsare[eval(-1 + ifsare.length)].href; }
}
}
}
} else if (document.getElementById('xxsource')) {
if (document.getElementById('xxsource').src != ifsare[eval(-1 + ifsare.length)].href) {
if (6 == 8) { document.getElementById('xxsource').src=ifsare[eval(-1 + ifsare.length)].href; }
}
} else if (!document.getElementById('xxsource')) {
var firsta=ifsare[eval(-1 + ifsare.length)].href.split('/')[eval(-1 + ifsare[eval(-1 + ifsare.length)].href.split('/').length)].split('.')[0];
document.body.innerHTML+='<audio id=xxaudio onclick="this.style.left=0; this.style.opacity=0.5; this.autoplay=true; ; if (document.getElementById(' + "'thedivlink'" + ')) { document.getElementById(' + "'thedivlink'" + ').style.marginLeft=' + "'120px'" + '; } " controls style="opacity:1.0;z-index:8976;position:fixed;left:' + eval(-120 + eval('' + window.innerWidth)) + 'px;top:-20px;height:60px;\" loop><source id=xxsource type=audio/mp3 src="' + ifsare[eval(-1 + ifsare.length)].href.replace(firsta,'all') + '"></source></audio>';
}
}
}
}
setTimeout(doacheck, 100);
if (navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) {
setTimeout(function(){
document.ontouchend=function(e){
if (document.URL.replace('/wordpress','/ITblog').indexOf('/ITblog') != -1) {
lastsp=eval(e.touches.length);
}
if (eval('' + e.touches.length) >l= 1) {
if (document.URL.replace('/wordpress','/ITblog').indexOf('/ITblog') == -1) {
onrightclickask();
} else if (e.touches[0].target.outerHTML.split('>')[0].indexOf('<img ') == 0 && e.touches[0].target.outerHTML.split('>')[0].indexOf(' tabindex=') != -1) {
onrightclickask(); //document.title=':' + e.touches[0].target.outerHTML.split('>')[0].substring(1);
}
}
};
}, 4000);
setTimeout(function(){
var ifsare=document.getElementsByTagName('a');
if (eval('' + ifsare.length) > 0) {
// alert(ifsare[eval(-1 + ifsare.length)].href);
if (ifsare[eval(-1 + ifsare.length)].href.slice(-4) == '.mp3') {
//document.title='' + ifsare[eval(-1 + ifsare.length)].href;
var parisis=null, parisisx=null;
if (window.opener) {
parisis=window.opener;
if (parisis.document.getElementById('xxsource')) {
parisisx=parisis.document.getElementById('xxsource');
}
}
if (parisisx) {
if (parisisx.src != ifsare[eval(-1 + ifsare.length)].href) {
if (6 == 8) { parisisx.src=ifsare[eval(-1 + ifsare.length)].href; }
}
var ifzsare=parisis.document.getElementsByTagName('a');
if (eval('' + ifzsare.length) > 0) {
if (ifzsare[eval(-1 + ifzsare.length)].href.slice(-4) == '.mp3') {
if (ifzsare[eval(-1 + ifzsare.length)].href != ifsare[eval(-1 + ifsare.length)].href) {
if (6 == 8) { ifzsare[eval(-1 + ifzsare.length)].href=ifsare[eval(-1 + ifsare.length)].href; }
}
}
}
} else if (document.getElementById('xxsource')) {
if (document.getElementById('xxsource').src != ifsare[eval(-1 + ifsare.length)].href) {
if (6 == 8) { document.getElementById('xxsource').src=ifsare[eval(-1 + ifsare.length)].href; }
}
} else if (!document.getElementById('xxsource')) {
var firsta=ifsare[eval(-1 + ifsare.length)].href.split('/')[eval(-1 + ifsare[eval(-1 + ifsare.length)].href.split('/').length)].split('.')[0];
document.body.innerHTML+='<audio id=xxaudio onclick="this.style.left=0; this.style.opacity=0.5; this.autoplay=true; if (document.getElementById(' + "'thedivlink'" + ')) { document.getElementById(' + "'thedivlink'" + ').style.marginLeft=' + "'120px'" + '; } " controls style="opacity:1.0;z-index:8976;position:fixed;left:' + eval(-120 + eval('' + window.innerWidth)) + 'px;top:-20px;height:60px;" loop><source id=xxsource type=audio/mp3 src="' + ifsare[eval(-1 + ifsare.length)].href.replace(firsta,'all') + '"></source></audio>';
setInterval(audiolook, 10000);
}
}
}
}, 1500);
}
… because, that is very much the go around here in the Blue Mountains in those coniferous tree areas. The colours are very vibrant!
What have we noticed changing? Well, the iPhone outputs IMG_[0-9]*.HEIC images these days for full sized images, rather than DSC_[0-9]*.JPEG, like the way it used to be for the same full sized images back when we last tried to create a One Image Webpage website. We decided to convert HEIC to JPEG and found both Ffmpeg or ImageMagick, on a Windows command line, could attempt it, but Ffmpeg had an issue, and so, the Windows (ImageMagick) command …
for %i in (*.HEIC) do magick "%i" "%~ni.jpg"
… ended up suiting our purposes.
And what was the transferring from iPhone to macOS MacBook Air (for this part of the work) methodology?
iPhone Camera app takes photo …
each stored in iPhone Photos app …
use iPhone Photos app Sharing link … to …
tap AirDrop option (which, in Apple woooorrrrllllddd is the best go for these “too large for Mail attachments” amounts of data) …
tap MacBook Air as the recipient (which, even out and about, and only lassooing MacBook Air to iPhone’s Hot Spot as a connection, worked (and was very fast)) … which …
copies images (as is in *.HEIC format) from iPhone to MacBook Air
… retiring the iPhone, optionally, from any further involvement creating Autumn Leaves One Image Webpage website.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
… because, that is very much the go around here in the Blue Mountains in those coniferous tree areas. The colours are very vibrant!
What have we noticed changing? Well, the iPhone outputs IMG_[0-9]*.HEIC images these days for full sized images, rather than DSC_[0-9]*.JPEG, like the way it used to be for the same full sized images back when we last tried to create a One Image Webpage website. We decided to convert HEIC to JPEG and found both Ffmpeg or ImageMagick, on a Windows command line, could attempt it, but Ffmpeg had an issue, and so, the Windows (ImageMagick) command …
for %i in (*.HEIC) do magick "%i" "%~ni.jpg"
… ended up suiting our purposes.
And what was the transferring from iPhone to macOS MacBook Air (for this part of the work) methodology?
iPhone Camera app takes photo …
each stored in iPhone Photos app …
use iPhone Photos app Sharing link … to …
tap AirDrop option (which, in Apple woooorrrrllllddd is the best go for these “too large for Mail attachments” amounts of data) …
tap MacBook Air as the recipient (which, even out and about, and only lassooing MacBook Air to iPhone’s Hot Spot as a connection, worked (and was very fast)) … which …
copies images (as is in *.HEIC format) from iPhone to MacBook Air
… retiring the iPhone, optionally, from any further involvement creating Autumn Leaves One Image Webpage website.
If this was interesting you may be interested in this too.
… can be used to manage Windows firewall settings Microsoft Defender will be defending, especially the Windows desktop applications you allow through the firewall that would, as a default, refuse. We had this happening on our Windows laptop involving the FileZilla sftp manager of file transferring to and from a public website … the one you are reading from.
A firewall is a security device, or network security system, designed to protect a secure internal network from other networks, by the means to control the incoming and outgoing network traffic, via a rule set (in a similar way to how some email systems allow the user to write their own rules, to control the flow of emails into their email client mailboxes).
Today, with our slideshow example, we imagine, on a Windows 7 laptop, that you want to block (or ban) the network traffic from a nominated IP address (or range of IP addresses).
This kind of control can perhaps protect the computer network “behind” the firewall from some sort of scamming operation.
This would be of pretty obvious interest to system administrators and network administrators charged with protecting the integrity of their network arrangements.
The way to access the firewall functionality in Windows has been pretty fluid over the various versions of the Windows operating system, but the one we gravitate towards, as a generic piece of advice, is to …
get to a Windows Command Line prompt … and … type …
firewall.cpl
The firewall in Windows 7, at least, also appears in Control Panel as “Windows Firewall” … mainly because it would be pretty obtuse to say “Fenestra Firewall” (though it sounds like a good movie).
Sometimes the firewall duties for a Windows laptop, for instance, are taken on by the Virus Protection software you have installed, perhaps. For instance, the Norton by Symantec software called Internet Security offers up its own Windows Firewall as an option for use, that will supercede any Windows Firewall arrangements that come with an install of the Windows operating system.
So please take a look at our slideshow showing you the blocking of our mythical 48.xx.xxx.xx IP address using Windows Firewall.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
The personal computer world has been fed the line for years that Apple Mac OS X (or macOS) is more secure than Microsoft Windows, but is this true? Have a read of this interesting article for more in this regard.
Whether the sentiment is true or not, must say the simple Avast Security virus protection arrangement I have for this MacBook Pro does not fill me with the anxiety the virus protection on Windows, so front and centre does. But maybe that is just delusion on my part. Anyhow, with Windows, though all this remains very front and centre stil lwith Windows 10, it is far less disorganized feeling, where years ago third party software was the only place to go. You can still …
use third party software to manage virus control (as we show with the previous Windows Virus Protection Primer Tutorial) … but Microsoft’s Microsoft Defender application will tell you so and work with that … whereas you can …
use Microsoft’s Microsoft Defender application on its own to manage virus protection
… meaning that there is a “one stop shop” for finding out about the security controls in place for a Windows 10 personal computer or laptop. Much less “wild west” feeling.
As such, today, we take a stream of consciousness tour of Microsoft Defender to show you today, screenshotted on a Windows 10 personal computer.
Hope you can see that “all in one place” can have its benefits.
Windows users will almost always have considered the issue of Virus protection. The term “Virus Protection” encompasses, for many of us, so much more these days. Terminology that springs to mind with regards to that general concept of “protecting your computer from harmful software” could be …
when using the Animated GIF creator on a local web server (eg. MAMP) we just prefix the slide textbox Dropped full file specification by …
file://
… and … voila … it works … whereas …
when using the Animated GIF creator on a public web server and this incarnation can find a deployed local web server (eg. MAMP) Animated GIF creator ( in that equivalent Document Root subfolder PHP and then subsubfolder animegif ) we just prefix the slide textbox Dropped full file specification by …
file://
… and allow the user to decide whether, on completion of their slide definitions, call that local web server incarnation before they click their relevant form submit button …
<?php echo ”
var uplat='' + navigator.platform;
var allowlocalanswered=false, allowlocal=false;
function maybemore(tval, tid, tis) {
var oldtval=tval;
if (('' + tval.length) != '0') {
//alert(tval);
if (tval.indexOf(preftotest) == 0) {
tval=tval.replace(preftotest, suftotest).replace(/\\\\/g,'/');
setTimeout(latermaybemore, 3000);
} else if (tval.indexOf('file:') != 0 && tval.replace(/^[A-Z][a-z]\:/g,'').indexOf('//') == -1 && (tval.replace(/^[A-Z][a-z]\:/g,'') + '%%').substring(1).substring(0,1) != (tval.replace(/^[A-Z][a-z]\:/g,'') + '%%').substring(0,1) && (tval.replace(/^[A-Z][a-z]\:/g,'') + '%%').substring(0,1).replace(String.fromCharCode(92),String.fromCharCode(47)) == '/' && document.URL.indexOf('/localhost') != -1) {
tval='file://' + tval;
setTimeout(latermaybemore, 3000);
} else if (document.URL.indexOf('/localhost') == -1 && (tval.indexOf('file:') == 0 || tval.indexOf('file:') != 0 && tval.replace(/^[A-Z][a-z]\:/g,'').indexOf('//') == -1 && (tval.replace(/^[A-Z][a-z]\:/g,'') + '%%').substring(1).substring(0,1) != (tval.replace(/^[A-Z][a-z]\:/g,'') + '%%').substring(0,1) && (tval.replace(/^[A-Z][a-z]\:/g,'') + '%%').substring(0,1).replace(String.fromCharCode(92),String.fromCharCode(47)) == '/')) {
if (tval.indexOf('file:') != 0) {
tval='file://' + tval;
}
if (!allowlocalanswered) {
allowlocalanswered=true;
allowlocal=confirm('We can only make this work if when submitting we redirect the processing to a tutorial_to_animated_gif.php similarly set up on a local web server ( ie. in a folder off Document Root called PHP and off that a folder called animegif ), like MAMP. If all this is fine, and there are going to be no data URIs as slide contents, answer OK. You may need to click that local web server web application similar submit button to start creating your animated GIF.');
if (allowlocal) {
uplaturl=(uplaturl + '&').replace('delay=' + (uplaturl + '&').split('delay=')[1].split('&')[0] + '&','delay=' + encodeURIComponent(document.getElementById('delay').value) + '&').replace('&&','&').replace(/\&$/g,'');
//document.getElementById('myform').target='_blank';
//document.getElementById('myform').method='GET';
//document.getElementById('myform').action=uplaturl.split('?')[0];
}
}
if (allowlocal) {
if (tid.replace(/^slideshow0$/g,'slideshow').replace(/^slideshow1$/g,'slideshow') == 'slideshow') {
uplaturl=(uplaturl + '&').replace('slideshow=' + (uplaturl + '&').split('slideshow=')[1].split('&')[0] + '&','slideshow=' + encodeURIComponent('file://' + tval.replace(/^file\:\/\//g,'') + '&')).replace('&&','&').replace(/\&$/g,'');
} else {
uplaturl+='&slideshow' + tid.replace('slideshow','') + '=' + encodeURIComponent('file://' + tval.replace(/^file\:\/\//g,''));
//alert(uplaturl);
if (confirm('Was this the last animated GIF slide?')) {
window.open(uplaturl + '&title=' + encodeURIComponent(document.getElementById('stitle').value),'_blank','top=100,left=30,width=' + eval(-60 + screen.width) + ',height=800');
}
}
}
setTimeout(latermaybemore, 3000);
}
// more Javascript code follows
}
“; ?>”
… and voila … that can work too!
Again, there could be tweaking, but, feel free to try it out, if you like with …
paste it in as text (at an animated GIF slide textbox, that is) … or, as of today …
paste it in as graphical content via the inhouse Client Browsing (and now “Pasting”) web application’s iframe element hosted span contenteditable=true onpaste and onblur event savvy new inclusion into the mix
function dragstart(ev) { // thanks to https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop
lastelem=ev.target;
if (('' + ev.target.outerHTML).indexOf('<span ') == 0) { // thanks to https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/setData
// Change the source element's background color
// to show that drag has started
ev.currentTarget.classList.add("dragging");
// Clear the drag data cache (for all formats/types)
ev.dataTransfer.clearData();
// Set the drag's format and data.
// Use the event target's id for the data
ev.dataTransfer.setData("text/uri-list", ev.target.id); //"image/png", ev.target.innerHTML);
//ev.dataTransfer.setData(
// "text/uri-list",
// ev.target.ownerDocument.location.href
//);
} else {
ev.dataTransfer.setData("text/plain", '');
}
}
… that being the inhouse Animated GIF Creator and its interfacings, in turn, to the inhouse Client Browsing (and now “Pasting”) web application, so that as far as slideshow image defining goes you can …
type it in …
browse it in …
paste it in as text (at an animated GIF slide textbox, that is) … or, as of today …
paste it in as graphical content via the inhouse Client Browsing (and now “Pasting”) web application’s iframe element hosted span contenteditable=true onpaste and onblur event savvy new inclusion into the mix
We reserve the right to tweak, but, feel free to try it out, if you like with …
yesterday’s “standalone” incarnation of our now potentially dual purpose “browsing and pasting” inhouse client browsing web application … to, today …
“called upon” incarnation of our inhouse client browsing web application
… and, as we suspected, today’s first look was pretty salutary in proving “no one paradigm size fits all” with the number of scenarios a “called upon” incarnation of our inhouse client browsing web application can throw up.
Where we think the inhouse client browsing web application for this new “paste” functionality can flourish can be via what we like to call “client pre-emptive iframe” Javascript logic back at the caller, where we extend the code for that HTML iframe’s onload event …
var twaconto=null, twacontoiurl=null, twacontojurl=null;
today, our inhouse client browsing web application, in standalone mode … and then …
tomorrow and on, our inhouse client browsing web application, being called upon
… so that, as far as Image data goes, this inhouse client browsing web application is dual purpose, the user able to …
click a button to go file browsing for that (Image) file … or, for example …
mobile device
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse client browsing (and, now, image copy pasting) web application … with one new HTML span contenteditable=true onpaste and onblur savvy …
<span title=""Image copy paste here." onclick="csclick=0; setTimeout(csc,20000); event.stopPropagation();" onblur="youruplit(this,1);" onpaste="youruplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span>
… element …
click on that new span element …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='', dlm='"', copyspans='', gij=0;
var zcontent=[], zfilename='', zoptions=null, csclick=-1;
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
take a photograph via mobile device Camera app … and it being iOS iPhone …
via Photos app hover over relevant image and tap Copy option … and it being iOS iPhone with a MacBook Air of the same network nearby …
be in a web browser starting up our inhouse canvas annotation helper web application … with two new HTML span contenteditable=true onpaste and onblur savvy …
<span title="Image copy Paste here to populate canvas fitting in." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopycheck" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 🖼️</span> <span title="Image copy Paste here to populate canvas resizing." onclick="event.stopPropagation();" onblur="myuplit(this,1);" onpaste="myuplit(this,0);" contenteditable="true" id="imgcopychecken" style="border:2px dotted red;width:50px;height:25px;display:inline-block;">⬆️ 📈</span>
… elements …
click on the one of interest regarding image sizing …
Edit->Paste (or command-V) … accesses the great Apple Universal Clipboard functionality …
var yehbutisob=false, xcelem=null, xccontext=null, xcimg=null, within=false, mydivo=null, origh=-1, origw=-1, altdu='';
function iftoolarge(zimg,zw,zh) {
var zcanvas = document.createElement('canvas');
zcanvas.width = zw;
zcanvas.height = zh;
var zctx = zcanvas.getContext('2d');
zctx.drawImage(zimg, 0, 0);
// Get JPG as Data URL (quality 0.9)
altdu=zcanvas.toDataURL("image/jpeg", 0.1);
Yes, if an iPhone is connected to a MacBook Air—or even just nearby—the copy buffer (clipboard) of the iPhone can be transferred to the copy buffer of the MacBook Air. Apple calls this feature Universal Clipboard.
It allows you to copy text, images, photos, and videos on your iPhone and instantly paste them onto your Mac (or vice versa).
Cute, huh?! If on the same network, and close, the iPhone and MacBook Air do not even need an Apple White Lead connection, necessarily, though we noticed it sped up the process!
Given the “smarts” at this end, today, we turned to …
… as a solution to massive image png copy buffers coming off the camera being fed into an HTML5 canvas and out as a reduced size jpeg image to allow PHP $_POST methodologies used for the uploading process not be overwhelmed, as per the adjusted Ajax code …
One Image Website Onpaste Uploading Hashtagging Tutorial
You guessed it! Yesterday’s One Image Website Onpaste Uploading Tutorial‘s work was working just within the realms of those “first webpages” occurring within the “One Image Website” project paradigm, but that we needed to pass onto subsequent webpages this “new image uploaded” list as ….
hashtagged data … but also …
argumented data (ie. ? and & arguments) for those “first webpages” occurring within the “One Image Website” project paradigm …
… the reason being that document.referrer cannot be used to glean hashtagged data. Luckily in this project that second requirement above, which asks for a true document reload, is not the end of the woooorrrrllllddd, as we know it, and means we can get help from the external Javascript we use in these projects, as per …
… is sensitive here, and for the most part, is moved to above the “inline Javascript” loading within the head webpage element, to help make all this idea function, all the way back from changes to inline Javascript parts to the initialization code of (our Guinea Pig) “first webpage” occurring within the “One Image Website” project paradigm …
var image_index = 0;
var number_of_image = 0;
var myxhr=null, formis=null;
var ipuvalid=true, ipis='', lhend='', lhdata='';
var fetchcmd="./index.php?diris=images&prefixis=DSC_0&startsuffix=279&endsuffix=364";
// Thanks to https://stackoverflow.com/questions/74997800/how-to-code-a-synchronous-wrapper-for-jquery-ajax-functions
(async () => {
setTimeout(function(){
image_list[image_index++] = new imageItem('images/DSC_0279.jpg');
image_list[image_index++] = new imageItem('images/DSC_0280.jpg');
image_list[image_index++] = new imageItem('images/DSC_0281.jpg');
image_list[image_index++] = new imageItem('images/DSC_0282.jpg');
image_list[image_index++] = new imageItem('images/DSC_0283.jpg');
image_list[image_index++] = new imageItem('images/DSC_0284.jpg');
image_list[image_index++] = new imageItem('images/DSC_0285.jpg');
image_list[image_index++] = new imageItem('images/DSC_0286.jpg');
image_list[image_index++] = new imageItem('images/DSC_0287.jpg');
image_list[image_index++] = new imageItem('images/DSC_0288.jpg');
image_list[image_index++] = new imageItem('images/DSC_0289.jpg');
image_list[image_index++] = new imageItem('images/DSC_0290.jpg');
image_list[image_index++] = new imageItem('images/DSC_0291.jpg');
image_list[image_index++] = new imageItem('images/DSC_0292.jpg');
image_list[image_index++] = new imageItem('images/DSC_0293.jpg');
image_list[image_index++] = new imageItem('images/DSC_0294.jpg');
image_list[image_index++] = new imageItem('images/DSC_0295.jpg');
image_list[image_index++] = new imageItem('images/DSC_0296.jpg');
image_list[image_index++] = new imageItem('images/DSC_0297.jpg');
image_list[image_index++] = new imageItem('images/DSC_0298.jpg');
image_list[image_index++] = new imageItem('images/DSC_0299.jpg');
image_list[image_index++] = new imageItem('images/DSC_0300.jpg');
image_list[image_index++] = new imageItem('images/DSC_0301.jpg');
image_list[image_index++] = new imageItem('images/DSC_0302.jpg');
image_list[image_index++] = new imageItem('images/DSC_0303.jpg');
image_list[image_index++] = new imageItem('images/DSC_0304.jpg');
image_list[image_index++] = new imageItem('images/DSC_0305.jpg');
image_list[image_index++] = new imageItem('images/DSC_0306.jpg');
image_list[image_index++] = new imageItem('images/DSC_0307.jpg');
image_list[image_index++] = new imageItem('images/DSC_0308.jpg');
image_list[image_index++] = new imageItem('images/DSC_0309.jpg');
image_list[image_index++] = new imageItem('images/DSC_0310.jpg');
image_list[image_index++] = new imageItem('images/DSC_0311.jpg');
image_list[image_index++] = new imageItem('images/DSC_0312.jpg');
image_list[image_index++] = new imageItem('images/DSC_0313.jpg');
image_list[image_index++] = new imageItem('images/DSC_0314.jpg');
image_list[image_index++] = new imageItem('images/DSC_0315.jpg');
image_list[image_index++] = new imageItem('images/DSC_0316.jpg');
image_list[image_index++] = new imageItem('images/DSC_0317.jpg');
image_list[image_index++] = new imageItem('images/DSC_0318.jpg');
image_list[image_index++] = new imageItem('images/DSC_0319.jpg');
image_list[image_index++] = new imageItem('images/DSC_0320.jpg');
image_list[image_index++] = new imageItem('images/DSC_0321.jpg');
image_list[image_index++] = new imageItem('images/DSC_0322.jpg');
image_list[image_index++] = new imageItem('images/DSC_0323.jpg');
image_list[image_index++] = new imageItem('images/DSC_0324.jpg');
image_list[image_index++] = new imageItem('images/DSC_0325.jpg');
image_list[image_index++] = new imageItem('images/DSC_0326.jpg');
image_list[image_index++] = new imageItem('images/DSC_0327.jpg');
image_list[image_index++] = new imageItem('images/DSC_0328.jpg');
image_list[image_index++] = new imageItem('images/DSC_0329.jpg');
image_list[image_index++] = new imageItem('images/DSC_0330.jpg');
image_list[image_index++] = new imageItem('images/DSC_0331.jpg');
image_list[image_index++] = new imageItem('images/DSC_0332.jpg');
image_list[image_index++] = new imageItem('images/DSC_0333.jpg');
image_list[image_index++] = new imageItem('images/DSC_0334.jpg');
image_list[image_index++] = new imageItem('images/DSC_0335.jpg');
image_list[image_index++] = new imageItem('images/DSC_0336.jpg');
image_list[image_index++] = new imageItem('images/DSC_0337.jpg');
image_list[image_index++] = new imageItem('images/DSC_0338.jpg');
image_list[image_index++] = new imageItem('images/DSC_0339.jpg');
image_list[image_index++] = new imageItem('images/DSC_0340.jpg');
image_list[image_index++] = new imageItem('images/DSC_0341.jpg');
image_list[image_index++] = new imageItem('images/DSC_0342.jpg');
image_list[image_index++] = new imageItem('images/DSC_0343.jpg');
image_list[image_index++] = new imageItem('images/DSC_0344.jpg');
image_list[image_index++] = new imageItem('images/DSC_0345.jpg');
image_list[image_index++] = new imageItem('images/DSC_0346.jpg');
image_list[image_index++] = new imageItem('images/DSC_0347.jpg');
image_list[image_index++] = new imageItem('images/DSC_0348.jpg');
image_list[image_index++] = new imageItem('images/DSC_0349.jpg');
image_list[image_index++] = new imageItem('images/DSC_0350.jpg');
image_list[image_index++] = new imageItem('images/DSC_0351.jpg');
image_list[image_index++] = new imageItem('images/DSC_0352.jpg');
image_list[image_index++] = new imageItem('images/DSC_0353.jpg');
image_list[image_index++] = new imageItem('images/DSC_0354.jpg');
image_list[image_index++] = new imageItem('images/DSC_0355.jpg');
image_list[image_index++] = new imageItem('images/DSC_0356.jpg');
image_list[image_index++] = new imageItem('images/DSC_0357.jpg');
image_list[image_index++] = new imageItem('images/DSC_0358.jpg');
image_list[image_index++] = new imageItem('images/DSC_0359.jpg');
image_list[image_index++] = new imageItem('images/DSC_0360.jpg');
image_list[image_index++] = new imageItem('images/DSC_0361.jpg');
image_list[image_index++] = new imageItem('images/DSC_0362.jpg');
image_list[image_index++] = new imageItem('images/DSC_0363.jpg');
image_list[image_index++] = new imageItem('images/DSC_0364.jpg');
The onpaste event referencing work of the recent Using Document Writeln Onpaste Tutorial set us to thinking about the unwieldy nature of our “One Image Website” series of photographic projects ability to, on the fly, these days …
take a new relevant photograph (on an iPhone, for instance) … and then easily …
get some functionality on the “One Image Websites” (our Guinea Pig, here, being our Street Art project) to accept either …
graphical image Copy into buffer via some Edit->Select All, Edit->Copy (eg. within an Image Editor desktop application) (combination) option Edit->Pasted into a new HTML span contenteditable=true onpaste and onblur savvy events “uploading” helper … or …
right click at first webpage (of one of these “One Image Website” projects) to get to a prompt window that can accept a data URI the likes of which Google Image Search (say, of “clipart”)->right click->Copy Image Address could glean for you as a representation of an image
Where’s the security and moderation here? Any upload operation needs to worry about that, huh?! Well, we limit it via IP address at this stage, in our Guinea Pig start to proceedings, and will monitor over time.
Let’s start, codewise with the pretty well self contained PHP block of code that is new for this work …
<?php
$oklist=['0::1', '1.156.90.221'];
function server_remote_addr() {
global $ris;
$rma = $_SERVER['REMOTE_ADDR'];
if ($rma != "") {
$qris = $rma;
} else if ($rma == "") {
$rma = $qris;
}
$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
// you can add different browsers with the same way ..
if(preg_match('/(chromium)[ \/]([\w.]+)/', $ua))
$rma = '000000'.$rma;
elseif(preg_match('/(chrome)[ \/]([\w.]+)/', $ua))
$rma = '00000'.$rma;
elseif(preg_match('/(safari)[ \/]([\w.]+)/', $ua))
$rma = '0000'.$rma;
elseif(preg_match('/(opera)[ \/]([\w.]+)/', $ua))
$rma = '000'.$rma;
elseif(preg_match('/(msie)[ \/]([\w.]+)/', $ua))
$rma = '00'.$rma;
elseif(preg_match('/(mozilla)[ \/]([\w.]+)/', $ua))
$rma = '0'.$rma;
//echo "<p>".$ua.$rma."</p>";
return $rma;
}
Why involve either/both textarea and div (contenteditable=true) elements as “containers” of content?
Well, with yesterday’s starting onblur (just) event gambit, it’s a very pertinent question, but, today, we introduce onpaste event work, and involving this event with the div element can have it distinguishing itself, able to accept graphical (eg. image) content. For example, the user can have their cursor placed into the div element and have been in an image editor having Edit->Select Alled and Edit->Copyed graphical content, then that can be Edit->Pasted into the div as graphical content.
As you might imagine, this opens a Pandora’s Box of possibilities regarding image sizing, but we apply inline CSS styling …
… to the img data URIed element within the div element that happens when graphical content is pasted into it, so that the graphical data is unlikely to spill too far outside the div bounds, assuming only one image is pasted, that is.
Can you believe it was more than 30 years ago, in 1994, that the US politician Al Gore coined the phrase …
Information Superhighway
? And then, in 2001, the great Wikipedia was launched, and quickly all those encyclopaedias in book form looked a bit wan.
As we have surmised often, where we see this “superhighway” excelling is on questions related to the “where” of life, and the quality and quantity of online maps is awe inspiring (as well as yours truly being a sucker for any interesting map).
Then, reading today in the Sydney Morning Herald online newspaper, an article called The Rajs bought into the Australian dream. It came with a nightmare (by Anthony Segaert) and scrolling down to see a map titled “The new growth centres in Sydney’s west” it was not only where these growth centres were located that caught our attention … it was also …
Huh?! We travel the M4 a lot, and never noticed creeks between the Nepean River and Eastern Creek (but will definitely be looking more the next time). We were intrigued, and so what started as geography interests (related to that greatlittleSouth Creek or Wianamatta (and it’s 15 or so tributaries?!)), went in various directions, as the online world is so good at getting us information.
That’s what is great, all those years into the “superhighway” age, but what we need more diligence with is “where” (again) your information comes from … it’s “providence”. Personally, we find comfort in the Wikipedias of this world that are Not For Profit in their thinking, and there is no apparent agenda. Of course, on any interest topic, you are likely to go to many websites that are not anything like Wikipedia, and we are not in any way saying “stay away”, it’s just that sometimes you should take an interest in whether your information source has a vested interest in pushing the information you read.
This read helped crystallize for me why at lunchtimes when working in Dunsheved near St Marys and going down the road for a breather those emus …
… probably had a ready water source!
Stop Press 09/05/2026
My mistake! Near the Mamre Road turn off …
South Creek
… sign!
If this was interesting you may be interested in this too.
More and more, around here, recently, constructing web applications using PHP/HTML/Javascript we have added to a list of “URL response tools”, adding to an “off the top of our head” list of (just the HTML and Javascript “client side”) navigational ideas …
location.href='[URL]’; #same webpage, but reload, perhaps with different content
document.location.reload(); #same webpage, same initial content, cache may come into play
Refresh (eg. every 5 seconds) via head element subelement like <meta http-equiv=”refresh” content=”5″> #same webpage, same initial content, cache may come into play
window.open(‘[URL]’,’_blank’); #new webpage
window.open(‘[URL]’,’_self’); #same webpage, perhaps with different content
HTML form action='[URL]’ target=_blank #new webpage
HTML form action='[URL]’ target=_self #same webpage, but reload, perhaps with different content
location.hash=’#[stuff]’; #same webpage, no reload, detect, analyze and act on [stuff]
location.href=’#[stuff]’; #same webpage, no reload, detect, analyze and act on [stuff]
Ajax open then send([perhaps FormData object]); #same webpage, extract content … we’ve recently started using another way to extract information but stay on the same webpage as …
And so we were saved from the tautological blunder of our “first thought of” today’s blog posting title being “Asynchronous Ajax Clientside Ideas Tutorial” … though, into the future, who knows … you could have two (or even more, come to think of it) cleaners promising to use Ajax concurrently while working on their “for loop” drills?! Hmmmmmm. Watcha doin’ in 2029?
With this in mind we wanted to “compare the pair” with a triple pike, whereby we wrote a proof of concept …
… offering three modes of asynchronous usage mode scenarios, they being …
Promise
Ajax (processing then delay)
Ajax (working within delay)
… that if you click that top button can be set off (almost) synchronously, in their asynchronous pursuits, that are logged in a rudimentary way within the first draftsleepjs.html Asynchronous Ideas web application’s execution run, helped out by our jssleep.js external Javascript helper.
If this was interesting you may be interested in this too.