|
|
@ -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 - - - - - - - -
|
|
|
|
|
|
|
|
// <p>Please input a number between 5 and 10:</p>
|
|
|
|
// <input id="demo" type="text">
|
|
|
|
// <button type="button" onclick="myFunction()">Test Input</button>
|
|
|
|
// <p id="p01"></p>
|
|
|
|
// - - - - - - - - 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('<span>' + message + '</span>');
|
|
|
|
// $('#err').append('<span>' + message + '</span>');
|
|
|
|
}; |
|
|
|
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 + "<br>" + error.message; |
|
|
|
console.log(); |
|
|
|
break; |
|
|
|
} |
|
|
|
case (error instanceof SyntaxError): { |
|
|
|
document.getElementById("err").innerHTML = error.name + "<br>" + error.message; |
|
|
|
console.log(); |
|
|
|
break; |
|
|
|
} |
|
|
|
case (error instanceof RangeError): { |
|
|
|
document.getElementById("err").innerHTML = error.name + "<br>" + error.message; |
|
|
|
console.log(); |
|
|
|
break; |
|
|
|
} |
|
|
|
default: { |
|
|
|
document.getElementById("err").innerHTML = error.name + "<br>" + error.message; |
|
|
|
console.log(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Reference Error
|
|
|
|
|
|
|
|
|
|
|
|
let a = 5; |
|
|
|
try { |
|
|
|
a = y + 1; // thrown if you use (reference) a variable that has not been declared
|
|
|
|
} |
|
|
|
catch(err) { |
|
|
|
document.getElementById("err").innerHTML = err.name; |
|
|
|
} |
|
|
|
|
|
|
|
// Syntax Error
|
|
|
|
try { |
|
|
|
eval("alert('Hello)"); // Missing ' will produce an error
|
|
|
|
} |
|
|
|
catch(err) { |
|
|
|
document.getElementById("err").innerHTML = err.name; |
|
|
|
} |
|
|
|
|
|
|
|
//
|
|
|
|
try { |
|
|
|
hello("world(s)!"); |
|
|
|
} |
|
|
|
catch(err) { |
|
|
|
document.getElementById("err").innerHTML = |
|
|
|
err.name + "<br>" + err.message; |
|
|
|
} |
|
|
|
|
|
|
|
// URI (Uniform Resource Identifier) Error
|
|
|
|
try { |
|
|
|
decodeURI("%%%"); // You cannot URI decode percent signs
|
|
|
|
} |
|
|
|
catch(err) { |
|
|
|
document.getElementById("err").innerHTML = err.name; |
|
|
|
} |
|
|
|
|
|
|
|
// Type Error
|
|
|
|
let num = 1; |
|
|
|
try { |
|
|
|
num.toUpperCase(); // You cannot convert a number to upper case
|
|
|
|
} |
|
|
|
catch(err) { |
|
|
|
document.getElementById("err").innerHTML = err.name; |
|
|
|
} |
|
|
|
|
|
|
|
// Range Error
|
|
|
|
let ran = 1; |
|
|
|
try { |
|
|
|
ran.toPrecision(500); // A number cannot have 500 significant digits
|
|
|
|
} |
|
|
|
catch(err) { |
|
|
|
document.getElementById("err").innerHTML = err.name; |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
function Breathing() { |
|
|
|
var zooming = document.querySelector("body"); |
|
|
|
function breathing() { |
|
|
|
var zooming = document.querySelector("#stage03"); |
|
|
|
currentScale = 1; |
|
|
|
currenttime = setInterval(function() { |
|
|
|
zooming.style.transform="scale(" + currentScale + ")"; |
|
|
@ -233,71 +146,32 @@ function Breathing() { |
|
|
|
}, 800); |
|
|
|
} |
|
|
|
|
|
|
|
function No_Breathing() { |
|
|
|
function noBreathing() { |
|
|
|
clearInterval(currenttime); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// background: radial-gradient(ellipse at center, #0000FF, #E6E6FA 10%, #0000FF);
|
|
|
|
// background: linear-gradient(#fff, #0000FF 100%, #fff 10%)
|
|
|
|
// transform: matrix3d(1, 1, 0, 0, 10, 1, 0, 10, 10, 0, 1, 0, 200, 10, 0, 1);
|
|
|
|
|
|
|
|
|
|
|
|
function Breathing02() { |
|
|
|
var zooming = document.querySelector("body"); |
|
|
|
numb = 1; |
|
|
|
currenttime = setInterval(function() { |
|
|
|
zooming.style.backgroundSize = numb + "%"; |
|
|
|
numb = Math.random() * 500; |
|
|
|
}, 800); |
|
|
|
function newHTMLskin() { |
|
|
|
var element = document.querySelector("body"); |
|
|
|
element.classList.toggle("move"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var x = document.getElementsByTagName("div"); |
|
|
|
var counter = 1000; |
|
|
|
var i; |
|
|
|
function Breathing03 () { |
|
|
|
for (i = 0; i < x.length; i++) { |
|
|
|
// x[i].style.opacity = Math.random() * 2;
|
|
|
|
x[i].style.transform = "scaleY(" + Math.random() * 5 + ")"; |
|
|
|
x[i].style.transition = "all 1s ease-in-out"; |
|
|
|
window.setTimeout(Breathing03, counter); |
|
|
|
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)"; |
|
|
|
} |
|
|
|
}; |
|
|
|
setTimeout(Breathing03, 1000); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
function Breathing(){ |
|
|
|
function stretching (){ |
|
|
|
var x = document.getElementsByTagName("div"); |
|
|
|
var i; |
|
|
|
for (i = 0; i < x.length; i++) { |
|
|
|
x[i].style.transform = "scaleY(" + Math.random() * 5 + ")"; |
|
|
|
x[i].style.transform = "scaleY(" + Math.random() * 4 + ")"; |
|
|
|
x[i].style.transition = "all 1s ease-in-out"; |
|
|
|
} |
|
|
|
} |
|
|
|
// clearInterval(timer);
|
|
|
|
// timer = setInterval(Breathing, 2000);
|
|
|
|
|
|
|
|
|
|
|
|
function noBreathing() { |
|
|
|
clearInterval(currenttime); |
|
|
|
clearInterval(thistime); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// document.querySelector("body").style.border="solid #000 0rem"
|
|
|
|
// document.querySelector("body").style.borderRadius="30rem"
|
|
|
|
// document.querySelector("body").style.background="linear-gradient(70deg, Aquamarine, MistyRose, Blue, Plum, WhiteSmoke, LightYellow)"
|
|
|
|
// document.querySelector("html").style.backgroundColor="black"
|
|
|
|
|
|
|
|
function skin () { |
|
|
|
currenttime = setInterval(function() { |
|
|
|
document.querySelector("body").style.background = "linear-gradient(" + Math.floor(Math.random() * 1000) + "deg, var(--color-pink), var(--color-yel), var(--color-blue), var(--color-gray))"; |
|
|
|
}, 800); |
|
|
|
} |
|
|
|
// clearInterval(timeStretch);
|
|
|
|
// timeStretch = setInterval(stretching, 2000);
|
|
|
|
|
|
|
|