Widget:Caveripper: Difference between revisions

From Pikipedia, the Pikmin wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:
<input id="seed-input" class="mw-ui-input" type="text" style="height:18px;vertical-align:middle;border:1px solid #999;padding:6px;margin-bottom:2px" placeholder="seed... (leave empty for random)" size="27"/>
<input id="seed-input" class="mw-ui-input" type="text" style="height:18px;vertical-align:middle;border:1px solid #999;padding:6px;margin-bottom:2px" placeholder="seed... (leave empty for random)" size="27"/>
<div id="caveripper-wrapper" style="width:<!--{$height|escape:'html'|default:'100%'}-->;height:<!--{$height|escape:'html'|default:'83vh'}-->;display:flex;align-items:center;justify-content:center;background:#0f0f0f;border:1px solid #999;margin-top:2px"><canvas id="canvas" style="max-width:100%;max-height:100%;border:1px solid transparent;box-sizing:border-box"></div></div>
<div id="caveripper-wrapper" style="width:<!--{$height|escape:'html'|default:'100%'}-->;height:<!--{$height|escape:'html'|default:'83vh'}-->;display:flex;align-items:center;justify-content:center;background:#0f0f0f;border:1px solid #999;margin-top:2px"><canvas id="canvas" style="max-width:100%;max-height:100%;border:1px solid transparent;box-sizing:border-box"></div></div>
<script>document.getElementById('sublevel-input').value = new URLSearchParams(location.search).get('sublevel');</script></includeonly>
<script>
var urlParams = new URLSearchParams(location.search);
document.getElementById('sublevel-input').value = urlParams.get('sublevel');
document.getElementById('seed-input').value = urlParams.get('seed');
</script></includeonly>

Revision as of 00:07, April 5, 2024

This widget allows you to embed the Caveripper tool. Accepted parameters: width, height.