more security
This commit is contained in:
parent
54e0fa1a11
commit
104f950cbb
1 changed files with 7 additions and 0 deletions
|
@ -3,6 +3,12 @@ function go() {
|
||||||
let browserFrame = tabGroup.getActiveTab().webview
|
let browserFrame = tabGroup.getActiveTab().webview
|
||||||
let browser = tabGroup.getActiveTab()
|
let browser = tabGroup.getActiveTab()
|
||||||
let url = document.getElementById("txtUrl").value
|
let url = document.getElementById("txtUrl").value
|
||||||
|
if (url.includes("youtube.com") || url.includes("youtu.be")) {
|
||||||
|
url = url.replaceAll("youtube.com", "yewtu.be")
|
||||||
|
url = url.replaceAll("youtu.be", "yewtu.be")
|
||||||
|
} else if (url.includes("google.com")) {
|
||||||
|
url = url.replaceAll("google.com", "startpage.com")
|
||||||
|
}
|
||||||
document.getElementById("txtUrl").value = ""
|
document.getElementById("txtUrl").value = ""
|
||||||
browserFrame.loadURL(url);
|
browserFrame.loadURL(url);
|
||||||
browserFrame.addEventListener('dom-ready', () => {
|
browserFrame.addEventListener('dom-ready', () => {
|
||||||
|
@ -52,3 +58,4 @@ function clickPress(keyEvent) {
|
||||||
go()
|
go()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue