-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated syntax to support refactored common file
- Loading branch information
1 parent
1cb8476
commit 3f10060
Showing
1 changed file
with
16 additions
and
10 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 |
---|---|---|
@@ -1,23 +1,29 @@ | ||
/* ----------------------------------------------- | ||
/* Authors: OlyB | ||
/* Authors: OlyB, QuiteAFancyEmerald | ||
/* GNU Affero General Public License v3.0: https://www.gnu.org/licenses/agpl-3.0.en.html | ||
/* prSet script | ||
/* ----------------------------------------------- */ | ||
|
||
function prSet(type) { | ||
var prUrl = document.getElementById("pr-url"), | ||
prGo1 = document.getElementById("pr-go1"), | ||
prGo2 = document.getElementById("pr-go2"); | ||
var prUrl = document.getElementById("pr-url"); | ||
var prGo1 = document.getElementById("pr-go1"); | ||
var prGo2 = document.getElementById("pr-go2"); | ||
|
||
prUrl.addEventListener("keydown", function(e) { | ||
if (e.code == "Enter" && prUrl.value) goProx[type](prUrl.value); | ||
}, false); | ||
if (e.code === "Enter" && prUrl.value.trim() !== "") { | ||
goProx[type](prUrl.value.trim()); | ||
} | ||
}); | ||
|
||
prGo1.addEventListener("click", function() { | ||
if (prUrl.value) goProx[type](prUrl.value); | ||
}, false); | ||
if (prUrl.value.trim() !== "") { | ||
goProx[type](prUrl.value.trim(), "window"); // Classic Mode | ||
} | ||
}); | ||
|
||
prGo2.addEventListener("click", function() { | ||
if (prUrl.value) goProx[type](prUrl.value, true); | ||
}, false); | ||
if (prUrl.value.trim() !== "") { | ||
goProx[type](prUrl.value.trim(), "stealth"); // Stealth Mode | ||
} | ||
}); | ||
} |