JSFiddle - React, Tailwind, and code Playground
by nderscore
HTML
<!DOCTYPE html>
<!-- saved from url=(0036)http://siorki.github.io/regPack.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<title>RegPack v3.0.1</title>
<style type="text/css">
#options {
border:1px solid gray;
padding:5px;
}
.source {
background-color:#D0D0FF
}
.best {
background-color:#D0FFD0
}
</style>
</head>
<body>
This _nderscore's modified copy of <a href="http://siorki.github.io/regPack.html">regPack</a>
<br><textarea rows="12" cols="70" id="originalString" class="source" disabled>No Input</textarea>
<div id="options">
Attempt method hashing and renaming for
<input type="checkbox" name="paramOHash2D" id="paramOHash2D" disabled>2D canvas context
<input type="checkbox" name="paramOHashWebGL" id="paramOHashWebGL" disabled>WebGL canvas context
<input type="checkbox" name="paramOHashAudio" id="paramOHashAudio" disabled>AudioContext
<br><input type="checkbox" name="paramOGlobalDefined" id="paramOGlobalDefined" disabled> Assume global variable <input type="text" size="6" value="c" id="paramOGlobalVariable" disabled> is a <select id="paramOGlobalType" disabled>
<option value="0" selected="">2D canvas context</option>
<option value="1">WebGL canvas context</option>
</select> <i>(as in js1k shim)</i>
<br><input type="checkbox" name="paramOReassignVars" id="paramOReassignVars" disabled> Reassign variable names to produce consecutive character blocks,
except for variables <input type="text" value="a b c" id="paramOExcludedVars" disabled>
<br><br><b>RegPack v3.0.1</b> <button id="packAction">Pack</button><button id="mathPackAction">Pack with(Math)</button>
Score = <input type="text" size="6" value="2" id="paramFGain">
*gain + <input type="text" size="6" value="1" id="paramFLength">
*length + <input type="text" size="6" value="0" id="paramFCopies">
*copies
Tiebreaker = <select id="paramFTiebreaker">
<option value="1" selected="">longest string first (Js...