Skip to content

Commit d2a40dd

Browse files
committed
Load first shl IPS in demo viewer instead of sample
1 parent 0d8b066 commit d2a40dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

static/ips/assets/js/renderIPS.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ function updateDisplayMode(displayMode) {
5151
update(e, (shlContents.length === 1 ? "" : i));
5252
});
5353
if (config.show_demo) {
54+
$('#ipsInput').val(JSON.stringify(shlContents[0], null, 2));
5455
updateFromText();
5556
}
5657
};
@@ -203,7 +204,8 @@ function prepareSHLContents(contents) {
203204
addTab("IPS Demo", "Demo");
204205
$(Sqrl.Render(template, {index: "Demo"}))
205206
.appendTo('#rendered-ips');
206-
loadSample();
207+
$('#ipsInput').val(JSON.stringify(shlContents[0]));
208+
updateFromText();
207209
$("#submit").on('click', updateFromText);
208210
$('#clearSample').on('click', clearData);
209211
$("#loadSample").on('click', loadSample);

0 commit comments

Comments
 (0)