mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-17 13:30:01 -04:00
Updated Alloy Page
This commit is contained in:
parent
f737c20f0b
commit
6ca4ea9c0a
1 changed files with 12 additions and 11 deletions
|
@ -58,17 +58,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<script>
|
<script>
|
||||||
// Add active class to the current button (highlight it)
|
function $(id) {
|
||||||
var header = document.getElementById("scontainer");
|
return document.getElementById(id);
|
||||||
var btns = header.getElementsByClassName("select");
|
};
|
||||||
for (var i = 0; i < btns.length; i++) {
|
$('scontainer').onclick = function() {
|
||||||
btns[i].addEventListener("click", function() {
|
var url = $('url').value;
|
||||||
var current = document.getElementsByClassName("active");
|
var det = document.domain;
|
||||||
if (current.length > 0) {
|
var domain = det.replace('www.', '').split(/[/?#]/)[0];
|
||||||
current[0].className = current[0].className.replace(" active", "");
|
window.location.href = "https://cdn." + domain + "/alloy?url=" + url;
|
||||||
}
|
return false;
|
||||||
this.className += " active";
|
};
|
||||||
});
|
window.onload = function() {
|
||||||
|
$('url').focus();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue