Created
January 30, 2022 18:55
-
-
Save themegabyte/e1c1e0860d72b63d67f442a6b655962a to your computer and use it in GitHub Desktop.
PTCL Auto Toggle DSL Mode to Reconnect Internet without Rebooting Router.
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
javascript: (() => { | |
function checkLogin() { | |
username = document.getElementById("Frm_Username"); | |
password = document.getElementById("Frm_Password"); | |
loginButton = document.getElementById("LoginId"); | |
if (username == null) { | |
first(); | |
} else { | |
if (username.value === "") { | |
username.value = "admin"; | |
password.value = "admin"; | |
loginButton.click(); | |
} else { | |
loginButton.click(); | |
} | |
} | |
} | |
function first() { | |
my_element1 = document.getElementById("mmAdvanceSetUp"); | |
my_element1.click(); | |
setTimeout(second, 1000); | |
} | |
function second() { | |
my_element = document.getElementById("smDslModuation"); | |
my_element.click(); | |
setTimeout(third, 1000); | |
} | |
function third() { | |
my_element = document.getElementById("ModulationTypeSet6"); | |
if (my_element.checked === true) { | |
my_element.checked = false; | |
} else { | |
my_element.checked = true; | |
} | |
setTimeout(fourth, 1000); | |
} | |
function fourth() { | |
my_element = document.getElementById("Btn_apply_dslInterface"); | |
my_element.click(); | |
console.log("Completed"); | |
} | |
checkLogin(); | |
})(); | |
// Add to Chrome Bookmark and Execute on router page. | |
// Router v. ZXHN H168N V3.5 V3.5.7P2_PK1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment