From fea88e1f72780109f794305ea3d27571f12bb075 Mon Sep 17 00:00:00 2001 From: mrdog233o5 Date: Thu, 11 Apr 2024 17:45:21 +0800 Subject: added folder --- website/index.html | 20 ++++++++ website/main.js | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++ website/style.css | 0 3 files changed, 153 insertions(+) create mode 100644 website/index.html create mode 100644 website/main.js create mode 100644 website/style.css (limited to 'website') diff --git a/website/index.html b/website/index.html new file mode 100644 index 0000000..d6b2e58 --- /dev/null +++ b/website/index.html @@ -0,0 +1,20 @@ + + + + + + + Apple comverter + + +

apple option key convertor

+ + + +

+ + +˘ +?¿ + `.split("\n"); + +function convert(input, mode) { + input = input.split(""); + var result = ""; + var fromIndex = 0; + var toIndex = 0; + if (mode) { + toIndex = 1; + } else { + fromIndex = 1; + } + // loop through each char + input.forEach((char) => { + // match this char + for (var i = 0; i < match.length; i++) { + if (char == match[i][fromIndex]) { + result += match[i][toIndex]; + return; + } + } + }) + return result; +} + +convertBtn.onclick = event => { + mode = modeBtn.value == "0" ? false : true; + var res = convert(input.value, mode); + output.innerText = res; +} + +copyBtn.onclick = event => { + navigator.clipboard.writeText(output.innerText); +} diff --git a/website/style.css b/website/style.css new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3