mirror of
https://github.com/anticensority/runet-censorship-bypass.git
synced 2025-02-07 07:10:36 +03:00
Reset PacChooserForm on checked empty custom/own url
This commit is contained in:
parent
0eb6194bc6
commit
ffd5fb5306
|
@ -4,13 +4,13 @@ pacChooserForm.addEventListener('change', function (event) {
|
|||
console.log('ON CHANGE:', event);
|
||||
pacChooserForm.reportValidity();
|
||||
});
|
||||
|
||||
/*
|
||||
pacChooserForm.addEventListener('formdata', (event) => {
|
||||
event.preventDefault();
|
||||
console.log('ON FORMDATA', event);
|
||||
return false; // Prevent default action.
|
||||
});
|
||||
|
||||
*/
|
||||
editPacUrlButton.onclick = function (event) {
|
||||
event.preventDefault();
|
||||
const lockUrl = () => { customPacUrl.disabled = true; };
|
||||
|
@ -24,7 +24,7 @@ editPacUrlButton.onclick = function (event) {
|
|||
if (ifUrlValid) {
|
||||
lockUrl();
|
||||
own.disabled = false;
|
||||
// TODO: Save to storage.
|
||||
// TODO: Save to storage.
|
||||
return false;
|
||||
}
|
||||
// Empty or incorrect url.
|
||||
|
@ -32,6 +32,9 @@ editPacUrlButton.onclick = function (event) {
|
|||
const ifUrlEmpty = !customPacUrl.value;
|
||||
if (ifUrlEmpty) {
|
||||
lockUrl();
|
||||
if (own.checked) {
|
||||
disabled.checked = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user