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)}
diff --git a/content.js b/content.js
index 73348973..656b0e83 100644
--- a/content.js
+++ b/content.js
@@ -1143,26 +1143,3 @@ function sendRequestToCustomServer(type, fullAddress, callback) {
//submit this request
xmlhttp.send();
}
-
-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);
- var id = new URL(url).searchParams.get("v");
- if (url.includes("/embed/")) {
- //it is an embed, don't search for v
- id = match[7];
- }
-
- return (match && match[7].length == 11) ? id : false;
-}
-
-//returns the start time of the video if there was one specified (ex. ?t=5s)
-function getYouTubeVideoStartTime(url) {
- let searchParams = new URL(url).searchParams;
- var startTime = searchParams.get("t");
- if (startTime == null) {
- startTime = searchParams.get("time_continue");
- }
-
- return startTime;
-}
\ No newline at end of file
diff --git a/manifest.json b/manifest.json
index 2391ccb5..544b9501 100644
--- a/manifest.json
+++ b/manifest.json
@@ -11,6 +11,7 @@
"all_frames": true,
"js": [
"config.js",
+ "utils.js",
"content.js",
"popup.js"
],
@@ -46,6 +47,7 @@
},
"background": {
"scripts":[
+ "utils.js",
"config.js",
"background.js"
],
diff --git a/popup.html b/popup.html
index be45142b..30195294 100644
--- a/popup.html
+++ b/popup.html
@@ -193,5 +193,6 @@
+
-