Commit d4a82c91 authored by Akari Labs's avatar Akari Labs

add owo mode

parent 41f33ebe
/*
gltchrr 1.2
gltchrr 1.2.1
an artificial text corruption system
Copyright 2019 caela akari (lp0) and astra akari (nocebo)
......@@ -92,6 +92,17 @@ module.exports = function () {
var output = [];
for (var i = 0; i < msg.length; i++) output.push(row[Math.floor(Math.random() * row.length)]);
return output.join('');
},
// im not even sure what to call this, furry speak??
owo(msg) {
msg = msg.replace(/(?:r|l)/g, "w");
msg = msg.replace(/(?:R|L)/g, "W");
msg = msg.replace(/n([aeiou])/g, 'ny$1');
msg = msg.replace(/N([aeiou])/g, 'Ny$1');
msg = msg.replace(/N([AEIOU])/g, 'NY$1');
msg = msg.replace(/ove/g, "uv");
return msg;
}
};
......
......@@ -26,8 +26,7 @@ function GltchrrWindow(attr) {
me.onupdate();
}
// TODO: bind the radio buttons to the modes provided by gltchrr
return <Window x={options.x || 32} y={options.y || 128} height="320" title="gltchrr">
return <Window x={options.x || 32} y={options.y || 128} height="330" title="gltchrr">
<label>enabled? <input type="checkbox" checked={gltchrr.state.enabled} onchange={e => { gltchrr.state.enabled = e.target.checked; me.onupdate(); }} /></label><br />
<br />
<label>intensity {controls.intesity_echo = <span style="float: right;">1</span>}
......@@ -35,10 +34,9 @@ function GltchrrWindow(attr) {
</label><br />
<br />
<label>mode</label><br />
<label><input type="radio" name="mode" value="pass" checked={gltchrr.state.mode === 'pass'} onchange={updateMode} /> default</label><br />
<label><input type="radio" name="mode" value="keymash" checked={gltchrr.state.mode === 'keymash'} onchange={updateMode} /> keymash</label><br />
<label><input type="radio" name="mode" value="meow" checked={gltchrr.state.mode === 'meow'} onchange={updateMode} /> meow</label><br />
<label><input type="radio" name="mode" value="override" checked={gltchrr.state.mode === 'override'} onchange={updateMode} /> override</label><br />
{Object.keys(gltchrr.preprocess)
.map(k => [<label><input type="radio" name="mode" value={k} checked={gltchrr.state.mode === k} onchange={updateMode} /> {k}</label>, <br />])
.reduce((p, c) => p.concat(c))}
<br />
<label>override text
<input type="text" value={gltchrr.parameters.text} oninput={e => { gltchrr.parameters.text = e.target.value; me.onupdate(); }} />
......@@ -53,7 +51,7 @@ function GltchrrWindow(attr) {
}
module.exports = function (options) {
options = options || {};``
options = options || {}; ``
this.gltchrr = new _gltchrr();
this.onupdate = () => { };
this.show = function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment