on the internet since 1995
🍇 old factory
DETTAGLI
vintage!
VINTAGE👉 loading script asincrono (pre)
<DIV ID="idSCRIPT_ESEMPIO_zero">???idSCRIPT_ESEMPIO_zero</DIV> <script> //var pre_argomento_zero; var SCRIPTzero = document.createElement('script'); var poscritto0_zero = new Date().getTime(); poscritto0_zero = "?"+poscritto0_zero; SCRIPTzero.src = "pre_argomento_zero.js" + poscritto0_zero; SCRIPTzero.onload=function(){ // alert("variabile caricata: pre_argomento_zero.js"); // document.getElementById("idSCRIPT_ESEMPIO_zero").innerHTML=pre_esempio_zero; };document.body.appendChild(SCRIPTzero); </script>
👉 ascii
<span id="TEST" class="span-block-fine" style="border:solid 0.2rem red;"></span> <button onclick="copyToClipboard('#TEST')"> <i style=" padding-left:0.1rem !important; padding-right:0.1rem !important; "> copia </i> </button> <script> function myFunction(){ var str=document.getElementById("primo_carattere"); if (str.value=="") { str.focus(); return; } var etc1="&"+"#"; var etc2=";"; document.getElementById("TEST").innerHTML =etc1+str.value.charCodeAt(0)+etc2; } </script> <!-- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> --> <script> /* How to copy TEXT to Clipboard on Button-Click A Pen By Shaik Maqsood https://codepen.io/shaikmaqsood/pen/XmydxJ */ function copyToClipboard(element) { var $temp = $("<input>"); $("body").append($temp); $temp.val($(element).text()).select(); document.execCommand("copy"); $temp.remove(); } </script> </div>
👉 timer (semplice)
Il timer dopo 40sec fa scadere una sessione di lavorovar elem = document.getElementById("incremento"); var numero = 0; var intervallo = setInterval(contatore, 1000); function contatore() { numero=numero+1; elem.innerHTML = numero; if (numero==40) { window.location.href="test.php" } }
👉 Il timer dopo 65sec fa scadere una sessione di lavoro indicato in modo frazionario
<span id="timeragenda" style="cursor:default !important; opacity:1 !important;"> </span> <script> document.getElementById("timeragenda").innerHTML= ' <span id="incremento_timer"> '+ ' '+ ' </span>'+ ' <span> '+ ' /5 '+ ' </span>'+ ' '+ ' ' ; var elem_timer = document.getElementById("incremento_timer"); var numero_timer = 0; var intervallo_timer = setInterval(contatore_timer, 1000); function contatore_timer() { numero_timer=numero_timer+1; elem_timer.innerHTML = numero_timer; if (numero_timer==5) { // window.location.href="test.php" clearInterval(intervallo_timer); } } </script>
👉 cursore flashing
<style> .cursore { background: lime; line-height: 17px; margin-left: 3px; -webkit-animation: blink 0.8s infinite; width: 7px; height: 15px; } @-webkit-keyframes blink { 0% {background: #222} 50% {background: lime} 100% {background: #222} } </style> <div style="margin:0;padding:0;display:block !important;" class="cursore"></div>
👉 agit-prop
<span id="agitprop" style="display:inline-block !important;"> </span> <!-- agitprop svg --> <script> document.getElementById("agitprop").innerHTML="<div style='width:24px;height:24px;margin:0px;padding:0px;display:inline-block !important;'><svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M5 9a3 3 0 000 6h.5L7 19.3A2.5 2.5 0 009.3 21h.2a1.4 1.4 0 001.2-.6 1.4 1.4 0 00.2-1.4l-1.3-4h1.8l8.6 3.8V4.7L11.4 9zm5 10.3a.7.7 0 01-.1.5l-.4.2h-.2a1.5 1.5 0 01-1.4-1l-1.3-4h1.9zM5 14a2 2 0 010-4h6v4zm14 3.2l-7-3V9.8l7-3.5zM22 9v6h-1V9z'/><path fill='none' d='M0 0h24v24H0z'/> </svg></div> " + " <style> "+ " .cursore { "+ " background: lime; "+ " line-height: 17px; "+ " margin-left: 3px; "+ " -webkit-animation: blink 0.8s infinite; "+ " width: 7px; "+ " height: 15px; "+ " } "+ " @-webkit-keyframes blink { "+ " 0% {background: #222} "+ " 50% {background: lime} "+ " 100% {background: #222} "+ " } "+ " </style> "+ " "+ " <div style='margin-bottom:0.15rem !important;padding:0;display:inline-block !important;' class='cursore'></div> " ; </script>
👉 clipboard copy
<button onclick="copyToClipboard('#p1')">Copy TEXT </button>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> /* How to copy TEXT to Clipboard on Button-Click A Pen By Shaik Maqsood https://codepen.io/shaikmaqsood/pen/XmydxJ */ function copyToClipboard(element) { var $temp = $("<input>"); $("body").append($temp); $temp.val($(element).text()).select(); document.execCommand("copy"); $temp.remove(); } </script>
👉 GALLERY
<html> <head> <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1"> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js"></script> <link href="https://cdn.jsdelivr.net/npm/nanogallery2@3/dist/css/nanogallery2.min.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/nanogallery2@3/dist/jquery.nanogallery2.min.js"></script> </head> <body> <h1>Gallery made with nanogallery2</h1> <div ID="ngy2p" data-nanogallery2='{ "itemsBaseURL": "http://nanogallery2.nanostudio.org/samples/", "thumbnailWidth": "200", "thumbnailLabel": { "position": "overImageOnBottom" }, "thumbnailAlignment": "center", "thumbnailOpenImage": true }'> <a href="berlin1.jpg" data-ngthumb="berlin1t.jpg" data-ngdesc="">Berlin 1</a> <a href="berlin2.jpg" data-ngthumb="berlin2t.jpg" data-ngdesc="">Berlin 2</a> <a href="berlin3.jpg" data-ngthumb="berlin3t.jpg" data-ngdesc="">Berlin 3</a> </div> </body> </html>
👉 detect o.s. browser
<article style="visibility:visible;" class="mx-5"> <!--DETECT S.O. E DEVICE--> <article style="text-align:center;margin-top:2rem;"> <script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.min.js"></script> <script> console.log(platform); document.write("<div style='font-size:small;font-family:monospace;font-variant:small-caps;text-align:center;'>you are using " + platform.name + " v" + platform.version + " on " + platform.os); +"</div>" </script> <script> if(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){/* true for mobile device */ document.write('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-phone" viewBox="0 0 16 16"> <path d="M11 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h6zM5 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H5z"/> <path d="M8 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/> </svg>'); document.write("mobile device"); }else{/* false for not mobile device */ document.write('<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="currentColor" class="bi bi-pc-display-horizontal" viewBox="0 0 16 16"> <path d="M1.5 0A1.5 1.5 0 0 0 0 1.5v7A1.5 1.5 0 0 0 1.5 10H6v1H1a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-5v-1h4.5A1.5 1.5 0 0 0 16 8.5v-7A1.5 1.5 0 0 0 14.5 0h-13Zm0 1h13a.5.5 0 0 1 .5.5v7a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-7a.5.5 0 0 1 .5-.5ZM12 12.5a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0Zm2 0a.5.5 0 1 1 1 0 .5.5 0 0 1-1 0ZM1.5 12h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1 0-1ZM1 14.25a.25.25 0 0 1 .25-.25h5.5a.25.25 0 1 1 0 .5h-5.5a.25.25 0 0 1-.25-.25Z"/></svg>'); document.write(" NOT MOBILE DEVICE "); } </script> <span id="result" style="font-size:x-small;font-variant:small-caps;"></span> <script>"use strict"; function displayWindowSize(){ var w = document.documentElement.clientWidth;var h = document.documentElement.clientHeight;var wFinestraWIDTH = document.documentElement.clientWidth;var hFinestraHEIGHT = document.documentElement.clientHeight;document.getElementById("result").innerHTML = " " + wFinestraWIDTH + "x" + hFinestraHEIGHT +" <span style='font-size:medium;'>"+(wFinestraWIDTH/16)+"rem "+" x "+(hFinestraHEIGHT/16)+"rem </span>";}window.addEventListener("resize", displayWindowSize);displayWindowSize();+" "</script> </article> </article>
👉 fine frammenti?
work in progress...
🛠 utilities#0
ERR EXTRA_SIMIL_DB
extra
ERR URL_CORRENTE