Initial commit: Plex Auto Skip Chrome extension

This commit is contained in:
Justin Oro
2026-08-16 22:55:33 -07:00
commit 0f1f2a309e
14 changed files with 1522 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
const DEFAULT_SETTINGS = {
plexUrl: "https://app.plex.tv",
skipIntro: true,
skipCredits: true
};
function normalizePlexUrl(input) {
let value = (input || "").trim();
if (!value) return DEFAULT_SETTINGS.plexUrl;
if (!/^https?:\/\//i.test(value)) value = "http://" + value;
return value;
}
function getHostFromUrl(urlString) {
try {
return new URL(urlString).hostname;
} catch (e) {
return null;
}
}
function hostMatchesConfig(currentHostname, configuredUrl) {
const configuredHost = getHostFromUrl(configuredUrl);
if (!configuredHost) return false;
return currentHostname === configuredHost;
}