//-------------------------------------------------------------------------- // CHOREOGRAPHIC CODE by Joana Chicau //-------------------------------------------------------------------------- // THEME // errors we live by // margin(s) and errors // ACTIONS // TAKE 00 marquee // TAKE 01 multiple marquee + remove // TAKE 02 marquee matrix 3D + errorList() // TAKE 03 marquee matrix + iframe breathing() // TAKE 04 enter() // TAKE 05 newHTMLskin() + errorList() // TAKE 06 newHTMLskin() + iframe // LIVE SESSION // on marquee: // transform: matrix(1, 2, 50, 3, 4, 1); // create function new message: // var c = document.getElementById("err"); // var c = c.cloneNode(true); // document.querySelector(".all").append(c); // on marquee: // transform: matrix3D(-20, -200, 0, -10, 10, 1, 0, 1, 1, 0, 1, 0, 200, 1, 0, 1); // tempo = setInterval(colourify, 1000); // clearInterval(tempo); // on span.oval: // background-size: 1rem 5rem !important // document.getElementById("type").value = "2000" // enter() // timeArray = setInterval("errorList()",6000); // clearInterval(timeArray); // copy into iframe // timeStretch = setInterval(stretching, 4000); // clearInterval(timeStretch); // change URL iframe // breathing() // noBreathing() // newHTMLskin() // iframe journey starting from: // https://upload.wikimedia.org/wikipedia/commons/a/a9/Empirical_Rule.PNG // ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status var delay="1"; var count='0'; var tempo="500"; var textarray = [ "ヽ(´∇´)ノ (∇´ノ) ヽ(   )ノ (ヽ´∇) ヽ(´∇`)ノ \ (^_^ ) ノ", "(。・・。) 401 Unauthorized", " 402 Payment Required 💸 💱 ", " (゚ρ゚; 403 Forbidden", " 404 Not Found ヾ(´・ ・`。)ノ” ", " 406 Not Acceptable ⊙ ﹏ ⊙", " 408 Request Timeout ☼☼¸.•*", " 409 Conflict (゜゜)", "ˏ 𓏧 𓏲 𓏲 𓏲 𓋒 410 Gone 𓏲 𓏲 𓏲 𓏲 𓏧 ˎ", "415 Unsupported Media Type (◔_◔)", " △ 416 Range ▼ △ ▼ Not △ ▼ △ Satisfiable ▼ ", " 417 Expectation ٩( ∩_∩ )۶ Failed (¸.꒳.¸) ", " 418 I'm a teapot ☕ the server refuses the attempt to brew coffee with a teapot.", " 425 ⏰ ⌛ ⏱️ Too Early ⏱️ ⌛ ⏰ ・.⋆。⋆☂˚。⋆。˚☽˚。⋆", "【☆】★【☆】★【 426 Upgrade Required 】★【☆】★【☆】", "。°。°。°。°。°。°。°。 429 °。°。 Too °。° Many 。°。 Requests 。°。°。°。°。°。°。°。", "⤹ ⋆ ⸙͎۪۫ 。۰˚ 451 Unavailable For Legal Reasons ˚ ⁀ ➷ 。˚⸙͎۪۫⋆ ༄ ", "■ □ ■ □ ■ 502 Bad Gateway ■ □ ■ □ ■", "‿︵‿︵‿︵‿ 508 Loop Detected ︵‿︵‿︵‿︵", "○ꊞ○ꊞ○ꊞ○ꊞ○ꊞ 507 Insufficient Storage ꊞ○ꊞ○ꊞ○ꊞ○ꊞ○", " 100 Continue ♪ ● ☽ ♩ ○ ♬ ☆ ༝̩̩̥͙ ", "٩(✿∂‿∂✿)۶ 200 OK ✿ ✿ ✿ " ]; //textarray.push(" ♪ ♪ ♪ ┌(・ 。・)┘ ♩♪ ♫ ♬"); function errorList () { document.querySelector('#stage02').innerHTML = textarray[count]; count++; if(count==textarray.length){count='0';} } // - - - - - - - - some more * errors * - - - - - - - - function enter () { const message = document.getElementById("result"); message.innerHTML = ""; let x = document.getElementById("type").value; try { if(x == "") throw " 【 empty 】"; if(isNaN(x)) throw "not ━━━━━━━ a number."; x = Number(x); if(x < 5) throw "too low (─ ‿ ─) "; if(x > 10 ) throw "too high (・ 。・)/ "; } catch(err) { message.innerHTML = "Input is " + err; } } // - - - - - - - - Print Error Messages - - - - - - - - $(document).ready(function(){ if (typeof console != "undefined") if (typeof console.log != 'undefined') console.olog = console.log; else console.olog = function() {}; console.log = function(message) { console.olog(message); $('#err').append(message); // $('#err').append('' + message + ''); }; console.error = console.debug = console.info = console.log }); window.onerror = function (msg, url, lineNo, columnNo, error) { var string = msg.toLowerCase(); var substring = 'script error'; if (string.indexOf(substring) > -1){ alert('Script Error: See Browser Console for Detail'); } else { var message = [ 'Message: ' + msg, 'URL: ' + url, 'Line: ' + lineNo, 'Column: ' + columnNo, 'Error object: ' + JSON.stringify(error) ].join(' - '); alert(message); console.log(message); } return false; }; function colourify () { var divs = document.querySelectorAll('span'), i; for (i = 0; i < divs.length; ++i) { divs[i].style.background = "linear-gradient(" + Math.floor(Math.random() * 1000) + "deg, Aquamarine, MistyRose, Blue)"; } } // colourify() // tempo = setInterval(colourify, 1000); // clearInterval(tempo); function breathing() { var zooming = document.querySelector("#stage03"); currentScale = 1; currenttime = setInterval(function() { zooming.style.transform="scale(" + currentScale + ")"; currentScale = Math.random() * 5 }, 800); } function noBreathing() { clearInterval(currenttime); } function newHTMLskin() { var element = document.querySelector("body"); element.classList.toggle("move"); } function remove () { var divs = document.getElementsByTagName("img"), i; for (i = 0; i < divs.length; ++i) { divs[i].src=""; divs[i].srcset =""; divs[i].style.background = "linear-gradient(" + Math.floor(Math.random() * 1000) + "deg, #000000, blue, #ececec)"; } } function stretching (){ var x = document.getElementsByTagName("div"); var i; for (i = 0; i < x.length; i++) { x[i].style.transform = "scaleY(" + Math.random() * 4 + ")"; x[i].style.transition = "all 1s ease-in-out"; } } // clearInterval(timeStretch); // timeStretch = setInterval(stretching, 2000);