diff options
author | NateN1222 <nathannichols454@gmail.com> | 2017-10-15 12:05:59 -0500 |
---|---|---|
committer | NateN1222 <nathannichols454@gmail.com> | 2017-10-15 12:05:59 -0500 |
commit | d7cab141ded72d0bfdf69cebb194fc5658497420 (patch) | |
tree | 5f2c0908198197656f1f1073c117989d6b67f683 /nontriv.html | |
parent | 49796dafe6f7ad30af984822891f4486a6363f22 (diff) |
Made a debug page for the nontrivial/trivial list and improved code evaluation
Diffstat (limited to 'nontriv.html')
-rw-r--r-- | nontriv.html | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/nontriv.html b/nontriv.html new file mode 100644 index 0000000..53134a2 --- /dev/null +++ b/nontriv.html @@ -0,0 +1,42 @@ +<!doctype html> + +<head> +</head> +<body> + +<script> +window.onload = function (){ + var s = Object.getOwnPropertyNames(window); + for(var i = 0; i < s.length; i++){ + var checkbox = "<input name='opt' id='"+s[i]+"' type='checkbox'></input>"; + document.getElementById("input").insertAdjacentHTML("beforeend",checkbox + s[i] + "\n"); + } + document.getElementById("gen").addEventListener("click",function(){ + var temp = document.getElementsByName("opt"); + var outputjson = {}; + for(var i = 0; i < temp.length; i++){ + if(temp[i].checked){ + outputjson[temp[i].id] = "non-trivial"; + }else{ + outputjson[temp[i].id] = "trivial"; + } + } + document.getElementById("output").innerHTML = JSON.stringify(outputjson); + }); +} +</script> + +This page allows us to generate the allowed/disallowed object JSON. +<br> +<br> +We know it's up to date because it iterates over all keys of the window variable (which is the global object for browsers) +<br> +<br> +(Checked = nontrivial) +<br><br><br> +<input id="gen" type="button" value="Generate"></input> +<br> +<pre id="output"></pre> +<pre id="input"></pre> + +</body> |