diff --git a/digitalselves-scripts.js b/digitalselves-scripts.js index f1e86cd..24109a5 100644 --- a/digitalselves-scripts.js +++ b/digitalselves-scripts.js @@ -2,94 +2,103 @@ // CHOREOGRAPHIC CODE by Joana Chicau //-------------------------------------------------------------------------- - +// THEME // errors we live by +// margin(s) and errors + +// ACTIONS + +// document.getElementById("type").value = "2000" +// click() + +// timeArray = setInterval("errorList()",6000); +// clearInterval(timeArray); + +// timeStretch = setInterval(stretching, 3000); +// clearInterval(timeStretch); + +// breathing() +// noBreathing() + +// on marquee +// transform: matrix3D(-20, -200, 0, -10, 10, 1, 0, 1, 1, 0, 1, 0, 200, 1, 0, 1); +// transform: matrix(1, 2, 50, 3, 4, 1); + +// newHTMLskin() + -// trial and error -// margin of error + +// iframe journey starting from: // https://upload.wikimedia.org/wikipedia/commons/a/a9/Empirical_Rule.PNG -// printing error messages; -// creating a loop for changing text in all headings -// https://developer.mozilla.org/en-US/docs/Web/HTTP/Status + + +// ref: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status var delay="1"; var count='0'; var tempo="500"; -var elements = document.getElementsByTagName("a") var textarray = [ "ヽ(´∇´)ノ (∇´ノ) ヽ( )ノ (ヽ´∇) ヽ(´∇`)ノ \ (^_^ ) ノ", "(。・・。) 401 Unauthorized", -" 402 Payment Required 💸 💱 (゜゜)", +" 402 Payment Required 💸 💱 ", " (゚ρ゚; 403 Forbidden", " 404 Not Found ヾ(´・ ・`。)ノ” ", " 406 Not Acceptable ⊙ ﹏ ⊙", -" what error? ʍɥɐʇ ǝɹɹoɹ¿ what error? ʍɥɐʇ ǝɹɹoɹ¿", " 408 Request Timeout ☼☼¸.•*", -"(─‿─) (─‿‿─) (─‿─) (─‿‿─) 409 Conflict (─‿─) (─‿‿─) (─‿─) (─‿‿─)", +" 409 Conflict (゜゜)", "ˏ 𓏧 𓏲 𓏲 𓏲 𓋒 410 Gone 𓏲 𓏲 𓏲 𓏲 𓏧 ˎ", "415 Unsupported Media Type (◔_◔)", -" ━━━━━━━ 416 Range ▼△▼△▼△▼ Not ▼△▼△▼△▼ Satisfiable ━━━━━━━ ", +" △ 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 ■ □ ■ □ ■ □ ■", +" 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 ✿ ✿ ✿ ✿ ✿ " +"٩(✿∂‿∂✿)۶ 200 OK ✿ ✿ ✿ " ]; //textarray.push(" ♪ ♪ ♪ ┌(・ 。・)┘ ♩♪ ♫ ♬"); -function wonder02() { - var rannum= Math.floor(Math.random()*textarray.length); - for (var i = 0; i < elements.length; i++) { - elements[i].innerHTML = textarray[rannum]; - } - timer = setTimeout("wonder()", delay*tempo); -} -// clearTimeout(timer); - -function wonder() { +function errorList () { document.querySelector('#stage02').innerHTML = textarray[count]; count++; if(count==textarray.length){count='0';} - setTimeout("wonder()",6000); } -wonder() -// - - - - - - - - INPUT Errors - - - - - - - - -//
Please input a number between 5 and 10:
-// -// -// +// - - - - - - - - some more * errors * - - - - - - - - + -function myFunction() { - const message = document.getElementById("p01"); + +function click() { + const message = document.getElementById("result"); message.innerHTML = ""; - let x = document.getElementById("demo").value; + let x = document.getElementById("type").value; try { - if(x == "") throw "empty"; - if(isNaN(x)) throw "not a number"; + 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"; + if(x < 5) throw "too low (─ ‿ ─) "; + if(x > 10 ) throw "too high (・ 。・)/ "; } catch(err) { - message.innerHTML = "Input is " + err; + message.innerHTML = "Input is " + err; } } -// - - - - - - - - JavaScript Errors - - - - - - - - + +// - - - - - - - - Print Error Messages - - - - - - - - + $(document).ready(function(){ if (typeof console != "undefined") @@ -101,7 +110,7 @@ if (typeof console != "undefined") console.log = function(message) { console.olog(message); $('#err').append(message); - // $('#err').append('' + message + ''); + // $('#err').append('' + message + ''); }; console.error = console.debug = console.info = console.log }); @@ -127,105 +136,9 @@ window.onerror = function (msg, url, lineNo, columnNo, error) { return false; }; -/* - - let num = 1; - a = y + 1; - let ran = 1; - -try { - // Type Error - num.toUpperCase(); - // Reference Error - a = y + 1; - // Syntax Error - eval("alert('Hello)"); - // Range Error - ran.toPrecision(500); -} catch (error) { - - switch (true) { - case (error instanceof ForbiddenError): { - document.getElementById("err").innerHTML = error.name + "