diff options
author | Ajay Ramachandran <[email protected]> | 2019-08-10 19:57:11 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2019-08-10 19:57:11 -0400 |
commit | b700d4eec042e2681c49ae69267d9dd8c90db722 (patch) | |
tree | 9758e6c890dabf84b089c216e50c036940dd3d7e /background.js | |
parent | 3f7e9e22ec0f0845a501ff4cc8c8571508e4dd2f (diff) | |
parent | 5be8ecb32b3a69ebd083686d3b711f5e38131c2d (diff) | |
download | SponsorBlock-b700d4eec042e2681c49ae69267d9dd8c90db722.tar.gz SponsorBlock-b700d4eec042e2681c49ae69267d9dd8c90db722.zip |
Merge pull request #72 from OfficialNoob/patch-10
Added Utils file + Updated Parser
Diffstat (limited to 'background.js')
-rw-r--r-- | background.js | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/background.js b/background.js index d60dfb84..171b5f39 100644 --- a/background.js +++ b/background.js @@ -265,11 +265,5 @@ function sendRequestToServer(type, address, callback) { xmlhttp.send(); } -function getYouTubeVideoID(url) { // Return video id or 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; -} - //uuid generator function from https://gist.github.com/jed/982883 function generateUUID(a){return a?(a^Math.random()*16>>a/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,generateUUID)} |