diff --git a/public/options/options.html b/public/options/options.html
index 05a6e911..9daef3b3 100644
--- a/public/options/options.html
+++ b/public/options/options.html
@@ -309,23 +309,6 @@
-
-
-
-
-
-
-
__MSG_whatQueryByHashPrefix__
-
-
-
-
-
diff --git a/src/config.ts b/src/config.ts
index a385e581..05c23780 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -35,7 +35,6 @@ interface SBConfig {
audioNotificationOnSkip,
checkForUnlistedVideos: boolean,
testingServer: boolean,
- hashPrefix: boolean,
refetchWhenNotFound: boolean,
ytInfoPermissionGranted: boolean,
@@ -169,7 +168,6 @@ const Config: SBObject = {
audioNotificationOnSkip: false,
checkForUnlistedVideos: false,
testingServer: false,
- hashPrefix: true,
refetchWhenNotFound: true,
ytInfoPermissionGranted: false,
diff --git a/src/content.ts b/src/content.ts
index 9270977a..00b9f850 100644
--- a/src/content.ts
+++ b/src/content.ts
@@ -564,33 +564,22 @@ async function sponsorsLookup(id: string) {
}
// Check for hashPrefix setting
- let getRequest;
- if (Config.config.hashPrefix) {
- const hashPrefix = (await utils.getHash(id, 1)).substr(0, 4);
- getRequest = utils.asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, {
- categories
- });
- } else {
- getRequest = utils.asyncRequestToServer('GET', "/api/skipSegments", {
- videoID: id,
- categories
- });
- }
- getRequest.then(async (response: FetchResponse) => {
+ const hashPrefix = (await utils.getHash(id, 1)).substr(0, 4);
+ utils.asyncRequestToServer('GET', "/api/skipSegments/" + hashPrefix, {
+ categories
+ }).then(async (response: FetchResponse) => {
if (response?.ok) {
let result = JSON.parse(response.responseText);
- if (Config.config.hashPrefix) {
- result = result.filter((video) => video.videoID === id);
- if (result.length > 0) {
- result = result[0].segments;
- if (result.length === 0) { // return if no segments found
- retryFetch(id);
- return;
- }
- } else { // return if no video found
+ result = result.filter((video) => video.videoID === id);
+ if (result.length > 0) {
+ result = result[0].segments;
+ if (result.length === 0) { // return if no segments found
retryFetch(id);
return;
}
+ } else { // return if no video found
+ retryFetch(id);
+ return;
}
const recievedSegments: SponsorTime[] = result;
@@ -1594,14 +1583,6 @@ function hotkeyListener(e: KeyboardEvent): void {
}
}
-/**
- * Is this an unlisted YouTube video.
- * Assumes that the the privacy info is available.
- */
-function isUnlisted(): boolean {
- return videoInfo?.microformat?.playerMicroformatRenderer?.isUnlisted || videoInfo?.videoDetails?.isPrivate;
-}
-
/**
* Adds the CSS to the page if needed. Required on optional sites with Chrome.
*/