Skip to content

Instantly share code, notes, and snippets.

@Aresiel
Created August 12, 2020 21:01
Show Gist options
  • Save Aresiel/dbbae59f3ad908711929cb6380f1f2d9 to your computer and use it in GitHub Desktop.
Save Aresiel/dbbae59f3ad908711929cb6380f1f2d9 to your computer and use it in GitHub Desktop.
OwOifier
<div id="eldritchhorror" contenteditable></div>
<button id="eldritchgod" onclick="owo()">OwOify</button>
// Below is the UMD equivalent of
// const owoify = require("owoify-js").default
const owoify = window["owoify-js"].default;
let element = document.getElementById("eldritchhorror");
element.innerText = owoify(
"Write something!",
"uwu"
);
function owo() {
document.getElementById("eldritchhorror").innerHTML = owoify(
document.getElementById("eldritchhorror").innerText,
"uwu"
);
if(document.getElementById("eldritchhorror").innerText == ""){
document.getElementById("eldritchhorror").innerText = owoify("Write something!", "uwu")
}
}
<script src="https://unpkg.com/[email protected]/dist/owoify-js.umd.production.min.js"></script>
#eldritchhorror {
display: flex;
height: calc(100vh - 6rem - 1px);
width: 100vw;
align-items: center;
justify-content: center;
font: 3rem black Verdana, Arial, sans-serif;
}
#eldritchgod {
display: flex;
height: 4rem;
width: 100vw;
align-items: center;
justify-content: center;
font: 3rem black Verdana, Arial, sans-serif;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment