-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80a26c0
commit d1d26b8
Showing
4 changed files
with
636 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>Hiddify Convertor</title> | ||
<!-- Include Bootstrap CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> | ||
</head> | ||
|
||
<body> | ||
<div class="container mt-4"> | ||
<h1 class="mb-4">Hiddify Convertor</h1> | ||
|
||
<div class="form-group"> | ||
<label for="inputTextArea">Input:</label> | ||
<textarea class="form-control" id="inputTextArea" placeholder="ss://a:b@yahoo.com:443" rows="3"></textarea> | ||
</div> | ||
|
||
<button id="callButton" class="btn btn-primary">Convert</button> | ||
|
||
<div class="form-group mt-4"> | ||
<label for="outputTextArea">Output:</label> | ||
<textarea class="form-control" id="outputTextArea" rows="3" readonly></textarea> | ||
</div> | ||
|
||
<button id="copyButton" class="btn btn-secondary">Copy Output</button> | ||
</div> | ||
|
||
<script src="wasm_exec.js"></script> | ||
<script> | ||
const go = new Go(); | ||
WebAssembly.instantiateStreaming(fetch("web.wasm"), go.importObject).then((result) => { | ||
go.run(result.instance); | ||
}); | ||
|
||
document.getElementById("callButton").addEventListener("click", () => { | ||
const input = document.getElementById("inputTextArea").value; | ||
const result = callGoFunction(input); // Modify this function to accept input | ||
document.getElementById("outputTextArea").value = result; | ||
}); | ||
|
||
document.getElementById("copyButton").addEventListener("click", () => { | ||
const outputTextArea = document.getElementById("outputTextArea"); | ||
outputTextArea.select(); | ||
document.execCommand("copy"); | ||
}); | ||
</script> | ||
|
||
<!-- Include Bootstrap JS and Popper.js --> | ||
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script> | ||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.