mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Made it not error when a non YouTube page was open
This commit is contained in:
parent
fc8257e491
commit
7c0b43ac69
1 changed files with 7 additions and 4 deletions
11
popup.js
11
popup.js
|
@ -32,10 +32,13 @@ chrome.tabs.query({
|
|||
})
|
||||
|
||||
function infoFound(request) {
|
||||
if (request.found) {
|
||||
document.getElementById("videoFound").innerHTML = "This video's sponsors are in the database!"
|
||||
} else {
|
||||
document.getElementById("videoFound").innerHTML = "No sponsors found"
|
||||
//if request is undefined, then the page currently being browsed is not YouTube
|
||||
if (request != undefined) {
|
||||
if (request.found) {
|
||||
document.getElementById("videoFound").innerHTML = "This video's sponsors are in the database!"
|
||||
} else {
|
||||
document.getElementById("videoFound").innerHTML = "No sponsors found"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue