|
@@ -2,7 +2,7 @@ import { addParent, autoPlural, debounce, fetchAdvanced, pauseFor } from "@sv443
|
|
import { getFeature, getFeatures } from "../config.js";
|
|
import { getFeature, getFeatures } from "../config.js";
|
|
import { siteEvents } from "../siteEvents.js";
|
|
import { siteEvents } from "../siteEvents.js";
|
|
import { addSelectorListener } from "../observers.js";
|
|
import { addSelectorListener } from "../observers.js";
|
|
-import { error, getResourceUrl, log, warn, t, onInteraction, openInTab, getBestThumbnailUrl, getDomain, addStyle, currentMediaType, domLoaded, waitVideoElementReady, getVideoTime, fetchCss, addStyleFromResource, fetchVideoVotes, getWatchId, getLocale, tp } from "../utils/index.js";
|
|
|
|
|
|
+import { error, getResourceUrl, log, warn, t, onInteraction, openInTab, getBestThumbnailUrl, getDomain, addStyle, currentMediaType, domLoaded, waitVideoElementReady, getVideoTime, fetchCss, addStyleFromResource, fetchVideoVotes, getWatchId, getLocale, dbg, tp } from "../utils/index.js";
|
|
import { mode, scriptInfo } from "../constants.js";
|
|
import { mode, scriptInfo } from "../constants.js";
|
|
import { openCfgMenu } from "../menu/menu_old.js";
|
|
import { openCfgMenu } from "../menu/menu_old.js";
|
|
import { createCircularBtn, createRipple } from "../components/index.js";
|
|
import { createCircularBtn, createRipple } from "../components/index.js";
|
|
@@ -312,7 +312,7 @@ function improveSidebarAnchors(sidebarItems: NodeListOf<HTMLElement>) {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
-//#region share tracking
|
|
|
|
|
|
+//#region share track par.
|
|
|
|
|
|
/** Removes the ?si tracking parameter from share URLs */
|
|
/** Removes the ?si tracking parameter from share URLs */
|
|
export async function initRemShareTrackParam() {
|
|
export async function initRemShareTrackParam() {
|
|
@@ -342,6 +342,7 @@ export async function initRemShareTrackParam() {
|
|
addSelectorListener("body", sharePanelSel, {
|
|
addSelectorListener("body", sharePanelSel, {
|
|
listener: (sharePanelEl) => {
|
|
listener: (sharePanelEl) => {
|
|
const obs = new MutationObserver(() => {
|
|
const obs = new MutationObserver(() => {
|
|
|
|
+ dbg("># TODO:#DBG share panel changed");
|
|
const inputElem = sharePanelEl.querySelector<HTMLInputElement>(inputSel);
|
|
const inputElem = sharePanelEl.querySelector<HTMLInputElement>(inputSel);
|
|
inputElem && removeSiParam(inputElem);
|
|
inputElem && removeSiParam(inputElem);
|
|
});
|
|
});
|
|
@@ -349,6 +350,7 @@ export async function initRemShareTrackParam() {
|
|
obs.observe(sharePanelEl, {
|
|
obs.observe(sharePanelEl, {
|
|
childList: true,
|
|
childList: true,
|
|
subtree: true,
|
|
subtree: true,
|
|
|
|
+ characterData: true,
|
|
attributeFilter: ["aria-hidden", "aria-checked", "checked"],
|
|
attributeFilter: ["aria-hidden", "aria-checked", "checked"],
|
|
});
|
|
});
|
|
},
|
|
},
|