Merge pull request #30 from OfficialNoob/patch-1

Added confirm for submitSponsorTimes
This commit is contained in:
Ajay Ramachandran 2019-07-27 11:12:36 -04:00 committed by GitHub
commit 7f505a52ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -593,12 +593,12 @@ function sponsorMessageStarted() {
}
function submitSponsorTimes() {
console.log("Tessst")
if(!confirm("Are you sure you want to submit this?")) return;
if (document.getElementById("submitButton").style.display == "none") {
//don't submit, not ready
return;
}
console.log("Test")
//add loading animation
document.getElementById("submitButtonImage").src = chrome.extension.getURL("icons/PlayerUploadIconSponsorBlocker256px.png");
@ -677,4 +677,4 @@ function getYouTubeVideoID(url) { // Returns with video id else returns false
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
var match = url.match(regExp);
return (match && match[7].length == 11) ? match[7] : false;
}
}