rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dj

Pages: 1 ... 18 19 20
286
HTML & templates / File upload with drag and drop
« on: January 28, 2014, 10:58:20 AM »
put this html5 file in your upload-folder



287
shows date (last-modified) of the image on mouseover



Code: [Select]
<html>
<head>
<title>mycam</title><META NAME="Author" CONTENT="DJ">
<meta name="viewport" content="width=device-width">
</head>
<body>

<img src="out.jpg" id="mypic" title="Update manually or use actual browser" style="cursor:pointer; max-width:100%">

<script>
Tmin=5;Tmax=60  //upate every 5 or 60 seconds (cam on or off)
//var t1, t  //cam
var etag1, etag=""
img=document.getElementById("mypic")
bild1=img.src

window.URL = window.URL || window.webkitURL;  // Take care of vendor prefixes.
BlobBuilder = window.MozBlobBuilder || window.WebKitBlobBuilder || window.BlobBuilder;

function req() {
var xhr = new XMLHttpRequest();
xhr.open('POST', 'out.jpg', true);
xhr.responseType = 'arraybuffer';  //blob

xhr.onload = function(e) {
//  if (this.status == 200) {

if (BlobBuilder) {var bb = new BlobBuilder();bb.append(this.response);var blob = bb.getBlob('image/jpg'); }  //android
else var blob = new Blob([this.response], {type : 'image/jpg'});

    //var blob = this.response;
   
var t2=new Date(xhr.getResponseHeader('Last-Modified'));
//if (t2-t1!=0) t=(t2-t1)/1000; t1=t2  //todo: var. framerate, LMod updates, when cam is on!
var etag2=xhr.getResponseHeader('ETag')  //Content-Length
if (etag1 && etag2!=etag1) {etag=new Date(); bild1=img.src}; etag1=etag2
img.title = t2.toLocaleString() + " mycam\n"
 +etag.toLocaleString()+" changed\n"
 + new Date().toLocaleString() + " ("+T+"s) reload\n<"
T=(new Date()-t2 > Tmax*1000)?Tmax:Tmin; document.title=(T==Tmax)?"bye-cam":"yaw-cam"

    img.onload = function(e) {
      //window.URL.revokeObjectURL(img.src); // Clean up after yourself.  //uncommend, if not downloadable
    };
    img.src = window.URL.createObjectURL(blob)

//  }
};

xhr.send();

setTimeout(function(){req()},1000*T)
}

if(location.search) Tmin=location.search.substr(1)
T=Tmin
req();
img.onclick=function(){this.src=bild1}; //show last image

</script>
</body>
</html>

For upload you can use http://www.rejetto.com/forum/html-templates/capture-and-upload-images-from-your-webcam/

288
HTML & templates / 4 connect game
« on: June 13, 2013, 06:07:19 PM »
I have add a template to my 4 connect game  to play over network.

Player 1 starts with link 4connect.htm
Player 2           with link 4connect.htm?-1



V1.1: Both players starts with link 4connect_netstart.htm
V2   : sound; Both players starts with link 4connect.htm?-1

289
HTML & templates / voting
« on: May 28, 2013, 12:48:41 PM »
Vote: edit question in [special:strings] (hfs beta)




Rate: click on star, if you Like the file (V2: rate more stars)


290
HTML & templates / photo slide
« on: May 25, 2013, 05:32:59 PM »
I have changed my CSS3 foto slide to a template.

You can see it here:
http://home.arcor.de/Juergen.Dorsch/?mallorca/gallery.htm

Features:
V1: foto slide
  2: show folders
  3: todo: show exif comment (firefox and chrome)
  3.1: works also with IE>=10

291
HTML & templates / private messenger chat
« on: May 03, 2013, 07:36:41 PM »
I have the standard chat complemented to send private messages.

Type the recipient_NAME in the TO field.
Only you and the recipient can see the message.



Features:
V1.0: do it serversite; todo: add field sendto to make it easier
  1.1: add field sendto to make it easier
  1.2: show when a user leave the chat (Exit); todo: show users in the chat
  1.3: show users in the chat (doubleclick in TO field); todo: show when user changed NAME
  1.4: done all in only one template to make it easier
  1.5: show when user changed NAME
  1.6: mark receipt messages ✓; disable log; todo:choose color
  1.7: choose color (chrome)
  1.8: check Name in use
  2.0: check Name is account (safety)
  2.1: add smileys ☺
  2.2: done with iframe (add New link to chat.htm)
  2.3: group chat (seperate names with ; )
  3.0: without TO field, low traffic, ajax
  3.1: use as guestbook (link to chat.htm?ACCOUNT); show account notes
  4.0: use server push (not IE, beta, todo:smileys)
  4.2: add some ideas from XCanG
  4.3: faster, PM,igno,notify
  4.4: works with IE (fallback to polling)
  4.5: group chat (enter groupname: text)

Pages: 1 ... 18 19 20