Spaces:
Running
Running
File size: 5,010 Bytes
7030521 a22fb36 7030521 3e898fc 7030521 a06ddb8 7030521 a06ddb8 6ab7f8d 7030521 a06ddb8 a2743af bc383a5 a06ddb8 bc383a5 a49523c 368828a a06ddb8 0071f42 a06ddb8 43ce9e1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link rel="icon" href="bu.png">
<title>Fusani</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style>
body {
font-family: Arial, sans-serif;
}
</style>
</head>
<body>
<h1 style="font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;">Fusani</h1>
<h2>go conlang!</h2>
<form>
<label for="word">Enter a word:</label>
<input type="text" id="word" name="word">
<br>
<button type="button" onclick="addVowels()">Add Vowels</button>
<button type="button" onclick="removeVowels()">Remove Vowels</button>
<button type="button" onclick="addConsonants()">Add Consonants</button>
<button type="button" onclick="removeConsonants()">Remove Consonants</button>
</form>
<script>
function addVowels() {
var wordInput = document.getElementById("word");
var vowels = "aeiou";
var newWord = "";
for (var i = 0; i < wordInput.value.length; i++) {
newWord += wordInput.value[i];
if (i < wordInput.value.length - 1 && !vowels.includes(wordInput.value[i + 1])) {
newWord += vowels.charAt(Math.floor(Math.random() * vowels.length));
}
}
wordInput.value = newWord;
}
function removeVowels() {
var wordInput = document.getElementById("word");
var vowels = "aeiouAEIOU";
var newWord = "";
for (var i = 0; i < wordInput.value.length; i++) {
if (!vowels.includes(wordInput.value[i])) {
newWord += wordInput.value[i];
}
}
wordInput.value = newWord;
}
function addConsonants() {
var wordInput = document.getElementById("word");
var consonants = "bcdfghjklmnpqrstvwxyz";
var newWord = "";
for (var i = 0; i < wordInput.value.length; i++) {
newWord += wordInput.value[i];
if (i < wordInput.value.length - 1 && !consonants.includes(wordInput.value[i + 1])) {
newWord += consonants.charAt(Math.floor(Math.random() * consonants.length));
}
}
wordInput.value = newWord;
}
function removeConsonants() {
var wordInput = document.getElementById("word");
var consonants = "bcdfghjklmnpqrstvwxyzBCDFGHJKLMNPQRSTVWXYZ";
var newWord = "";
for (var i = 0; i < wordInput.value.length; i++) {
if (!consonants.includes(wordInput.value[i])) {
newWord += wordInput.value[i];
}
}
wordInput.value = newWord;
}
</script>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<h1>How does this work?</h1>
<h4>
The code provided is a set of instructions that a computer can follow to make changes to a word that someone types into a box on a website.
There are four buttons on the website that you can click. Each button does a different thing to the word that you type in.
The first button is called "Add Vowels." When you click this button, the computer looks at the word you typed and adds some vowels to it to make it longer. It does this by picking a random vowel and putting it in between two consonants. For example, if you typed in the word "dog," the computer might add an "e" to make it "doeg."
The second button is called "Remove Vowels." When you click this button, the computer looks at the word you typed and takes out all the vowels. So if you typed in the word "hello," the computer would change it to "hll."
The third button is called "Add Consonants." When you click this button, the computer looks at the word you typed and adds some consonants to it to make it longer. It does this by picking a random consonant and putting it in between two vowels. For example, if you typed in the word "cat," the computer might add an "h" to make it "chat."
The fourth button is called "Remove Consonants." When you click this button, the computer looks at the word you typed and takes out all the consonants. So if you typed in the word "world," the computer would change it to "o."
</h4>
<h1>Offline Fusani</h1>
<p>Here are the requirements:</p>
<p> </p>
<p> </p>
<p> </p>
<ol>
<li>Copy the code from <a href="https://pastebin.com/raw/CuYGbTNa">pastebin</a>.</li>
<li>Install <a href="https://code.visualstudio.com/">Visual Studio Code</a>.</li>
<li>Open Visual Studio Code and click on "New File".</li>
<li>Create an HTML file with the extension ".html". For example, "index.html".</li>
<li>Paste the copied code into the HTML file.</li>
<li>Save the HTML file.</li>
<li>Open the HTML file in a web browser to see the preview.</li>
</ol>
<p> </p>
<p> </p>
<p> </p>
<a href="https://fusani.fandom.com/">Join our fandom! ❤️</a>
<a href="https://replit.com/@HachiKu/fusani?v=1">Donate Here! 💲 (btw you pay in cycles)</a>
</body>
</html>
|