Skip to content

Commit

Permalink
chore: build rc
Browse files Browse the repository at this point in the history
  • Loading branch information
Sv443 committed Aug 28, 2024
1 parent 0e498a9 commit 0635e65
Showing 1 changed file with 67 additions and 59 deletions.
126 changes: 67 additions & 59 deletions dist/BetterYTM.user.js
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
// @license AGPL-3.0-only
// @author Sv443
// @copyright Sv443 (https://github.com/Sv443)
// @icon https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/logo/logo_dev_48.png
// @icon https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/logo/logo_dev_48.png
// @match https://music.youtube.com/*
// @match https://www.youtube.com/*
// @run-at document-start
@@ -33,55 +33,55 @@
// @grant GM.openInTab
// @grant unsafeWindow
// @noframes
// @resource css-above_queue_btns https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/aboveQueueBtns.css
// @resource css-anchor_improvements https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/anchorImprovements.css
// @resource css-auto_like https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/autoLike.css
// @resource css-bundle https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/dist/BetterYTM.css
// @resource css-fix_hdr https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/fixHDR.css
// @resource css-fix_playerpage_theming https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/fixPlayerPageTheming.css
// @resource css-fix_spacing https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/fixSpacing.css
// @resource css-fix_sponsorblock https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/fixSponsorBlock.css
// @resource css-show_votes https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/showVotes.css
// @resource css-vol_slider_size https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/style/volSliderSize.css
// @resource doc-changelog https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/changelog.md
// @resource icon-advanced_mode https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/plus_circle_small.svg
// @resource icon-arrow_down https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/arrow_down.svg
// @resource icon-auto_like https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/auto_like.svg
// @resource icon-auto_like_enabled https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/auto_like_enabled.svg
// @resource icon-clear_list https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/clear_list.svg
// @resource icon-copy https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/copy.svg
// @resource icon-delete https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/delete.svg
// @resource icon-edit https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/edit.svg
// @resource icon-error https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/error.svg
// @resource icon-experimental https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/beaker_small.svg
// @resource icon-globe https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/globe.svg
// @resource icon-globe_small https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/globe_small.svg
// @resource icon-help https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/help.svg
// @resource icon-image https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/image.svg
// @resource icon-image_filled https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/image_filled.svg
// @resource icon-link https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/link.svg
// @resource icon-lyrics https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/lyrics.svg
// @resource icon-reload https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/refresh.svg
// @resource icon-skip_to https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/skip_to.svg
// @resource icon-spinner https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/spinner.svg
// @resource icon-upload https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/icons/upload.svg
// @resource img-close https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/close.png
// @resource img-discord https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/external/discord.png
// @resource img-github https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/external/github.png
// @resource img-greasyfork https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/external/greasyfork.png
// @resource img-logo https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/logo/logo_48.png
// @resource img-logo_dev https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/logo/logo_dev_48.png
// @resource img-openuserjs https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/images/external/openuserjs.png
// @resource trans-de_DE https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/de_DE.json
// @resource trans-en_UK https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/en_UK.json
// @resource trans-en_US https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/en_US.json
// @resource trans-es_ES https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/es_ES.json
// @resource trans-fr_FR https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/fr_FR.json
// @resource trans-hi_IN https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/hi_IN.json
// @resource trans-ja_JA https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/ja_JA.json
// @resource trans-pt_BR https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/pt_BR.json
// @resource trans-zh_CN https://raw.githubusercontent.com/Sv443/BetterYTM/a116d98b/assets/translations/zh_CN.json
// @require https://cdn.jsdelivr.net/npm/@sv443-network/userutils@7.1.0/dist/index.global.js
// @resource css-above_queue_btns https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/aboveQueueBtns.css
// @resource css-anchor_improvements https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/anchorImprovements.css
// @resource css-auto_like https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/autoLike.css
// @resource css-bundle https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/dist/BetterYTM.css
// @resource css-fix_hdr https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/fixHDR.css
// @resource css-fix_playerpage_theming https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/fixPlayerPageTheming.css
// @resource css-fix_spacing https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/fixSpacing.css
// @resource css-fix_sponsorblock https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/fixSponsorBlock.css
// @resource css-show_votes https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/showVotes.css
// @resource css-vol_slider_size https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/style/volSliderSize.css
// @resource doc-changelog https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/changelog.md
// @resource icon-advanced_mode https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/plus_circle_small.svg
// @resource icon-arrow_down https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/arrow_down.svg
// @resource icon-auto_like https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/auto_like.svg
// @resource icon-auto_like_enabled https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/auto_like_enabled.svg
// @resource icon-clear_list https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/clear_list.svg
// @resource icon-copy https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/copy.svg
// @resource icon-delete https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/delete.svg
// @resource icon-edit https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/edit.svg
// @resource icon-error https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/error.svg
// @resource icon-experimental https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/beaker_small.svg
// @resource icon-globe https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/globe.svg
// @resource icon-globe_small https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/globe_small.svg
// @resource icon-help https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/help.svg
// @resource icon-image https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/image.svg
// @resource icon-image_filled https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/image_filled.svg
// @resource icon-link https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/link.svg
// @resource icon-lyrics https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/lyrics.svg
// @resource icon-reload https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/refresh.svg
// @resource icon-skip_to https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/skip_to.svg
// @resource icon-spinner https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/spinner.svg
// @resource icon-upload https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/icons/upload.svg
// @resource img-close https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/close.png
// @resource img-discord https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/external/discord.png
// @resource img-github https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/external/github.png
// @resource img-greasyfork https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/external/greasyfork.png
// @resource img-logo https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/logo/logo_48.png
// @resource img-logo_dev https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/logo/logo_dev_48.png
// @resource img-openuserjs https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/images/external/openuserjs.png
// @resource trans-de_DE https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/de_DE.json
// @resource trans-en_UK https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/en_UK.json
// @resource trans-en_US https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/en_US.json
// @resource trans-es_ES https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/es_ES.json
// @resource trans-fr_FR https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/fr_FR.json
// @resource trans-hi_IN https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/hi_IN.json
// @resource trans-ja_JA https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/ja_JA.json
// @resource trans-pt_BR https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/pt_BR.json
// @resource trans-zh_CN https://raw.githubusercontent.com/Sv443/BetterYTM/0e498a95/assets/translations/zh_CN.json
// @require https://cdn.jsdelivr.net/npm/@sv443-network/userutils@7.2.1/dist/index.global.js
// @require https://cdn.jsdelivr.net/npm/marked@12.0.2/lib/marked.umd.js
// @require https://cdn.jsdelivr.net/npm/compare-versions@6.1.0/lib/umd/index.js
// @require https://cdn.jsdelivr.net/npm/dompurify@3.1.6
@@ -132,7 +132,7 @@ var PluginIntent;
const modeRaw = "development";
const branchRaw = "develop";
const hostRaw = "github";
const buildNumberRaw = "a116d98b";
const buildNumberRaw = "0e498a95";
/** The mode in which the script was built (production or development) */
const mode = (modeRaw.match(/^#{{.+}}$/) ? "production" : modeRaw);
/** The branch to use in various URLs that point to the GitHub repo */
@@ -1822,7 +1822,7 @@ var updates = {
openuserjs: "https://openuserjs.org/scripts/Sv443/BetterYTM"
};
var dependencies = {
"@sv443-network/userutils": "^7.1.0",
"@sv443-network/userutils": "^7.2.1",
"compare-versions": "^6.1.0",
dompurify: "^3.1.6",
marked: "^12.0.2",
@@ -4088,6 +4088,7 @@ async function initAutoLike() {
getFeature("autoLikeShowToast") && showIconToast({
message: t(`auto_liked_a_channels_${getCurrentMediaType()}`, likeChan.name),
icon: "icon-auto_like",
onClick: () => getAutoLikeDialog().then((dlg) => dlg.open()),
});
log(`Auto-liked ${getCurrentMediaType()} from channel '${likeChan.name}' (${likeChan.id})`);
}
@@ -4146,6 +4147,7 @@ async function initAutoLike() {
getFeature("autoLikeShowToast") && showIconToast({
message: t("auto_liked_a_channels_video", likeChan.name),
icon: "icon-auto_like",
onClick: () => getAutoLikeDialog().then((dlg) => dlg.open()),
});
log(`Auto-liked video from channel '${likeChan.name}' (${likeChan.id})`);
}
@@ -6853,16 +6855,22 @@ function copyToClipboard(text) {
}
}
let ttPolicy;
/** On Firefox, sets innerHTML directly, on Chromium, uses a [TrustedTypes](https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API) policy to set the HTML */
/** Sets innerHTML directly on Firefox and Safari, while on Chromium a [Trusted Types policy](https://developer.mozilla.org/en-US/docs/Web/API/Trusted_Types_API) is used to set the HTML */
function setInnerHtml(element, html) {
var _a, _b;
if (!ttPolicy && ((_a = window === null || window === void 0 ? void 0 : window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy))
ttPolicy = (_b = window.trustedTypes) === null || _b === void 0 ? void 0 : _b.createPolicy("default", {
createHTML: (unsafeHtml) => DOMPurify.sanitize(unsafeHtml, {
RETURN_TRUSTED_TYPE: false,
var _a;
if (!ttPolicy && ((_a = window === null || window === void 0 ? void 0 : window.trustedTypes) === null || _a === void 0 ? void 0 : _a.createPolicy)) {
ttPolicy = window.trustedTypes.createPolicy("my-policy", {
createHTML: (dirty) => DOMPurify.sanitize(dirty, {
RETURN_TRUSTED_TYPE: true,
}),
});
element.innerHTML = ttPolicy ? ttPolicy.createHTML(html) : html;
}
if (ttPolicy)
element.innerHTML = ttPolicy.createHTML(html);
else {
UserUtils.debounce(() => warn("Trusted Types policy not available, using innerHTML directly"), 1000, "rising")();
element.innerHTML = html;
}
}/**
* Constructs a URL from a base URL and a record of query parameters.
* If a value is null, the parameter will be valueless. If a value is undefined, the parameter will be omitted.

0 comments on commit 0635e65

Please sign in to comment.