Last active
February 18, 2023 09:03
-
-
Save Debcharon/d5ca9d95f26a2df83fdc07d114a85da2 to your computer and use it in GitHub Desktop.
Simple tools progress raw links before subconverter
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Subconverter</title> | |
</head> | |
<body> | |
<div id="pagewrap"> | |
<p>Author:<a href="https://www.microcharon.top" target="_blank">Microcharon - The Way of Developer</a></p> | |
<p>Node File Path: | |
<br> | |
<br> | |
<textarea id="filepath" placeholder="Support Single Node, massive nodes and local file path" cols="50" rows="10"></textarea></p> | |
<p>Converte format to:<select id="subtype"> | |
<option value="clash">Clash</option> | |
<option value="mixed">Base64 General</option> | |
</select> | |
</p> | |
<p><input type="button" value="Generate" onclick="create();"></p> | |
<p><a id="kd" style="pointer-events: none;">Please Generate Link First!</a></p> | |
</div> | |
<script> | |
function create() { | |
var kd = document.getElementById('kd'); | |
var filepath = document.getElementById('filepath'); | |
var subtype = document.getElementById('subtype'); | |
if (filepath.value === "") { | |
alert("The local node file path cannot be empty!"); | |
return false; | |
} | |
var url = 'http://localhost:25500/sub?target=' + subtype.value + '&url=' + encodeURIComponent(filepath.value.replace(/\n/g, "|")) + '&insert=false'; | |
kd.href = url; | |
kd.innerText = url; | |
} | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment