<script>
window.onload = function()
{
var w = window.innerWidth;
var h = window.innerHeight;
var elem = document.getElementById("main");
var k;
if(w>=h){ k = h; }
else { k = w; }
elem.style.width = k+"px";
elem.style.height = k+"px";
}
</script>
var SCR = document.scripts;
var text = '';
var count = SCR.length;
for(var i=0;i<count;i++)
{
var X = SCR[i];
text += '~~~'+X+'~~~<br>';
for(var j in X)
{
text += j+' -- '+X[j]+'<br>';
}
text += '<br><br><br>'
}
document.getElementById("textPanel").innerHTML = text;
var T = 18;
console.log(T); // 18
console.log(~T); // -19
console.log(!~T); // false
console.log(!!~T); // true