You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RnQ/Distro/Template/debug.htm

40 lines
1.0 KiB
HTML

<html>
<head>
<include src="common.htm" />
<style>
#dump {
white-space: pre;
size: *;
overflow-y: auto;
}
</style>
<script>
const Native = View.share.MainNative;
function getData(what) {
var window = findWindow("main");
var data = window.document.globalThis.cldata;
var arr = what == "divs" ? data.divisors : what == "grps" ? data.groups : what == "conts" ? data.contacts : data.counts;
var dump = $("#dump");
dump.clear();
dump.append(Native.PrettyPrint(JSON.stringify(arr)));
}
document.on("click", "button", (e, el) => getData(el.attr["id"]));
document.on("closerequest", function(e){
e.preventDefault();
view.state = Window.WINDOW_MINIMIZED;
}).on("keydown", (e) => {
if (e.keyCode == Event.VK_ESCAPE || (e.ctrlKey && e.keyCode == Event.VK_W)) view.close();
});
</script>
</head>
<body>
<button id="divs">Divisors</button>
<button id="grps">Groups</button>
<button id="conts">Contacts</button>
<button id="cnts">Counts</button>
<div id="dump"></div>
</body>
</html>