Merge branch 'master' of https://github.com/ajayyy/SponsorBlock into experimental

# Conflicts:
#	content.js
#	firefox_manifest.json
#	manifest.json
This commit is contained in:
Ajay Ramachandran
2019-07-28 17:24:25 -04:00
3 changed files with 69 additions and 54 deletions

View File

@@ -602,6 +602,8 @@ function sponsorMessageStarted() {
}
function submitSponsorTimes() {
if(!confirm("Are you sure you want to submit this?")) return;
if (document.getElementById("submitButton").style.display == "none") {
//don't submit, not ready
return;
@@ -683,5 +685,6 @@ function sendRequestToCustomServer(type, fullAddress, callback) {
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;
}
var id = new URL(url).searchParams.get("v");
return (match && match[7].length == 11) ? id : false;
}