Created
August 12, 2020 21:01
-
-
Save Aresiel/dbbae59f3ad908711929cb6380f1f2d9 to your computer and use it in GitHub Desktop.
OwOifier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="eldritchhorror" contenteditable></div> | |
<button id="eldritchgod" onclick="owo()">OwOify</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://unpkg.com/[email protected]/dist/owoify-js.umd.production.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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