From a680b766eddd4c6864ef938412193127b033c814 Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Thu, 7 Dec 2023 07:57:38 -0500 Subject: [PATCH 01/15] chore: update extension icons --- public/icons/icon_128.png | Bin 6769 -> 1285 bytes public/icons/icon_16.png | Bin 4362 -> 283 bytes public/icons/icon_19.png | Bin 4742 -> 309 bytes public/icons/icon_38.png | Bin 5098 -> 505 bytes public/icons/icon_48.png | Bin 4930 -> 568 bytes 5 files changed, 0 insertions(+), 0 deletions(-) diff --git a/public/icons/icon_128.png b/public/icons/icon_128.png index a9cffd3aed7fadcf254d525d7f57b4714f948fe0..731c01904d59d3041e2071c176fc1725b57b83ca 100644 GIT binary patch delta 1231 zcmexp(#kbKWipF^T0P5BPZ!6Kid%2*IA+L%${hdr-rIbm?}WP-7lj+VwKc z-1pKAmEYeta9>r;OuK&O+?jLlnGffgo!s|#|M&Ud)9&4t6c7Y~dN4_VnAoth>fgx( z`wtoycx_lpLUZ{U<~n3Q{r>&!hv#t&VvR~0LT+{)SbOTTYl7Sk&NGbmmKuNVJDq(~ z`G7Z}{K&1H3^i}&oW3@ff$coQ;{ypxCoX=*o**=1g}LOJH}z~A^cPwGR(*aa;Vfsu z1*SdxGRyziy!yuwS6r~Nk7WbL@!G4F*W>>#n$Gr@rDD6Mlzf7|LF$J^eGJ<&Lz)90 zcnBZ6%T<&4G$nv3=i(2}2aDDEY&rKVX1Q^z_`qRbx&IrkR;r1#vs5UueSFV652z?l zL9Nta0n3d$lMPok|C>>NWaj-hM~{fHH}F-csEIx#5B`*MXGOPTqSFU;(dVs>0O_vH(dt!+8es%G}un)lx}s5jK#Uc_D@ z`Qy~~pkm7xtD*v8Vq>2_IT_j~o1LD!_Tp>4-7-`5d|@!%_nymur$)ZOT6}J?>iPQI z4_?k~4QHPeX;1SruZp>tOu^R#ZfkI-ihXUh8{Jw?Ckqs5m)-n_H9 z^roI!w*2$8%b&{~RyWRDFSII|>zlhV_gBVeVYUwY6qlwOvG&R3CZ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ee8fazRzZI&P)qOv6nvyDt zkO()5G2L|Z;Rn$TA`i-*G+IaNyRU_QL~LoUNxwXOB`G%gUg`bA;$klNta};t3l}rI)X>-{f_VmUk{R%3wXs%OBUboJt&m z1hbsAXOt5IVS~xmwv`FR10UtrC0|PsEhxkeqXP+P~n3AH=08}CAc4l63}+lfv^akE|DbQpS} z4ShuC3?Tz1kBZkOt9sK+uI=G9zYchvkKA8e*U>J!um_cmt{p!k>$yE(6LIg&@dDj7 k-Ae!Q&DX=dkCq`1&#QG*_FY&8Zyo`AYe%bV+kFrHA1WrIfdBvi diff --git a/public/icons/icon_16.png b/public/icons/icon_16.png index 35b8d37d7ced46cb165f0a61bd9588e62db8a30f..677f00e14a9cad278c51e177166130dad35332cf 100644 GIT binary patch delta 220 zcmV<203-j3BAWt`B$ERWCx5$1L_t(I%k9!XN&{gK1@PY&S1SwC2)608Ns$ZW8de@4 zRgRDg*jVHcR`xbw8<7M&LDJ;}BINH_xCtN2Vxwgq49v`%dCUyM34cZk5(cB|xtYC*r5o0`Hf^Ei+TDUoe!{NKKeADSHt5M7ut}8#Vz&x|B zqNdn{1E0{wCgUzr(8KhX6|O`)RV%#I1RjgTEPjr7hx6JICyCGC73+rS)~7%G2Ydsc Wv@ty$E>+V20000}jWdS`L_g3ILE$?H!2 zs>SwxS#Srs^mDgMUNv!ckt1X5ne8*0n}2p{V&2?e%Y3uX{U&Ak^*icmTxd(%nQ~=o zUFz-koQ?Nyo!I>Gh6@YNZc2MtKjK-7SVjG1uUk`WJD2w6sgPyXXYXCDA=__n`}9Ga zU>!L*UNt2vbM(HM*PDIg-UO$!l#~9t&_BKFwkG95+xf*wn{FX#2okrRvs#^YtF<>7 zn8GWot4+DbveKK13-WU2B$qow$DO;s-77z|bIzm&3-{Q&|6UgUSE`1~brq#2oUN>y zw)OE*sU=TNElMzV#5cAz*+0vff3Mh8n(}2sDD%SKSDmkqU(fD*gUwHJYER_Oy6jPW zG$*k*W&K)YqjHwAAfKIdpd-EbPDkf0#U}?2x7;^;zq7I#smV=e4$&$6_!i$1>dNZN z#AA7~PDAHih>so#v&@!QKDNm{4e$FnjZJ3vCIH7jACdU+s}Q?uN#7ZT>R9I&bC^ z3D2aD*=OGH)preD7b6GR(DGJ?tZChmt^TK;iEDUrPum}_USrw=yO9Sa7w3QT-3rID z+uLu>vu#a}i*G;DRA$?LXYGlp%f7b1kknj#PqV?363u*#|0KTZVAelgZeO};+Uw)8 zb{$&sVO(Eh_g+@VOIZ>`$C7&xp zjbSfKxw7Z=K)^SXyi^o}6plwC5k*9;;KL=j(qJ&)gbG)wFsOkED+3}O#R9?%38EV# z8wgC83yK^cKqXAt!s!*$2zQzF0b51_wUihpGbfsvP9fW_LLIEF=m_ zIDar^1<4+yDROK-S%YGeR$}Q43^2cHA@)u-O+d%Y91f<)3BVJpDqD-Fi;ZnArVfQopzI4r6BqxP9H6@&;afM zF5u-OLjRJR^MeABmiScaNK&QOsY$(-)WXMpr9~htz+RM4m4rgAiLFS5p|mp^SsX_mx4ki%f4j?+)!Rxq_b%eKu|)ZrU*SnsN95-QX43Z79%ti zF+iX9a_q|gr7dkA)Yx70Tuy-gSH?u$d#V70y5G8AeOzoap=fMdP&Ct>f-l!v?P z|3;Ur|1bpt@E=eF9+fPeSSvhcC3^B~*+`f4-BbVib|`r$n7dd&kTE}zt~li7SAGhG zqeQzSXVjHZBNAre`6VSPl~d=tMov#ooZ|Xj)wU0VyKdYFo&5OH$+nxz*%#5H@fGA= z%O5gap?l@@nkg3_W}bVb_Uw*Fla$Y2sV3Jn{z5l(-Lrc*qq^qwwF5&UW#@d bOAC&umnqKduylL@b3p7l3$ov`EUWwvO)M~L diff --git a/public/icons/icon_19.png b/public/icons/icon_19.png index f7f99e5e33b83fbbf431645655993f9f273ec16e..50f91e7733783d8775962a98b577392413d80b21 100644 GIT binary patch delta 282 zcmV+#0p=6YS4X42O>q@fDrUQ_a8o2ib9s z>0ExlUn$FhqBy9z(}dz2RpLDhHiC~o-s~zN8%4x>Qip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ications/provider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useNotifications/provider.tsx b/src/hooks/useNotifications/provider.tsx index 8292a39b..d39d72d6 100644 --- a/src/hooks/useNotifications/provider.tsx +++ b/src/hooks/useNotifications/provider.tsx @@ -14,7 +14,7 @@ export const NotificationsProvider = ({ children }: NotificationProviderProps) = return; } - const removeNotificationAfterMs = action && action === "reset_settings" ? 10_000 : 3_000; + const removeNotificationAfterMs = action && action === "reset_settings" ? 15_000 : 5_000; const notification = { action, message, removeAfterMs: removeNotificationAfterMs, timestamp: +new Date(), type } satisfies Notification; setNotifications((notifications) => [notification, ...notifications]); From 36d91d7f4be417db138cddb62ccdfbaf49b7c9a9 Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Sun, 10 Dec 2023 18:36:15 -0500 Subject: [PATCH 03/15] feat: add open transcript button to feature menu Closes #164 --- public/locales/en-US.json | 7 + public/locales/en-US.json.d.ts | 235 +++++++++++---------- src/components/Settings/Settings.tsx | 8 + src/features/openTranscriptButton/index.ts | 89 ++++++++ src/pages/content/index.tsx | 13 ++ src/pages/inject/index.tsx | 5 + src/types/index.ts | 2 + src/utils/EventManager.ts | 1 + src/utils/constants.ts | 2 + 9 files changed, 247 insertions(+), 115 deletions(-) create mode 100644 src/features/openTranscriptButton/index.ts diff --git a/public/locales/en-US.json b/public/locales/en-US.json index d94056df..d9f9aade 100644 --- a/public/locales/en-US.json +++ b/public/locales/en-US.json @@ -23,6 +23,9 @@ }, "volumeBoostButton": { "label": "Volume Boost" + }, + "openTranscriptButton": { + "label": "Open Transcript" } } }, @@ -98,6 +101,10 @@ "automaticTheaterMode": { "title": "Automatically enables theater mode when you load a video", "label": "Automatic theater mode" + }, + "openTranscriptButton": { + "title": "Adds a button to the feature menu to open the transcript of the video you're watching", + "label": "Open transcript button" } } }, diff --git a/public/locales/en-US.json.d.ts b/public/locales/en-US.json.d.ts index fe7912d1..a52b1e10 100644 --- a/public/locales/en-US.json.d.ts +++ b/public/locales/en-US.json.d.ts @@ -1,199 +1,204 @@ interface EnUS { langCode: "en-US"; langName: "English (US)"; + messages: { + resumingVideo: "Resuming video at {{VIDEO_TIME}}"; + settingVolume: "Setting volume boost to {{VOLUME_BOOST_AMOUNT}}"; + }; pages: { content: { features: { - videoHistory: { resumePrompt: { close: "Close" }; resumeButton: "Resume" }; - screenshotButton: { copiedToClipboard: "Screenshot copied to clipboard"; label: "Screenshot" }; + featureMenu: { label: "Feature menu" }; loopButton: { label: "Loop" }; maximizePlayerButton: { label: "Maximize" }; - featureMenu: { label: "Feature menu" }; + openTranscriptButton: { label: "Open Transcript" }; + screenshotButton: { copiedToClipboard: "Screenshot copied to clipboard"; label: "Screenshot" }; + videoHistory: { resumeButton: "Resume"; resumePrompt: { close: "Close" } }; volumeBoostButton: { label: "Volume Boost" }; }; }; options: { notifications: { - success: { saved: "Options saved." }; info: { reset: 'All options have been reset to their default values.\nYou can now save the changes by clicking the "Confirm" button or discard them by closing this page or ignore this notification.'; }; + success: { saved: "Options saved." }; }; }; }; settings: { + clearData: { + allDataDeleted: "All data has been deleted."; + confirmAlert: "This will delete all extension data related to options. Continue?"; + }; sections: { + automaticQuality: { + enable: { + label: "Automatic quality adjustment"; + title: "Automatically adjusts the video quality to the selected level."; + }; + select: { label: "Player quality"; title: "The quality to set the video to" }; + title: "Automatic quality settings"; + }; + bottomButtons: { + clear: { + title: "Clears all data this extension has stored on your machine"; + value: "Clear Data"; + }; + confirm: { title: "Confirm setting reset"; value: "Confirm" }; + reset: { + title: "Resets all settings to their defaults, Click the confirm button to save the changes"; + value: "Reset"; + }; + }; featureMenu: { openType: { - title: "Feature menu settings"; select: { label: "Menu Activation Type"; - title: "Select the method to activate the feature menu"; options: { click: "Click"; hover: "Hover" }; + title: "Select the method to activate the feature menu"; }; + title: "Feature menu settings"; }; }; importExportSettings: { + exportButton: { + success: "Settings successfully exported"; + title: "Export settings to a JSON file"; + value: "Export Settings"; + }; importButton: { error: { - validation: "Error importing settings. Please check the file format.\n{{ERROR_MESSAGE}}"; unknown: "Error importing settings. Please check the file format.\nAn unknown error occurred."; + validation: "Error importing settings. Please check the file format.\n{{ERROR_MESSAGE}}"; }; success: "Settings imported successfully"; title: "Import settings from a JSON file"; value: "Import Settings"; }; - exportButton: { - success: "Settings successfully exported"; - title: "Export settings to a JSON file"; - value: "Export Settings"; - }; + }; + language: { + select: { label: "Language"; title: "The language to use for the extension" }; + title: "Language"; }; miscellaneous: { - title: "Miscellaneous settings"; features: { - rememberLastVolume: { - title: "Remembers the volume of the last video you were watching and sets it when you open a new video"; - label: "Remember last volume"; + automaticTheaterMode: { + label: "Automatic theater mode"; + title: "Automatically enables theater mode when you load a video"; }; - maximizePlayerButton: { title: "Fills the video to the window size"; label: "Maximize player button" }; - videoHistory: { - title: "Keeps track of where you left off on videos you were watching and asks if you want to resume when that video loads again"; - label: "Video history"; + hideScrollbar: { label: "Hide scrollbar"; title: "Hides the pages scrollbar" }; + loopButton: { + label: "Loop button"; + title: "Adds a button to the player to loop the video you're watching"; + }; + maximizePlayerButton: { label: "Maximize player button"; title: "Fills the video to the window size" }; + openTranscriptButton: { + label: "Open transcript button"; + title: "Adds a button to the feature menu to open the transcript of the video you're watching"; }; remainingTime: { - title: "Shows the remaining time of the video you're watching"; label: "Remaining time"; + title: "Shows the remaining time of the video you're watching"; }; - loopButton: { - title: "Adds a button to the player to loop the video you're watching"; - label: "Loop button"; + rememberLastVolume: { + label: "Remember last volume"; + title: "Remembers the volume of the last video you were watching and sets it when you open a new video"; }; - hideScrollbar: { title: "Hides the pages scrollbar"; label: "Hide scrollbar" }; - automaticTheaterMode: { - title: "Automatically enables theater mode when you load a video"; - label: "Automatic theater mode"; + videoHistory: { + label: "Video history"; + title: "Keeps track of where you left off on videos you were watching and asks if you want to resume when that video loads again"; }; }; + title: "Miscellaneous settings"; }; - scrollWheelVolumeControl: { - title: "Scroll wheel volume control settings"; + playbackSpeed: { enable: { - title: "Lets you use the scroll wheel to control the volume of the video you're watching"; - label: "Scroll wheel volume control"; + label: "Forced playback speed"; + title: "Sets the video speed to what you choose below"; }; - osdColor: { title: "Select the color for the On-Screen Display"; label: "OSD Color" }; - osdType: { title: "Select the style of On-Screen Display"; label: "OSD Type" }; - osdPosition: { title: "Select the position of the On-Screen Display"; label: "OSD Position" }; - osdOpacity: { - title: "Adjust the transparency of the On-Screen Display"; - label: "OSD Opacity"; + select: { label: "Player speed"; title: "The speed to set the video to" }; + title: "Playback speed settings"; + }; + screenshotButton: { + enable: { + label: "Screenshot button"; + title: "Adds a button to the player to take a screenshot of the video"; }; - osdVolumeAdjustmentSteps: { - title: "Adjust the volume change per scroll"; - label: "Volume Change Per Scroll"; + saveAs: { clipboard: "Clipboard"; file: "File" }; + selectFormat: { label: "Screenshot format"; title: "The format to save the screenshot in" }; + selectSaveAs: { label: "Screenshot save type"; title: "The screenshot save type" }; + title: "Screenshot settings"; + }; + scrollWheelVolumeControl: { + enable: { + label: "Scroll wheel volume control"; + title: "Lets you use the scroll wheel to control the volume of the video you're watching"; }; - osdHide: { - title: "Specify the time, in milliseconds, before automatically hiding the OSD"; - label: "Hide Delay"; + holdModifierKey: { + enable: { + label: "Enable when holding modifier key"; + title: "Press a modifier key to enable volume adjustment with the scroll wheel."; + }; + optionLabel: "{{KEY}} key"; + select: { label: "Modifier key"; title: "The modifier key to use" }; }; - osdPadding: { - title: "Adjust the spacing around the on-screen display (OSD) in pixels. This applies specifically to corner OSD."; - label: "Padding"; + holdRightClick: { + enable: { + label: "Enable when holding right click"; + title: "Hold right click to enable scroll wheel volume control"; + }; }; onScreenDisplay: { colors: { - red: "Red"; - green: "Green"; blue: "Blue"; - yellow: "Yellow"; + green: "Green"; orange: "Orange"; - purple: "Purple"; pink: "Pink"; + purple: "Purple"; + red: "Red"; white: "White"; + yellow: "Yellow"; }; position: { - top_left: "Top Left"; - top_right: "Top Right"; bottom_left: "Bottom Left"; bottom_right: "Bottom Right"; center: "Center"; + top_left: "Top Left"; + top_right: "Top Right"; }; - type: { no_display: "No display"; text: "Text"; line: "Line"; round: "Round" }; + type: { line: "Line"; no_display: "No display"; round: "Round"; text: "Text" }; }; - holdModifierKey: { - enable: { - title: "Press a modifier key to enable volume adjustment with the scroll wheel."; - label: "Enable when holding modifier key"; - }; - optionLabel: "{{KEY}} key"; - select: { label: "Modifier key"; title: "The modifier key to use" }; + osdColor: { label: "OSD Color"; title: "Select the color for the On-Screen Display" }; + osdHide: { + label: "Hide Delay"; + title: "Specify the time, in milliseconds, before automatically hiding the OSD"; }; - holdRightClick: { - enable: { - title: "Hold right click to enable scroll wheel volume control"; - label: "Enable when holding right click"; - }; + osdOpacity: { + label: "OSD Opacity"; + title: "Adjust the transparency of the On-Screen Display"; }; - }; - automaticQuality: { - title: "Automatic quality settings"; - enable: { - title: "Automatically adjusts the video quality to the selected level."; - label: "Automatic quality adjustment"; + osdPadding: { + label: "Padding"; + title: "Adjust the spacing around the on-screen display (OSD) in pixels. This applies specifically to corner OSD."; }; - select: { label: "Player quality"; title: "The quality to set the video to" }; - }; - playbackSpeed: { - title: "Playback speed settings"; - enable: { - title: "Sets the video speed to what you choose below"; - label: "Forced playback speed"; + osdPosition: { label: "OSD Position"; title: "Select the position of the On-Screen Display" }; + osdType: { label: "OSD Type"; title: "Select the style of On-Screen Display" }; + osdVolumeAdjustmentSteps: { + label: "Volume Change Per Scroll"; + title: "Adjust the volume change per scroll"; }; - select: { label: "Player speed"; title: "The speed to set the video to" }; + title: "Scroll wheel volume control settings"; }; volumeBoost: { - title: "Volume boost settings"; enable: { - title: "Boosts the volume of the video you're watching"; label: "Volume boost"; + title: "Boosts the volume of the video you're watching"; }; number: { label: "Volume boost amount (dB)"; title: "The amount to boost the volume by" }; - }; - screenshotButton: { - title: "Screenshot settings"; - enable: { - title: "Adds a button to the player to take a screenshot of the video"; - label: "Screenshot button"; - }; - selectSaveAs: { label: "Screenshot save type"; title: "The screenshot save type" }; - selectFormat: { label: "Screenshot format"; title: "The format to save the screenshot in" }; - saveAs: { file: "File"; clipboard: "Clipboard" }; - }; - bottomButtons: { - confirm: { title: "Confirm setting reset"; value: "Confirm" }; - clear: { - title: "Clears all data this extension has stored on your machine"; - value: "Clear Data"; - }; - reset: { - title: "Resets all settings to their defaults, Click the confirm button to save the changes"; - value: "Reset"; - }; - }; - language: { - title: "Language"; - select: { label: "Language"; title: "The language to use for the extension" }; + title: "Volume boost settings"; }; }; - clearData: { - confirmAlert: "This will delete all extension data related to options. Continue?"; - allDataDeleted: "All data has been deleted."; - }; - }; - messages: { - settingVolume: "Setting volume boost to {{VOLUME_BOOST_AMOUNT}}"; - resumingVideo: "Resuming video at {{VIDEO_TIME}}"; }; } diff --git a/src/components/Settings/Settings.tsx b/src/components/Settings/Settings.tsx index 1a2fc53d..dead2ce8 100644 --- a/src/components/Settings/Settings.tsx +++ b/src/components/Settings/Settings.tsx @@ -495,6 +495,14 @@ export default function Settings() { title={t("settings.sections.miscellaneous.features.automaticTheaterMode.title")} type="checkbox" /> + diff --git a/src/features/openTranscriptButton/index.ts b/src/features/openTranscriptButton/index.ts new file mode 100644 index 00000000..ce048f56 --- /dev/null +++ b/src/features/openTranscriptButton/index.ts @@ -0,0 +1,89 @@ +import eventManager from "@/src/utils/EventManager"; +import { waitForSpecificMessage } from "@/src/utils/utilities"; + +import { addFeatureItemToMenu, removeFeatureItemFromMenu } from "../featureMenu/utils"; + +export async function openTranscriptButton() { + // Wait for the "options" message from the content script + const optionsData = await waitForSpecificMessage("options", "request_data", "content"); + if (!optionsData) return; + const { + data: { options } + } = optionsData; + // Extract the necessary properties from the options object + const { enable_open_transcript_button: enableOpenTranscriptButton } = options; + // If the open transcript button option is disabled, return + if (!enableOpenTranscriptButton) return; + const transcriptButton = document.querySelector("ytd-video-description-transcript-section-renderer button"); + if (!transcriptButton) return; + void addTranscriptButton(); +} +async function addTranscriptButton() { + const transcriptSvgIcon = makeTranscriptSvgIcon(); + function transcriptButtonClickerListener() { + const transcriptButton = document.querySelector("ytd-video-description-transcript-section-renderer button"); + if (!transcriptButton) return; + transcriptButton.click(); + } + await addFeatureItemToMenu({ + featureName: "openTranscriptButton", + icon: transcriptSvgIcon, + label: window.i18nextInstance.t("pages.content.features.openTranscriptButton.label"), + listener: transcriptButtonClickerListener + }); +} +export function removeTranscriptButton() { + removeFeatureItemFromMenu("openTranscriptButton"); + eventManager.removeEventListeners("openTranscriptButton"); +} +function makeTranscriptSvgIcon() { + const transcriptSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + transcriptSVG.style.height = "24px"; + transcriptSVG.style.width = "24px"; + transcriptSVG.setAttributeNS(null, "stroke-width", "0"); + transcriptSVG.setAttributeNS(null, "stroke", "currentColor"); + transcriptSVG.setAttributeNS(null, "viewBox", "0 0 24 24"); + const path1 = document.createElementNS("http://www.w3.org/2000/svg", "path"); + path1.setAttributeNS( + null, + "d", + "M5 16C5 15.4477 5.44772 15 6 15H14C14.5523 15 15 15.4477 15 16C15 16.5523 14.5523 17 14 17H6C5.44772 17 5 16.5523 5 16Z" + ); + path1.setAttributeNS(null, "fill", "currentColor"); + const path2 = document.createElementNS("http://www.w3.org/2000/svg", "path"); + path2.setAttributeNS( + null, + "d", + "M18 11C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H10C9.44772 13 9 12.5523 9 12C9 11.4477 9.44772 11 10 11H18Z" + ); + path2.setAttributeNS(null, "fill", "currentColor"); + const path3 = document.createElementNS("http://www.w3.org/2000/svg", "path"); + path3.setAttributeNS( + null, + "d", + "M16 16C16 15.4477 16.4477 15 17 15H18C18.5523 15 19 15.4477 19 16C19 16.5523 18.5523 17 18 17H17C16.4477 17 16 16.5523 16 16Z" + ); + path3.setAttributeNS(null, "fill", "currentColor"); + const path4 = document.createElementNS("http://www.w3.org/2000/svg", "path"); + path4.setAttributeNS( + null, + "d", + "M7 11C7.55228 11 8 11.4477 8 12C8 12.5523 7.55228 13 7 13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H7Z" + ); + path4.setAttributeNS(null, "fill", "currentColor"); + const path5 = document.createElementNS("http://www.w3.org/2000/svg", "path"); + path5.setAttributeNS(null, "fill-rule", "evenodd"); + path5.setAttributeNS(null, "clip-rule", "evenodd"); + path5.setAttributeNS(null, "fill", "currentColor"); + path5.setAttributeNS( + null, + "d", + "M4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4ZM20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44771 20.5523 5 20 5Z" + ); + transcriptSVG.appendChild(path1); + transcriptSVG.appendChild(path2); + transcriptSVG.appendChild(path3); + transcriptSVG.appendChild(path4); + transcriptSVG.appendChild(path5); + return transcriptSVG; +} diff --git a/src/pages/content/index.tsx b/src/pages/content/index.tsx index bcc42945..6e15a5f1 100644 --- a/src/pages/content/index.tsx +++ b/src/pages/content/index.tsx @@ -8,6 +8,7 @@ import { hideScrollBar, showScrollBar } from "@/src/features/hideScrollBar/utils import { addLoopButton, removeLoopButton } from "@/src/features/loopButton"; import { addMaximizePlayerButton, removeMaximizePlayerButton } from "@/src/features/maximizePlayerButton"; import { maximizePlayer } from "@/src/features/maximizePlayerButton/utils"; +import { openTranscriptButton, removeTranscriptButton } from "@/src/features/openTranscriptButton"; import setPlayerQuality from "@/src/features/playerQuality"; import { restorePlayerSpeed, setPlayerSpeed, setupPlaybackSpeedChangeListener } from "@/src/features/playerSpeed"; import { removeRemainingTimeDisplay, setupRemainingTime } from "@/src/features/remainingTime"; @@ -88,6 +89,7 @@ window.addEventListener("DOMContentLoaded", function () { await waitForAllElements(["div#player", "div#player-wide-container", "div#video-container", "div#player-container"]); eventManager.removeAllEventListeners(["featureMenu"]); void enableFeatureMenu(); + void openTranscriptButton(); void addLoopButton(); void addMaximizePlayerButton(); void volumeBoost(); @@ -296,6 +298,17 @@ window.addEventListener("DOMContentLoaded", function () { setupFeatureMenuEventListeners(featureMenuOpenType); break; } + case "openTranscriptButtonChange": { + const { + data: { openTranscriptButtonEnabled } + } = message; + if (openTranscriptButtonEnabled) { + void openTranscriptButton(); + } else { + void removeTranscriptButton(); + } + break; + } default: { return; } diff --git a/src/pages/inject/index.tsx b/src/pages/inject/index.tsx index 18172af6..2962947c 100644 --- a/src/pages/inject/index.tsx +++ b/src/pages/inject/index.tsx @@ -215,6 +215,11 @@ const storageChangeHandler = async (changes: StorageChanges, areaName: string) = maximizePlayerButtonEnabled: newValue }); }, + enable_open_transcript_button: (newValue) => { + sendExtensionOnlyMessage("openTranscriptButtonChange", { + openTranscriptButtonEnabled: newValue + }); + }, enable_remaining_time: (newValue) => { sendExtensionOnlyMessage("remainingTimeChange", { remainingTimeEnabled: newValue diff --git a/src/types/index.ts b/src/types/index.ts index 584fbc3b..a0281f34 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -47,6 +47,7 @@ export type configuration = { enable_hide_scrollbar: boolean; enable_loop_button: boolean; enable_maximize_player_button: boolean; + enable_open_transcript_button: boolean; enable_remaining_time: boolean; enable_remember_last_volume: boolean; enable_screenshot_button: boolean; @@ -118,6 +119,7 @@ export type ExtensionSendOnlyMessageMappings = { languageChange: DataResponseMessage<"languageChange", { language: AvailableLocales }>; loopButtonChange: DataResponseMessage<"loopButtonChange", { loopButtonEnabled: boolean }>; maximizeButtonChange: DataResponseMessage<"maximizeButtonChange", { maximizePlayerButtonEnabled: boolean }>; + openTranscriptButtonChange: DataResponseMessage<"openTranscriptButtonChange", { openTranscriptButtonEnabled: boolean }>; playerSpeedChange: DataResponseMessage<"playerSpeedChange", { enableForcedPlaybackSpeed: boolean; playerSpeed?: number }>; remainingTimeChange: DataResponseMessage<"remainingTimeChange", { remainingTimeEnabled: boolean }>; rememberVolumeChange: DataResponseMessage<"rememberVolumeChange", { rememberVolumeEnabled: boolean }>; diff --git a/src/utils/EventManager.ts b/src/utils/EventManager.ts index 2a642e96..bda63bd3 100644 --- a/src/utils/EventManager.ts +++ b/src/utils/EventManager.ts @@ -4,6 +4,7 @@ export type FeatureName = | "hideScrollBar" | "loopButton" | "maximizePlayerButton" + | "openTranscriptButton" | "playerQuality" | "playerSpeed" | "remainingTime" diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 7d7e09e3..f35ec285 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -21,6 +21,7 @@ export const defaultConfiguration = { enable_hide_scrollbar: false, enable_loop_button: false, enable_maximize_player_button: false, + enable_open_transcript_button: false, enable_remaining_time: false, enable_remember_last_volume: false, enable_screenshot_button: false, @@ -56,6 +57,7 @@ export const configurationImportSchema: TypeToPartialZodSchema = enable_hide_scrollbar: z.boolean().optional(), enable_loop_button: z.boolean().optional(), enable_maximize_player_button: z.boolean().optional(), + enable_open_transcript_button: z.boolean().optional(), enable_remaining_time: z.boolean().optional(), enable_remember_last_volume: z.boolean().optional(), enable_screenshot_button: z.boolean().optional(), From 90cc70af1b08f1ca7081771ad7c573c9fd67a9df Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Sun, 10 Dec 2023 18:38:09 -0500 Subject: [PATCH 04/15] update translation consistency --- public/locales/en-US.json | 4 ++-- public/locales/en-US.json.d.ts | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/public/locales/en-US.json b/public/locales/en-US.json index d9f9aade..c2fb057c 100644 --- a/public/locales/en-US.json +++ b/public/locales/en-US.json @@ -79,7 +79,7 @@ "label": "Remember last volume" }, "maximizePlayerButton": { - "title": "Fills the video to the window size", + "title": "Adds a button to the feature menu to maximize the player", "label": "Maximize player button" }, "videoHistory": { @@ -91,7 +91,7 @@ "label": "Remaining time" }, "loopButton": { - "title": "Adds a button to the player to loop the video you're watching", + "title": "Adds a button to the feature menu to loop the video you're watching", "label": "Loop button" }, "hideScrollbar": { diff --git a/public/locales/en-US.json.d.ts b/public/locales/en-US.json.d.ts index a52b1e10..2640544f 100644 --- a/public/locales/en-US.json.d.ts +++ b/public/locales/en-US.json.d.ts @@ -90,9 +90,12 @@ interface EnUS { hideScrollbar: { label: "Hide scrollbar"; title: "Hides the pages scrollbar" }; loopButton: { label: "Loop button"; - title: "Adds a button to the player to loop the video you're watching"; + title: "Adds a button to the feature menu to loop the video you're watching"; + }; + maximizePlayerButton: { + label: "Maximize player button"; + title: "Adds a button to the feature menu to maximize the player"; }; - maximizePlayerButton: { label: "Maximize player button"; title: "Fills the video to the window size" }; openTranscriptButton: { label: "Open transcript button"; title: "Adds a button to the feature menu to open the transcript of the video you're watching"; From b67e134b88abfe2fb5dc8324459822ae500b9967 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:45:06 +0000 Subject: [PATCH 05/15] build(deps-dev): bump tailwind-merge from 2.0.0 to 2.1.0 Bumps [tailwind-merge](https://github.com/dcastil/tailwind-merge) from 2.0.0 to 2.1.0. - [Release notes](https://github.com/dcastil/tailwind-merge/releases) - [Commits](https://github.com/dcastil/tailwind-merge/compare/v2.0.0...v2.1.0) --- updated-dependencies: - dependency-name: tailwind-merge dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 18 +++++++++--------- yarn.lock | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index eded5007..88ec88d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "license": "MIT", "dependencies": { "@formkit/auto-animate": "^0.8.1", @@ -264,9 +264,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", - "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", + "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", "dependencies": { "regenerator-runtime": "^0.14.0" }, @@ -11930,12 +11930,12 @@ } }, "node_modules/tailwind-merge": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.0.0.tgz", - "integrity": "sha512-WO8qghn9yhsldLSg80au+3/gY9E4hFxIvQ3qOmlpXnqpDKoMruKfi/56BbbMg6fHTQJ9QD3cc79PoWqlaQE4rw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.1.0.tgz", + "integrity": "sha512-l11VvI4nSwW7MtLSLYT4ldidDEUwQAMWuSHk7l4zcXZDgnCRa0V3OdCwFfM7DCzakVXMNRwAeje9maFFXT71dQ==", "dev": true, "dependencies": { - "@babel/runtime": "^7.23.1" + "@babel/runtime": "^7.23.5" }, "funding": { "type": "github", diff --git a/yarn.lock b/yarn.lock index 3d5569b4..ec13cc6f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -34,10 +34,10 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/runtime@^7.21.0", "@babel/runtime@^7.23.1", "@babel/runtime@^7.23.2": - version "7.23.2" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz" - integrity sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg== +"@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.23.5": + version "7.23.5" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.5.tgz#11edb98f8aeec529b82b211028177679144242db" + integrity sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w== dependencies: regenerator-runtime "^0.14.0" @@ -5595,11 +5595,11 @@ synckit@^0.8.5: tslib "^2.5.0" tailwind-merge@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.0.0.tgz" - integrity sha512-WO8qghn9yhsldLSg80au+3/gY9E4hFxIvQ3qOmlpXnqpDKoMruKfi/56BbbMg6fHTQJ9QD3cc79PoWqlaQE4rw== + version "2.1.0" + resolved "https://registry.yarnpkg.com/tailwind-merge/-/tailwind-merge-2.1.0.tgz#541b407e0ec255651e92571d96b685e48f01999c" + integrity sha512-l11VvI4nSwW7MtLSLYT4ldidDEUwQAMWuSHk7l4zcXZDgnCRa0V3OdCwFfM7DCzakVXMNRwAeje9maFFXT71dQ== dependencies: - "@babel/runtime" "^7.23.1" + "@babel/runtime" "^7.23.5" tailwindcss@^3.3.5: version "3.3.5" From ff5d2c6532d5c5e10ad89b9396d2ef282858a8c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:45:18 +0000 Subject: [PATCH 06/15] build(deps-dev): bump eslint-config-prettier from 9.0.0 to 9.1.0 Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 9.0.0 to 9.1.0. - [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-config-prettier/compare/v9.0.0...v9.1.0) --- updated-dependencies: - dependency-name: eslint-config-prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- yarn.lock | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index eded5007..eae847eb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "license": "MIT", "dependencies": { "@formkit/auto-animate": "^0.8.1", @@ -4146,9 +4146,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" diff --git a/yarn.lock b/yarn.lock index 3d5569b4..b55ffaf4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2271,9 +2271,9 @@ escape-string-regexp@^4.0.0: integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-config-prettier@^9.0.0: - version "9.0.0" - resolved "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz" - integrity sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw== + version "9.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" + integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== eslint-import-resolver-node@^0.3.9: version "0.3.9" From f76e4052d4f4836523d7589b32aa25f595d9985a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:45:32 +0000 Subject: [PATCH 07/15] build(deps-dev): bump nodemon from 3.0.1 to 3.0.2 Bumps [nodemon](https://github.com/remy/nodemon) from 3.0.1 to 3.0.2. - [Release notes](https://github.com/remy/nodemon/releases) - [Commits](https://github.com/remy/nodemon/compare/v3.0.1...v3.0.2) --- updated-dependencies: - dependency-name: nodemon dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 21 ++++++--------------- yarn.lock | 10 +++++----- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index eded5007..967d62e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "license": "MIT", "dependencies": { "@formkit/auto-animate": "^0.8.1", @@ -6467,13 +6467,13 @@ "dev": true }, "node_modules/nodemon": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz", - "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.2.tgz", + "integrity": "sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA==", "dev": true, "dependencies": { "chokidar": "^3.5.2", - "debug": "^3.2.7", + "debug": "^4", "ignore-by-default": "^1.0.1", "minimatch": "^3.1.2", "pstree.remy": "^1.1.8", @@ -6494,15 +6494,6 @@ "url": "https://opencollective.com/nodemon" } }, - "node_modules/nodemon/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, "node_modules/nodemon/node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", diff --git a/yarn.lock b/yarn.lock index 3d5569b4..12d788b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1928,7 +1928,7 @@ date-fns@^2.30.0: dependencies: "@babel/runtime" "^7.21.0" -debug@4, debug@^4.0.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@^4, debug@^4.0.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -4134,12 +4134,12 @@ node-releases@^2.0.13: integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== nodemon@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/nodemon/-/nodemon-3.0.1.tgz" - integrity sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw== + version "3.0.2" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-3.0.2.tgz#222dd0de79fc7b7b3eedba422d2b9e5fc678621e" + integrity sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA== dependencies: chokidar "^3.5.2" - debug "^3.2.7" + debug "^4" ignore-by-default "^1.0.1" minimatch "^3.1.2" pstree.remy "^1.1.8" From 409c25c051a80d2c0c79b488231a15627afcfe5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:45:45 +0000 Subject: [PATCH 08/15] build(deps-dev): bump ts-node from 10.9.1 to 10.9.2 Bumps [ts-node](https://github.com/TypeStrong/ts-node) from 10.9.1 to 10.9.2. - [Release notes](https://github.com/TypeStrong/ts-node/releases) - [Changelog](https://github.com/TypeStrong/ts-node/blob/main/development-docs/release-template.md) - [Commits](https://github.com/TypeStrong/ts-node/compare/v10.9.1...v10.9.2) --- updated-dependencies: - dependency-name: ts-node dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 10 +++++----- yarn.lock | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index eded5007..0655e4de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "license": "MIT", "dependencies": { "@formkit/auto-animate": "^0.8.1", @@ -12199,9 +12199,9 @@ } }, "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { "@cspotcode/source-map-support": "^0.8.0", diff --git a/yarn.lock b/yarn.lock index 3d5569b4..03302bb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5762,9 +5762,9 @@ ts-json-as-const@^1.0.7: stringify-object "^4.0.0" ts-node@^10.9.1: - version "10.9.1" - resolved "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz" - integrity sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw== + version "10.9.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.2.tgz#70f021c9e185bccdca820e26dc413805c101c71f" + integrity sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ== dependencies: "@cspotcode/source-map-support" "^0.8.0" "@tsconfig/node10" "^1.0.7" From 1219a050509aa58e3f4e22a23a0d0e1a14a6c9a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 01:45:58 +0000 Subject: [PATCH 09/15] build(deps-dev): bump @types/chrome from 0.0.253 to 0.0.254 Bumps [@types/chrome](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/chrome) from 0.0.253 to 0.0.254. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/chrome) --- updated-dependencies: - dependency-name: "@types/chrome" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 12 ++++++------ package.json | 2 +- yarn.lock | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index eded5007..4ce7c31f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "youtube-enhancer", - "version": "1.16.1", + "version": "1.16.3", "license": "MIT", "dependencies": { "@formkit/auto-animate": "^0.8.1", @@ -24,7 +24,7 @@ "@thedutchcoder/postcss-rem-to-px": "^0.0.2", "@total-typescript/ts-reset": "^0.5.1", "@types/archiver": "^6.0.1", - "@types/chrome": "^0.0.253", + "@types/chrome": "^0.0.254", "@types/node": "^20.9.0", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", @@ -1784,9 +1784,9 @@ } }, "node_modules/@types/chrome": { - "version": "0.0.253", - "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.253.tgz", - "integrity": "sha512-ZnBlbeoje0XaBrJbFCXI8DsDfqvqdoWQO5NSGecMCHFC8W8z/rb/n7lI1FHob+TFKKLR4L2c3QJJSFLwtVc9TA==", + "version": "0.0.254", + "resolved": "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.254.tgz", + "integrity": "sha512-svkOGKwA+6ZZuk9xtrYun8MYpNY/9hD17rgZ19v3KunhsK1ZOKaMESw12/1AXLh1u3UPA8jQIRi2370DXv9wgw==", "dev": true, "dependencies": { "@types/filesystem": "*", diff --git a/package.json b/package.json index 496f9499..0ae2c0a0 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@thedutchcoder/postcss-rem-to-px": "^0.0.2", "@total-typescript/ts-reset": "^0.5.1", "@types/archiver": "^6.0.1", - "@types/chrome": "^0.0.253", + "@types/chrome": "^0.0.254", "@types/node": "^20.9.0", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", diff --git a/yarn.lock b/yarn.lock index 3d5569b4..58b37612 100644 --- a/yarn.lock +++ b/yarn.lock @@ -884,10 +884,10 @@ dependencies: "@types/readdir-glob" "*" -"@types/chrome@^0.0.253": - version "0.0.253" - resolved "https://registry.npmjs.org/@types/chrome/-/chrome-0.0.253.tgz" - integrity sha512-ZnBlbeoje0XaBrJbFCXI8DsDfqvqdoWQO5NSGecMCHFC8W8z/rb/n7lI1FHob+TFKKLR4L2c3QJJSFLwtVc9TA== +"@types/chrome@^0.0.254": + version "0.0.254" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.254.tgz#f1caadc129134f71bfaa29f9f0295939048da173" + integrity sha512-svkOGKwA+6ZZuk9xtrYun8MYpNY/9hD17rgZ19v3KunhsK1ZOKaMESw12/1AXLh1u3UPA8jQIRi2370DXv9wgw== dependencies: "@types/filesystem" "*" "@types/har-format" "*" From 57951660af1859751f6c3c53688c5eb910e02e78 Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Tue, 12 Dec 2023 07:53:17 -0500 Subject: [PATCH 10/15] chore(settings): set codeActionsOnSave to always --- .vscode/settings.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e434d28a..3e80068d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,8 @@ { "typescript.tsdk": "node_modules\\typescript\\lib", - "i18n-ally.localesPaths": ["public/locales"] + "i18n-ally.localesPaths": ["public/locales"], + "editor.codeActionsOnSave": { + "source.fixAll": "always" + }, + "eslint.codeActionsOnSave.mode": "all" } From 0396cb4bab881f09c61126d5743c3a21acadb6ef Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Tue, 12 Dec 2023 08:06:05 -0500 Subject: [PATCH 11/15] refactor: Enhance SVG creation with utility. Enhance code readability and maintainability by streamlining SVG element creation This update facilitates future modifications and additions to SVG elements. --- src/features/featureMenu/index.ts | 25 +- src/features/loopButton/utils.ts | 24 +- src/features/maximizePlayerButton/utils.ts | 47 +- src/features/openTranscriptButton/index.ts | 80 +- src/features/screenshotButton/index.ts | 42 +- src/features/volumeBoost/index.ts | 28 +- src/utils/SVGElementAttributes.ts | 4114 ++++++++++++++++++++ src/utils/utilities.ts | 22 + 8 files changed, 4254 insertions(+), 128 deletions(-) create mode 100644 src/utils/SVGElementAttributes.ts diff --git a/src/features/featureMenu/index.ts b/src/features/featureMenu/index.ts index b9db8a98..76764831 100644 --- a/src/features/featureMenu/index.ts +++ b/src/features/featureMenu/index.ts @@ -1,7 +1,7 @@ import type { FeatureMenuOpenType, YouTubePlayerDiv } from "@/src/types"; import eventManager from "@/src/utils/EventManager"; -import { createStyledElement, createTooltip, isShortsPage, isWatchPage, waitForAllElements } from "@/src/utils/utilities"; +import { createSVGElement, createStyledElement, createTooltip, isShortsPage, isWatchPage, waitForAllElements } from "@/src/utils/utilities"; import { waitForSpecificMessage } from "../../utils/utilities"; @@ -71,18 +71,19 @@ async function createFeatureMenuButton() { setupFeatureMenuEventListeners(featureMenuOpenType); } function makeFeatureMenuIcon() { - const featureButtonSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - featureButtonSVG.setAttribute("viewBox", "0 0 36 36"); - featureButtonSVG.setAttribute("height", "48px"); - featureButtonSVG.setAttribute("width", "48px"); - featureButtonSVG.setAttribute("fill", "white"); - const featureButtonSVGPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - featureButtonSVGPath.setAttribute( - "d", - "M 9.1273596,13.56368 H 13.56368 V 9.1273596 H 9.1273596 Z M 15.78184,26.872641 h 4.43632 V 22.43632 h -4.43632 z m -6.6544804,0 H 13.56368 V 22.43632 H 9.1273596 Z m 0,-6.654481 H 13.56368 V 15.78184 H 9.1273596 Z m 6.6544804,0 h 4.43632 V 15.78184 H 15.78184 Z M 22.43632,9.1273596 V 13.56368 h 4.436321 V 9.1273596 Z M 15.78184,13.56368 h 4.43632 V 9.1273596 h -4.43632 z m 6.65448,6.65448 h 4.436321 V 15.78184 H 22.43632 Z m 0,6.654481 h 4.436321 V 22.43632 H 22.43632 Z" + const featureButtonSVG = createSVGElement( + "svg", + { + fill: "white", + height: "48px", + viewBox: "0 0 36 36", + width: "48px" + }, + createSVGElement("path", { + d: "M 9.1273596,13.56368 H 13.56368 V 9.1273596 H 9.1273596 Z M 15.78184,26.872641 h 4.43632 V 22.43632 h -4.43632 z m -6.6544804,0 H 13.56368 V 22.43632 H 9.1273596 Z m 0,-6.654481 H 13.56368 V 15.78184 H 9.1273596 Z m 6.6544804,0 h 4.43632 V 15.78184 H 15.78184 Z M 22.43632,9.1273596 V 13.56368 h 4.436321 V 9.1273596 Z M 15.78184,13.56368 h 4.43632 V 9.1273596 h -4.43632 z m 6.65448,6.65448 h 4.436321 V 15.78184 H 22.43632 Z m 0,6.654481 h 4.436321 V 22.43632 H 22.43632 Z", + fill: "white" + }) ); - featureButtonSVGPath.setAttribute("fill", "white"); - featureButtonSVG.appendChild(featureButtonSVGPath); return featureButtonSVG; } diff --git a/src/features/loopButton/utils.ts b/src/features/loopButton/utils.ts index b2c8aa2b..242fd063 100644 --- a/src/features/loopButton/utils.ts +++ b/src/features/loopButton/utils.ts @@ -1,3 +1,5 @@ +import { createSVGElement } from "@/src/utils/utilities"; + export function loopButtonClickListener() { const videoElement = document.querySelector("video.html5-main-video"); if (!videoElement) return; @@ -9,14 +11,18 @@ export function loopButtonClickListener() { } } export function makeLoopIcon() { - const loopSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - loopSVG.setAttributeNS(null, "stroke-width", "0"); - loopSVG.setAttributeNS(null, "fill", "white"); - loopSVG.setAttributeNS(null, "height", "24"); - loopSVG.setAttributeNS(null, "width", "24"); - loopSVG.setAttributeNS(null, "viewBox", "0 0 24 24"); - const loopPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - loopPath.setAttributeNS(null, "d", "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"); - loopSVG.appendChild(loopPath); + const loopSVG = createSVGElement( + "svg", + { + fill: "white", + height: "24", + "stroke-width": "0", + viewBox: "0 0 24 24", + width: "24" + }, + createSVGElement("path", { + d: "M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4" + }) + ); return loopSVG; } diff --git a/src/features/maximizePlayerButton/utils.ts b/src/features/maximizePlayerButton/utils.ts index dc823cf5..db0177a9 100644 --- a/src/features/maximizePlayerButton/utils.ts +++ b/src/features/maximizePlayerButton/utils.ts @@ -1,34 +1,33 @@ import type { YouTubePlayerDiv } from "@/src/types"; import eventManager from "@/src/utils/EventManager"; +import { createSVGElement } from "@/src/utils/utilities"; let wasInTheatreMode = false; let setToTheatreMode = false; export function makeMaximizeSVG(): SVGElement { - const maximizeSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - maximizeSVG.setAttributeNS(null, "stroke", "currentColor"); - maximizeSVG.setAttributeNS(null, "height", "100%"); - maximizeSVG.setAttributeNS(null, "width", "100%"); - maximizeSVG.setAttributeNS(null, "fill", "none"); - maximizeSVG.setAttributeNS(null, "stroke-width", "1.5"); - maximizeSVG.setAttributeNS(null, "viewBox", "0 0 24 24"); - const maximize_SVG_FirstPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - maximize_SVG_FirstPath.setAttributeNS( - null, - "d", - "M 21.283309,21.283314 H 2.7166914 V 2.7166868 H 21.283309 Z m -18.5666175,0 V 2.7166868 H 21.283309 V 21.283314 Z" + const maximizeSVG = createSVGElement( + "svg", + { + fill: "none", + height: "100%", + stroke: "currentColor", + "stroke-width": "1.5", + viewBox: "0 0 24 24", + width: "100%" + }, + createSVGElement("path", { + d: "M 21.283309,21.283314 H 2.7166914 V 2.7166868 H 21.283309 Z m -18.5666175,0 V 2.7166868 H 21.283309 V 21.283314 Z", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "1.5" + }), + createSVGElement("path", { + d: "M 12,8.0214379 V 15.978562 M 15.978561,12 H 8.0214389", + "stroke-linecap": "round", + "stroke-linejoin": "round", + "stroke-width": "1.5" + }) ); - maximize_SVG_FirstPath.setAttributeNS(null, "stroke-linecap", "round"); - maximize_SVG_FirstPath.setAttributeNS(null, "stroke-linejoin", "round"); - maximize_SVG_FirstPath.style.strokeWidth = "1.5"; - maximize_SVG_FirstPath.style.strokeLinejoin = "round"; - const maximize_SVG_SecondPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - maximize_SVG_SecondPath.setAttributeNS(null, "d", "M 12,8.0214379 V 15.978562 M 15.978561,12 H 8.0214389"); - maximize_SVG_SecondPath.setAttributeNS(null, "stroke-linecap", "round"); - maximize_SVG_SecondPath.setAttributeNS(null, "stroke-linejoin", "round"); - maximize_SVG_SecondPath.style.strokeWidth = "1.5"; - maximize_SVG_SecondPath.style.strokeLinejoin = "round"; - maximizeSVG.appendChild(maximize_SVG_FirstPath); - maximizeSVG.appendChild(maximize_SVG_SecondPath); return maximizeSVG; } diff --git a/src/features/openTranscriptButton/index.ts b/src/features/openTranscriptButton/index.ts index ce048f56..e10522e0 100644 --- a/src/features/openTranscriptButton/index.ts +++ b/src/features/openTranscriptButton/index.ts @@ -1,5 +1,5 @@ import eventManager from "@/src/utils/EventManager"; -import { waitForSpecificMessage } from "@/src/utils/utilities"; +import { createSVGElement, waitForSpecificMessage } from "@/src/utils/utilities"; import { addFeatureItemToMenu, removeFeatureItemFromMenu } from "../featureMenu/utils"; @@ -37,53 +37,37 @@ export function removeTranscriptButton() { eventManager.removeEventListeners("openTranscriptButton"); } function makeTranscriptSvgIcon() { - const transcriptSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - transcriptSVG.style.height = "24px"; - transcriptSVG.style.width = "24px"; - transcriptSVG.setAttributeNS(null, "stroke-width", "0"); - transcriptSVG.setAttributeNS(null, "stroke", "currentColor"); - transcriptSVG.setAttributeNS(null, "viewBox", "0 0 24 24"); - const path1 = document.createElementNS("http://www.w3.org/2000/svg", "path"); - path1.setAttributeNS( - null, - "d", - "M5 16C5 15.4477 5.44772 15 6 15H14C14.5523 15 15 15.4477 15 16C15 16.5523 14.5523 17 14 17H6C5.44772 17 5 16.5523 5 16Z" + const transcriptSVG = createSVGElement( + "svg", + { + height: "24px", + stroke: "currentColor", + "stroke-width": "0", + viewBox: "0 0 24 24", + width: "24px" + }, + createSVGElement("path", { + d: "M5 16C5 15.4477 5.44772 15 6 15H14C14.5523 15 15 15.4477 15 16C15 16.5523 14.5523 17 14 17H6C5.44772 17 5 16.5523 5 16Z", + fill: "currentColor" + }), + createSVGElement("path", { + d: "M18 11C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H10C9.44772 13 9 12.5523 9 12C9 11.4477 9.44772 11 10 11H18Z", + fill: "currentColor" + }), + createSVGElement("path", { + d: "M16 16C16 15.4477 16.4477 15 17 15H18C18.5523 15 19 15.4477 19 16C19 16.5523 18.5523 17 18 17H17C16.4477 17 16 16.5523 16 16Z", + fill: "currentColor" + }), + createSVGElement("path", { + d: "M7 11C7.55228 11 8 11.4477 8 12C8 12.5523 7.55228 13 7 13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H7Z", + fill: "currentColor" + }), + createSVGElement("path", { + "clip-rule": "evenodd", + d: "M4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4ZM20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44771 20.5523 5 20 5Z", + fill: "currentColor", + "fill-rule": "evenodd" + }) ); - path1.setAttributeNS(null, "fill", "currentColor"); - const path2 = document.createElementNS("http://www.w3.org/2000/svg", "path"); - path2.setAttributeNS( - null, - "d", - "M18 11C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H10C9.44772 13 9 12.5523 9 12C9 11.4477 9.44772 11 10 11H18Z" - ); - path2.setAttributeNS(null, "fill", "currentColor"); - const path3 = document.createElementNS("http://www.w3.org/2000/svg", "path"); - path3.setAttributeNS( - null, - "d", - "M16 16C16 15.4477 16.4477 15 17 15H18C18.5523 15 19 15.4477 19 16C19 16.5523 18.5523 17 18 17H17C16.4477 17 16 16.5523 16 16Z" - ); - path3.setAttributeNS(null, "fill", "currentColor"); - const path4 = document.createElementNS("http://www.w3.org/2000/svg", "path"); - path4.setAttributeNS( - null, - "d", - "M7 11C7.55228 11 8 11.4477 8 12C8 12.5523 7.55228 13 7 13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H7Z" - ); - path4.setAttributeNS(null, "fill", "currentColor"); - const path5 = document.createElementNS("http://www.w3.org/2000/svg", "path"); - path5.setAttributeNS(null, "fill-rule", "evenodd"); - path5.setAttributeNS(null, "clip-rule", "evenodd"); - path5.setAttributeNS(null, "fill", "currentColor"); - path5.setAttributeNS( - null, - "d", - "M4 3C2.34315 3 1 4.34315 1 6V18C1 19.6569 2.34315 21 4 21H20C21.6569 21 23 19.6569 23 18V6C23 4.34315 21.6569 3 20 3H4ZM20 5H4C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19H20C20.5523 19 21 18.5523 21 18V6C21 5.44771 20.5523 5 20 5Z" - ); - transcriptSVG.appendChild(path1); - transcriptSVG.appendChild(path2); - transcriptSVG.appendChild(path3); - transcriptSVG.appendChild(path4); - transcriptSVG.appendChild(path5); return transcriptSVG; } diff --git a/src/features/screenshotButton/index.ts b/src/features/screenshotButton/index.ts index 48352de1..e7ccb780 100644 --- a/src/features/screenshotButton/index.ts +++ b/src/features/screenshotButton/index.ts @@ -1,5 +1,5 @@ import eventManager from "@/src/utils/EventManager"; -import { waitForSpecificMessage } from "@/src/utils/utilities"; +import { createSVGElement, waitForSpecificMessage } from "@/src/utils/utilities"; import { addFeatureItemToMenu, getFeatureMenuItem, removeFeatureItemFromMenu } from "../featureMenu/utils"; @@ -107,26 +107,26 @@ export function removeScreenshotButton() { eventManager.removeEventListeners("screenshotButton"); } function makeScreenshotIcon() { - const screenshotSVG = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - screenshotSVG.style.height = "24px"; - screenshotSVG.style.width = "24px"; - screenshotSVG.setAttributeNS(null, "stroke-width", "1.5"); - screenshotSVG.setAttributeNS(null, "stroke", "currentColor"); - screenshotSVG.setAttributeNS(null, "fill", "none"); - screenshotSVG.setAttributeNS(null, "viewBox", "0 0 24 24"); - const firstPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - firstPath.setAttributeNS( - null, - "d", - "M6.827 6.175A2.31 2.31 0 015.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 00-1.134-.175 2.31 2.31 0 01-1.64-1.055l-.822-1.316a2.192 2.192 0 00-1.736-1.039 48.774 48.774 0 00-5.232 0 2.192 2.192 0 00-1.736 1.039l-.821 1.316z" + const screenshotSVG = createSVGElement( + "svg", + { + fill: "none", + height: "24px", + stroke: "currentColor", + "stroke-width": "1.5", + viewBox: "0 0 24 24", + width: "24px" + }, + createSVGElement("path", { + d: "M6.827 6.175A2.31 2.31 0 015.186 7.23c-.38.054-.757.112-1.134.175C2.999 7.58 2.25 8.507 2.25 9.574V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9.574c0-1.067-.75-1.994-1.802-2.169a47.865 47.865 0 00-1.134-.175 2.31 2.31 0 01-1.64-1.055l-.822-1.316a2.192 2.192 0 00-1.736-1.039 48.774 48.774 0 00-5.232 0 2.192 2.192 0 00-1.736 1.039l-.821 1.316", + "stroke-linecap": "round", + "stroke-linejoin": "round" + }), + createSVGElement("path", { + d: "M16.5 12.75a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0zM18.75 10.5h.008v.008h-.008V10.5z", + "stroke-linecap": "round", + "stroke-linejoin": "round" + }) ); - firstPath.setAttributeNS(null, "stroke-linecap", "round"); - firstPath.setAttributeNS(null, "stroke-linejoin", "round"); - const secondPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - secondPath.setAttributeNS(null, "d", "M16.5 12.75a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0zM18.75 10.5h.008v.008h-.008V10.5z"); - secondPath.setAttributeNS(null, "stroke-linecap", "round"); - secondPath.setAttributeNS(null, "stroke-linejoin", "round"); - screenshotSVG.appendChild(firstPath); - screenshotSVG.appendChild(secondPath); return screenshotSVG; } diff --git a/src/features/volumeBoost/index.ts b/src/features/volumeBoost/index.ts index 1f9cf266..8f5678d5 100644 --- a/src/features/volumeBoost/index.ts +++ b/src/features/volumeBoost/index.ts @@ -1,22 +1,22 @@ import eventManager from "@/src/utils/EventManager"; -import { browserColorLog, formatError, waitForSpecificMessage } from "@/src/utils/utilities"; +import { browserColorLog, createSVGElement, formatError, waitForSpecificMessage } from "@/src/utils/utilities"; import { addFeatureItemToMenu, removeFeatureItemFromMenu } from "../featureMenu/utils"; function makeVolumeBoostIcon() { - const volumeBoostIconSvg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - volumeBoostIconSvg.style.height = "24px"; - volumeBoostIconSvg.style.width = "24px"; - volumeBoostIconSvg.setAttributeNS(null, "stroke", "currentColor"); - volumeBoostIconSvg.setAttributeNS(null, "fill", "currentColor"); - volumeBoostIconSvg.setAttributeNS(null, "viewBox", "0 0 24 24"); - const volumeUpPath = document.createElementNS("http://www.w3.org/2000/svg", "path"); - volumeUpPath.setAttributeNS( - null, - "d", - "M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77z" + const volumeBoostIconSvg = createSVGElement( + "svg", + { + fill: "currentColor", + height: "24px", + stroke: "currentColor", + viewBox: "0 0 24 24", + width: "24px" + }, + createSVGElement("path", { + d: "M3 9v6h4l5 5V4L7 9H3zm7-.17v6.34L7.83 13H5v-2h2.83L10 8.83zM16.5 12A4.5 4.5 0 0014 7.97v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77 0-4.28-2.99-7.86-7-8.77", + stroke: "none" + }) ); - volumeUpPath.setAttributeNS(null, "stroke", "none"); - volumeBoostIconSvg.appendChild(volumeUpPath); return volumeBoostIconSvg; } export default async function volumeBoost() { diff --git a/src/utils/SVGElementAttributes.ts b/src/utils/SVGElementAttributes.ts new file mode 100644 index 00000000..8bbefd28 --- /dev/null +++ b/src/utils/SVGElementAttributes.ts @@ -0,0 +1,4114 @@ +// Taken from https://github.com/wooorm/svg-element-attributes/blob/main/index.js and exported as const for typesafety +export const svgElementAttributes = { + "*": ["about", "class", "content", "datatype", "id", "lang", "property", "rel", "resource", "rev", "style", "tabindex", "typeof"], + a: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "download", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "href", + "hreflang", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "ping", + "pointer-events", + "referrerpolicy", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "target", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "type", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + altGlyph: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dx", + "dy", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "format", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "glyphRef", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "rotate", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x", + "y" + ], + altGlyphDef: [], + altGlyphItem: [], + animate: [ + "accumulate", + "additive", + "alignment-baseline", + "attributeName", + "attributeType", + "baseline-shift", + "begin", + "by", + "calcMode", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dur", + "enable-background", + "end", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "from", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "href", + "image-rendering", + "kerning", + "keySplines", + "keyTimes", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "max", + "min", + "opacity", + "overflow", + "pointer-events", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "to", + "unicode-bidi", + "values", + "visibility", + "word-spacing", + "writing-mode" + ], + animateColor: [ + "accumulate", + "additive", + "alignment-baseline", + "attributeName", + "attributeType", + "baseline-shift", + "begin", + "by", + "calcMode", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dur", + "enable-background", + "end", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "from", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "keySplines", + "keyTimes", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "max", + "min", + "opacity", + "overflow", + "pointer-events", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "to", + "unicode-bidi", + "values", + "visibility", + "word-spacing", + "writing-mode" + ], + animateMotion: [ + "accumulate", + "additive", + "begin", + "by", + "calcMode", + "dur", + "end", + "externalResourcesRequired", + "fill", + "from", + "href", + "keyPoints", + "keySplines", + "keyTimes", + "max", + "min", + "origin", + "path", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "rotate", + "systemLanguage", + "to", + "values" + ], + animateTransform: [ + "accumulate", + "additive", + "attributeName", + "attributeType", + "begin", + "by", + "calcMode", + "dur", + "end", + "externalResourcesRequired", + "fill", + "from", + "href", + "keySplines", + "keyTimes", + "max", + "min", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "systemLanguage", + "to", + "type", + "values" + ], + animation: [ + "begin", + "dur", + "end", + "externalResourcesRequired", + "fill", + "focusHighlight", + "focusable", + "height", + "initialVisibility", + "max", + "min", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "preserveAspectRatio", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "syncBehavior", + "syncMaster", + "syncTolerance", + "systemLanguage", + "transform", + "width", + "x", + "y" + ], + audio: [ + "begin", + "dur", + "end", + "externalResourcesRequired", + "fill", + "max", + "min", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "syncBehavior", + "syncMaster", + "syncTolerance", + "systemLanguage", + "type" + ], + canvas: ["preserveAspectRatio", "requiredExtensions", "systemLanguage"], + circle: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "cx", + "cy", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "r", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + clipPath: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "clipPathUnits", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + "color-profile": ["local", "name", "rendering-intent"], + cursor: ["externalResourcesRequired", "requiredExtensions", "requiredFeatures", "systemLanguage", "x", "y"], + defs: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + desc: ["requiredExtensions", "requiredFeatures", "requiredFonts", "requiredFormats", "systemLanguage"], + discard: ["begin", "href", "requiredExtensions", "requiredFeatures", "requiredFonts", "requiredFormats", "systemLanguage"], + ellipse: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "cx", + "cy", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "rx", + "ry", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + feBlend: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "in2", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "mode", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feColorMatrix: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "type", + "unicode-bidi", + "values", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feComponentTransfer: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feComposite: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "in2", + "k1", + "k2", + "k3", + "k4", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "operator", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feConvolveMatrix: [ + "alignment-baseline", + "baseline-shift", + "bias", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "divisor", + "dominant-baseline", + "edgeMode", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kernelMatrix", + "kernelUnitLength", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "order", + "overflow", + "pointer-events", + "preserveAlpha", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "targetX", + "targetY", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feDiffuseLighting: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "diffuseConstant", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kernelUnitLength", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "surfaceScale", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feDisplacementMap: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "in2", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "scale", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "xChannelSelector", + "y", + "yChannelSelector" + ], + feDistantLight: ["azimuth", "elevation"], + feDropShadow: ["dx", "dy", "height", "in", "result", "stdDeviation", "width", "x", "y"], + feFlood: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feFuncA: ["amplitude", "exponent", "intercept", "offset", "slope", "tableValues", "type"], + feFuncB: ["amplitude", "exponent", "intercept", "offset", "slope", "tableValues", "type"], + feFuncG: ["amplitude", "exponent", "intercept", "offset", "slope", "tableValues", "type"], + feFuncR: ["amplitude", "exponent", "intercept", "offset", "slope", "tableValues", "type"], + feGaussianBlur: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "edgeMode", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stdDeviation", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feImage: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "crossorigin", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "href", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "preserveAspectRatio", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feMerge: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feMergeNode: ["in"], + feMorphology: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "operator", + "overflow", + "pointer-events", + "radius", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feOffset: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dx", + "dy", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + fePointLight: ["x", "y", "z"], + feSpecularLighting: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kernelUnitLength", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "specularConstant", + "specularExponent", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "surfaceScale", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feSpotLight: ["limitingConeAngle", "pointsAtX", "pointsAtY", "pointsAtZ", "specularExponent", "x", "y", "z"], + feTile: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "in", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "result", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + feTurbulence: [ + "alignment-baseline", + "baseFrequency", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "numOctaves", + "opacity", + "overflow", + "pointer-events", + "result", + "seed", + "shape-rendering", + "stitchTiles", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "type", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + filter: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "filterRes", + "filterUnits", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "primitiveUnits", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + font: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "horiz-origin-x", + "horiz-origin-y", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "visibility", + "word-spacing", + "writing-mode" + ], + "font-face": [ + "accent-height", + "alphabetic", + "ascent", + "bbox", + "cap-height", + "descent", + "externalResourcesRequired", + "font-family", + "font-size", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "hanging", + "ideographic", + "mathematical", + "overline-position", + "overline-thickness", + "panose-1", + "slope", + "stemh", + "stemv", + "strikethrough-position", + "strikethrough-thickness", + "underline-position", + "underline-thickness", + "unicode-range", + "units-per-em", + "v-alphabetic", + "v-hanging", + "v-ideographic", + "v-mathematical", + "widths", + "x-height" + ], + "font-face-format": ["string"], + "font-face-name": ["name"], + "font-face-src": [], + "font-face-uri": ["externalResourcesRequired"], + foreignObject: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + g: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + glyph: [ + "alignment-baseline", + "arabic-form", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "d", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-name", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "orientation", + "overflow", + "pointer-events", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode", + "unicode-bidi", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "visibility", + "word-spacing", + "writing-mode" + ], + glyphRef: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dx", + "dy", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "format", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "glyphRef", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x", + "y" + ], + handler: ["externalResourcesRequired", "type"], + hkern: ["g1", "g2", "k", "u1", "u2"], + iframe: ["requiredExtensions", "systemLanguage"], + image: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "crossorigin", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "href", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "preserveAspectRatio", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "type", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + line: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x1", + "x2", + "y1", + "y2" + ], + linearGradient: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "gradientTransform", + "gradientUnits", + "href", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "shape-rendering", + "spreadMethod", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x1", + "x2", + "y1", + "y2" + ], + listener: ["defaultAction", "event", "handler", "observer", "phase", "propagate", "target"], + marker: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "markerHeight", + "markerUnits", + "markerWidth", + "mask", + "opacity", + "orient", + "overflow", + "pointer-events", + "preserveAspectRatio", + "refX", + "refY", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "viewBox", + "visibility", + "word-spacing", + "writing-mode" + ], + mask: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "maskContentUnits", + "maskUnits", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + metadata: ["requiredExtensions", "requiredFeatures", "requiredFonts", "requiredFormats", "systemLanguage"], + "missing-glyph": [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "d", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "horiz-adv-x", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "vert-adv-y", + "vert-origin-x", + "vert-origin-y", + "visibility", + "word-spacing", + "writing-mode" + ], + mpath: ["externalResourcesRequired", "href"], + path: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "d", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + pattern: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "href", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "patternContentUnits", + "patternTransform", + "patternUnits", + "pointer-events", + "preserveAspectRatio", + "requiredExtensions", + "requiredFeatures", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "viewBox", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + polygon: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "points", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + polyline: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "points", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + prefetch: ["bandwidth", "mediaCharacterEncoding", "mediaContentEncodings", "mediaSize", "mediaTime"], + radialGradient: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "cx", + "cy", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "fr", + "fx", + "fy", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "gradientTransform", + "gradientUnits", + "href", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "r", + "shape-rendering", + "spreadMethod", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + rect: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pathLength", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "rx", + "ry", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + script: ["crossorigin", "externalResourcesRequired", "href", "type"], + set: [ + "attributeName", + "attributeType", + "begin", + "dur", + "end", + "externalResourcesRequired", + "fill", + "href", + "max", + "min", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "systemLanguage", + "to" + ], + solidColor: [], + stop: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "offset", + "opacity", + "overflow", + "pointer-events", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + style: ["media", "title", "type"], + svg: [ + "alignment-baseline", + "baseProfile", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "contentScriptType", + "contentStyleType", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "playbackOrder", + "playbackorder", + "pointer-events", + "preserveAspectRatio", + "requiredExtensions", + "requiredFeatures", + "shape-rendering", + "snapshotTime", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "syncBehaviorDefault", + "syncToleranceDefault", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "timelineBegin", + "timelinebegin", + "transform", + "unicode-bidi", + "version", + "viewBox", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y", + "zoomAndPan" + ], + switch: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + symbol: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "preserveAspectRatio", + "refX", + "refY", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "text-anchor", + "text-decoration", + "text-rendering", + "unicode-bidi", + "viewBox", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + tbreak: ["requiredExtensions", "requiredFeatures", "requiredFonts", "requiredFormats", "systemLanguage"], + text: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dx", + "dy", + "editable", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "lengthAdjust", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "rotate", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "textLength", + "transform", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x", + "y" + ], + textArea: [ + "editable", + "focusHighlight", + "focusable", + "height", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "systemLanguage", + "transform", + "width", + "x", + "y" + ], + textPath: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "href", + "image-rendering", + "kerning", + "lengthAdjust", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "method", + "opacity", + "overflow", + "path", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "shape-rendering", + "side", + "spacing", + "startOffset", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "textLength", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode" + ], + title: ["requiredExtensions", "requiredFeatures", "requiredFonts", "requiredFormats", "systemLanguage"], + tref: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dx", + "dy", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "lengthAdjust", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "rotate", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "textLength", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x", + "y" + ], + tspan: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "dx", + "dy", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "image-rendering", + "kerning", + "lengthAdjust", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "rotate", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "textLength", + "unicode-bidi", + "visibility", + "word-spacing", + "writing-mode", + "x", + "y" + ], + unknown: ["requiredExtensions", "systemLanguage"], + use: [ + "alignment-baseline", + "baseline-shift", + "clip", + "clip-path", + "clip-rule", + "color", + "color-interpolation", + "color-interpolation-filters", + "color-profile", + "color-rendering", + "cursor", + "direction", + "display", + "dominant-baseline", + "enable-background", + "externalResourcesRequired", + "fill", + "fill-opacity", + "fill-rule", + "filter", + "flood-color", + "flood-opacity", + "focusHighlight", + "focusable", + "font-family", + "font-size", + "font-size-adjust", + "font-stretch", + "font-style", + "font-variant", + "font-weight", + "glyph-orientation-horizontal", + "glyph-orientation-vertical", + "height", + "href", + "image-rendering", + "kerning", + "letter-spacing", + "lighting-color", + "marker-end", + "marker-mid", + "marker-start", + "mask", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "opacity", + "overflow", + "pointer-events", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "shape-rendering", + "stop-color", + "stop-opacity", + "stroke", + "stroke-dasharray", + "stroke-dashoffset", + "stroke-linecap", + "stroke-linejoin", + "stroke-miterlimit", + "stroke-opacity", + "stroke-width", + "systemLanguage", + "text-anchor", + "text-decoration", + "text-rendering", + "transform", + "unicode-bidi", + "visibility", + "width", + "word-spacing", + "writing-mode", + "x", + "y" + ], + video: [ + "begin", + "dur", + "end", + "externalResourcesRequired", + "fill", + "focusHighlight", + "focusable", + "height", + "initialVisibility", + "max", + "min", + "nav-down", + "nav-down-left", + "nav-down-right", + "nav-left", + "nav-next", + "nav-prev", + "nav-right", + "nav-up", + "nav-up-left", + "nav-up-right", + "overlay", + "preserveAspectRatio", + "repeatCount", + "repeatDur", + "requiredExtensions", + "requiredFeatures", + "requiredFonts", + "requiredFormats", + "restart", + "syncBehavior", + "syncMaster", + "syncTolerance", + "systemLanguage", + "transform", + "transformBehavior", + "type", + "width", + "x", + "y" + ], + view: ["externalResourcesRequired", "preserveAspectRatio", "viewBox", "viewTarget", "zoomAndPan"], + vkern: ["g1", "g2", "k", "u1", "u2"] +} as const; +export type SVGElementAttributes = Partial< + Record<(typeof svgElementAttributes)[T][number], number | string> +>; diff --git a/src/utils/utilities.ts b/src/utils/utilities.ts index 1855cec4..ed24f355 100644 --- a/src/utils/utilities.ts +++ b/src/utils/utilities.ts @@ -12,6 +12,7 @@ import type { YoutubePlayerQualityLevel, configuration } from "../types"; +import type { SVGElementAttributes } from "./SVGElementAttributes"; import { youtubePlayerQualityLevel } from "../types"; import { type FeatureName, eventManager } from "./EventManager"; @@ -546,3 +547,24 @@ export function createStyledElement( + tagName: K, + attributes?: SVGElementAttributes, + ...children: SVGChildElement[] +): SVGElementTagNameMap[K] { + const element = document.createElementNS("http://www.w3.org/2000/svg", tagName); + + if (attributes) { + Object.entries(attributes).forEach(([key, value]) => { + element.setAttribute(key, String(value)); + }); + } + + children.forEach((child) => { + element.appendChild(child); + }); + + return element; +} From f2c2ab9e177e56e79ee6ba4083cd518f8fa996f5 Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Tue, 12 Dec 2023 09:10:59 -0500 Subject: [PATCH 12/15] refactor: remove open transcript button if it isn't needed --- src/features/openTranscriptButton/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/features/openTranscriptButton/index.ts b/src/features/openTranscriptButton/index.ts index e10522e0..250d5400 100644 --- a/src/features/openTranscriptButton/index.ts +++ b/src/features/openTranscriptButton/index.ts @@ -1,7 +1,7 @@ import eventManager from "@/src/utils/EventManager"; import { createSVGElement, waitForSpecificMessage } from "@/src/utils/utilities"; -import { addFeatureItemToMenu, removeFeatureItemFromMenu } from "../featureMenu/utils"; +import { addFeatureItemToMenu, getFeatureMenuItem, removeFeatureItemFromMenu } from "../featureMenu/utils"; export async function openTranscriptButton() { // Wait for the "options" message from the content script @@ -15,7 +15,12 @@ export async function openTranscriptButton() { // If the open transcript button option is disabled, return if (!enableOpenTranscriptButton) return; const transcriptButton = document.querySelector("ytd-video-description-transcript-section-renderer button"); + const transcriptButtonMenuItem = getFeatureMenuItem("openTranscriptButton"); + // If the transcript button is not found and the "openTranscriptButton" menu item exists, remove the transcript button menu item + if (!transcriptButton && transcriptButtonMenuItem) removeFeatureItemFromMenu("openTranscriptButton"); + // If the transcript button isn't found return if (!transcriptButton) return; + // If the transcript button is found and the "openTranscriptButton" menu item does not exist, add the transcript button menu item void addTranscriptButton(); } async function addTranscriptButton() { From 41ea5f427d5abdf8be164d99c480fff516030739 Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Wed, 13 Dec 2023 04:45:05 -0500 Subject: [PATCH 13/15] translations: update zh-CN --- public/locales/zh-CN.json | 344 +++++++++++++++++++------------------- 1 file changed, 172 insertions(+), 172 deletions(-) diff --git a/public/locales/zh-CN.json b/public/locales/zh-CN.json index 66c7a0a8..b4c84e45 100644 --- a/public/locales/zh-CN.json +++ b/public/locales/zh-CN.json @@ -1,18 +1,15 @@ { "langCode": "zh-CN", - "langName": "中文(简体)", + "langName": "Simplified Chinese", + "messages": { + "resumingVideo": "Resuming video at {{VIDEO_TIME}}", + "settingVolume": "Setting volume boost to {{VOLUME_BOOST_AMOUNT}}" + }, "pages": { "content": { "features": { - "videoHistory": { - "resumePrompt": { - "close": "关" - }, - "resumeButton": "恢复" - }, - "screenshotButton": { - "copiedToClipboard": "屏幕截图已复制到剪贴板", - "label": "屏幕截图" + "featureMenu": { + "label": "功能单" }, "loopButton": { "label": "循环" @@ -20,8 +17,15 @@ "maximizePlayerButton": { "label": "化最大" }, - "featureMenu": { - "label": "功能单" + "screenshotButton": { + "copiedToClipboard": "屏幕截图已复制到剪贴板", + "label": "屏幕截图" + }, + "videoHistory": { + "resumeButton": "恢复", + "resumePrompt": { + "close": "关" + } }, "volumeBoostButton": { "label": "Volume Boost" @@ -30,237 +34,233 @@ }, "options": { "notifications": { - "success": { - "saved": "选项已保存。" - }, "info": { "reset": "所有选项已重置为默认值。\n现在您可以通过单击“确认”按钮保存更改,或通过关闭此页面或忽略此通知放弃更改。" + }, + "success": { + "saved": "选项已保存。" } } } }, "settings": { + "clearData": { + "allDataDeleted": "所有数据已被删除。", + "confirmAlert": "这将删除所有与选项相关的扩展数据。是否继续?" + }, "sections": { + "automaticQuality": { + "enable": { + "label": "启用自动质量调整", + "title": "自动调整视频质量到所选等级。" + }, + "select": { + "label": "播放器质量", + "title": "将视频设置为" + }, + "title": "自动质量设置" + }, + "bottomButtons": { + "clear": { + "title": "清除此扩展存储在您机器上的所有数据", + "value": "清除数据" + }, + "confirm": { + "title": "确认重置设置", + "value": "确认" + }, + "reset": { + "title": "重置所有设置为默认设置,点击确认按钮以保存更改", + "value": "重新开始" + } + }, "featureMenu": { "openType": { - "title": "Feature menu settings", "select": { "label": "Menu Activation Type", - "title": "Select the method to activate the feature menu", "options": { "click": "Click", "hover": "Hover" - } - } + }, + "title": "Select the method to activate the feature menu" + }, + "title": "Feature menu settings" } }, "importExportSettings": { + "exportButton": { + "success": "设置导出成功", + "title": "导出设置到 JSON 文件", + "value": "导出设置" + }, "importButton": { "error": { - "validation": "Error importing settings. Please check the file format.\n{{ERROR_MESSAGE}}", - "unknown": "导入设置时出错。请检查文件格式。\n发生未知错误。" + "unknown": "导入设置时出错。请检查文件格式。\n发生未知错误。", + "validation": "Error importing settings. Please check the file format.\n{{ERROR_MESSAGE}}" }, "success": "成功导入设置", "title": "从 JSON 文件导入设置", "value": "导入设置" - }, - "exportButton": { - "success": "设置导出成功", - "title": "导出设置到 JSON 文件", - "value": "导出设置" } }, + "language": { + "select": { + "label": "语言", + "title": "扩展使用的语言" + }, + "title": "语言" + }, "miscellaneous": { - "title": "杂项设置", "features": { - "rememberLastVolume": { - "title": "Remembers the volume of the last video you were watching and sets it when you open a new video", - "label": "记住最后一个音量" + "automaticTheaterMode": { + "label": "Automatic theater mode", + "title": "Automatically enables theater mode when you load a video" }, - "maximizePlayerButton": { - "title": "将视频填充到窗口大小", - "label": "启用最大化播放器按钮" + "hideScrollbar": { + "label": "启用隐藏滚动条", + "title": "隐藏页面滚动条" }, - "videoHistory": { - "title": "保持跟踪您在视频上离开的位置,并询问您是否想要在视频重新加载时恢复", - "label": "启用视频历史" + "loopButton": { + "label": "启用循环按钮", + "title": "向播放器添加一个按钮来循环您正在观看的视频" }, - "remainingTime": { - "title": "显示您观看的视频的剩余时间", - "label": "启用剩余时间" + "maximizePlayerButton": { + "label": "启用最大化播放器按钮", + "title": "将视频填充到窗口大小" }, - "loopButton": { - "title": "向播放器添加一个按钮来循环您正在观看的视频", - "label": "启用循环按钮" + "remainingTime": { + "label": "启用剩余时间", + "title": "显示您观看的视频的剩余时间" }, - "hideScrollbar": { - "title": "隐藏页面滚动条", - "label": "启用隐藏滚动条" + "rememberLastVolume": { + "label": "记住最后一个音量", + "title": "Remembers the volume of the last video you were watching and sets it when you open a new video" }, - "automaticTheaterMode": { - "title": "Automatically enables theater mode when you load a video", - "label": "Automatic theater mode" + "videoHistory": { + "label": "启用视频历史", + "title": "保持跟踪您在视频上离开的位置,并询问您是否想要在视频重新加载时恢复" } - } + }, + "title": "杂项设置" }, - "scrollWheelVolumeControl": { - "title": "滚动滚轮音量控制设置", + "playbackSpeed": { "enable": { - "title": "让您使用滚轮来控制您正在观看的视频音量", - "label": "启用滚轮音量控制" + "label": "启用强制播放速度", + "title": "设置视频速度为您在下面选择的内容" }, - "osdColor": { - "title": "Select the color for the On-Screen Display", - "label": "OSD Color" + "select": { + "label": "播放器速度", + "title": "视频设置为" }, - "osdType": { - "title": "Select the style of On-Screen Display", - "label": "OSD Type" + "title": "回放速度设置" + }, + "screenshotButton": { + "enable": { + "label": "启用屏幕截图按钮", + "title": "向播放器添加一个按钮以拍摄视频的截图" }, - "osdPosition": { - "title": "Select the position of the On-Screen Display", - "label": "OSD Position" + "saveAs": { + "clipboard": "剪切板", + "file": "文件" }, - "osdOpacity": { - "title": "Adjust the transparency of the On-Screen Display", - "label": "OSD Opacity" + "selectFormat": { + "label": "截图格式", + "title": "保存屏幕截图的格式" }, - "osdVolumeAdjustmentSteps": { - "title": "Adjust the volume change per scroll", - "label": "Volume Change Per Scroll" + "selectSaveAs": { + "label": "截图保存类型", + "title": "屏幕截图保存类型" }, - "osdHide": { - "title": "Specify the time, in milliseconds, before automatically hiding the OSD", - "label": "Hide Delay" + "title": "屏幕截图设置" + }, + "scrollWheelVolumeControl": { + "enable": { + "label": "启用滚轮音量控制", + "title": "让您使用滚轮来控制您正在观看的视频音量" }, - "osdPadding": { - "title": "Adjust the spacing around the on-screen display (OSD) in pixels. This applies specifically to corner OSD.", - "label": "填充" + "holdModifierKey": { + "enable": { + "label": "Enable when holding modifier key", + "title": "Press a modifier key to enable volume adjustment with the scroll wheel." + }, + "optionLabel": "{{KEY}} key", + "select": { + "label": "Modifier key", + "title": "The modifier key to use" + } + }, + "holdRightClick": { + "enable": { + "label": "Enable when holding right click", + "title": "Hold right click to enable scroll wheel volume control" + } }, "onScreenDisplay": { "colors": { - "red": "红色", - "green": "绿色", "blue": "蓝色", - "yellow": "黄色", + "green": "绿色", "orange": "橙色", - "purple": "紫色", "pink": "粉色", - "white": "白色" + "purple": "紫色", + "red": "红色", + "white": "白色", + "yellow": "黄色" }, "position": { - "top_left": "左上", - "top_right": "右上", "bottom_left": "左下", "bottom_right": "右下", - "center": "中间" + "center": "中间", + "top_left": "左上", + "top_right": "右上" }, "type": { - "no_display": "没有显示", - "text": "文本", "line": "直线", - "round": "圆形" + "no_display": "没有显示", + "round": "圆形", + "text": "文本" } }, - "holdModifierKey": { - "enable": { - "title": "Press a modifier key to enable volume adjustment with the scroll wheel.", - "label": "Enable when holding modifier key" - }, - "optionLabel": "{{KEY}} key", - "select": { - "label": "Modifier key", - "title": "The modifier key to use" - } + "osdColor": { + "label": "OSD Color", + "title": "Select the color for the On-Screen Display" }, - "holdRightClick": { - "enable": { - "title": "Hold right click to enable scroll wheel volume control", - "label": "Enable when holding right click" - } - } - }, - "automaticQuality": { - "title": "自动质量设置", - "enable": { - "title": "自动调整视频质量到所选等级。", - "label": "启用自动质量调整" + "osdHide": { + "label": "Hide Delay", + "title": "Specify the time, in milliseconds, before automatically hiding the OSD" }, - "select": { - "label": "播放器质量", - "title": "将视频设置为" - } - }, - "playbackSpeed": { - "title": "回放速度设置", - "enable": { - "title": "设置视频速度为您在下面选择的内容", - "label": "启用强制播放速度" + "osdOpacity": { + "label": "OSD Opacity", + "title": "Adjust the transparency of the On-Screen Display" }, - "select": { - "label": "播放器速度", - "title": "视频设置为" - } + "osdPadding": { + "label": "填充", + "title": "Adjust the spacing around the on-screen display (OSD) in pixels. This applies specifically to corner OSD." + }, + "osdPosition": { + "label": "OSD Position", + "title": "Select the position of the On-Screen Display" + }, + "osdType": { + "label": "OSD Type", + "title": "Select the style of On-Screen Display" + }, + "osdVolumeAdjustmentSteps": { + "label": "Volume Change Per Scroll", + "title": "Adjust the volume change per scroll" + }, + "title": "滚动滚轮音量控制设置" }, "volumeBoost": { - "title": "音量提升设置", "enable": { - "title": "提升您观看的视频音量", - "label": "启用音量加速" + "label": "启用音量加速", + "title": "提升您观看的视频音量" }, "number": { "label": "音量升压量 (dB)", "title": "要提升音量的金额" - } - }, - "screenshotButton": { - "title": "屏幕截图设置", - "enable": { - "title": "向播放器添加一个按钮以拍摄视频的截图", - "label": "启用屏幕截图按钮" - }, - "selectSaveAs": { - "label": "截图保存类型", - "title": "屏幕截图保存类型" - }, - "selectFormat": { - "label": "截图格式", - "title": "保存屏幕截图的格式" }, - "saveAs": { - "file": "文件", - "clipboard": "剪切板" - } - }, - "bottomButtons": { - "confirm": { - "title": "确认重置设置", - "value": "确认" - }, - "clear": { - "title": "清除此扩展存储在您机器上的所有数据", - "value": "清除数据" - }, - "reset": { - "title": "重置所有设置为默认设置,点击确认按钮以保存更改", - "value": "重新开始" - } - }, - "language": { - "title": "语言", - "select": { - "label": "语言", - "title": "扩展使用的语言" - } + "title": "音量提升设置" } - }, - "clearData": { - "confirmAlert": "这将删除所有与选项相关的扩展数据。是否继续?", - "allDataDeleted": "所有数据已被删除。" } - }, - "messages": { - "settingVolume": "Setting volume boost to {{VOLUME_BOOST_AMOUNT}}", - "resumingVideo": "Resuming video at {{VIDEO_TIME}}" } } From 9f4f0bd1d8ec462c552eec71a9344899183a6d2c Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Wed, 13 Dec 2023 04:46:20 -0500 Subject: [PATCH 14/15] translations: add zh.json --- public/locales/zh.json | 273 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 273 insertions(+) create mode 100644 public/locales/zh.json diff --git a/public/locales/zh.json b/public/locales/zh.json new file mode 100644 index 00000000..c0eee439 --- /dev/null +++ b/public/locales/zh.json @@ -0,0 +1,273 @@ +{ + "langCode": "zh", + "langName": "Traditional Chinese", + "messages": { + "resumingVideo": "Resuming video at {{VIDEO_TIME}}", + "settingVolume": "Setting volume boost to {{VOLUME_BOOST_AMOUNT}}" + }, + "pages": { + "content": { + "features": { + "featureMenu": { + "label": "Feature menu" + }, + "loopButton": { + "label": "Loop" + }, + "maximizePlayerButton": { + "label": "Maximize" + }, + "openTranscriptButton": { + "label": "Open Transcript" + }, + "screenshotButton": { + "copiedToClipboard": "Screenshot copied to clipboard", + "label": "Screenshot" + }, + "videoHistory": { + "resumeButton": "Resume", + "resumePrompt": { + "close": "Close" + } + }, + "volumeBoostButton": { + "label": "Volume Boost" + } + } + }, + "options": { + "notifications": { + "info": { + "reset": "All options have been reset to their default values.\nYou can now save the changes by clicking the \"Confirm\" button or discard them by closing this page or ignore this notification." + }, + "success": { + "saved": "Options saved." + } + } + } + }, + "settings": { + "clearData": { + "allDataDeleted": "All data has been deleted.", + "confirmAlert": "This will delete all extension data related to options. Continue?" + }, + "sections": { + "automaticQuality": { + "enable": { + "label": "Automatic quality adjustment", + "title": "Automatically adjusts the video quality to the selected level." + }, + "select": { + "label": "Player quality", + "title": "The quality to set the video to" + }, + "title": "Automatic quality settings" + }, + "bottomButtons": { + "clear": { + "title": "Clears all data this extension has stored on your machine", + "value": "Clear Data" + }, + "confirm": { + "title": "Confirm setting reset", + "value": "Confirm" + }, + "reset": { + "title": "Resets all settings to their defaults, Click the confirm button to save the changes", + "value": "Reset" + } + }, + "featureMenu": { + "openType": { + "select": { + "label": "Menu Activation Type", + "options": { + "click": "Click", + "hover": "Hover" + }, + "title": "Select the method to activate the feature menu" + }, + "title": "Feature menu settings" + } + }, + "importExportSettings": { + "exportButton": { + "success": "Settings successfully exported", + "title": "Export settings to a JSON file", + "value": "Export Settings" + }, + "importButton": { + "error": { + "unknown": "Error importing settings. Please check the file format.\nAn unknown error occurred.", + "validation": "Error importing settings. Please check the file format.\n{{ERROR_MESSAGE}}" + }, + "success": "Settings imported successfully", + "title": "Import settings from a JSON file", + "value": "Import Settings" + } + }, + "language": { + "select": { + "label": "Language", + "title": "The language to use for the extension" + }, + "title": "Language" + }, + "miscellaneous": { + "features": { + "automaticTheaterMode": { + "label": "Automatic theater mode", + "title": "Automatically enables theater mode when you load a video" + }, + "hideScrollbar": { + "label": "Hide scrollbar", + "title": "Hides the pages scrollbar" + }, + "loopButton": { + "label": "Loop button", + "title": "Adds a button to the feature menu to loop the video you're watching" + }, + "maximizePlayerButton": { + "label": "Maximize player button", + "title": "Adds a button to the feature menu to maximize the player" + }, + "openTranscriptButton": { + "label": "Open transcript button", + "title": "Adds a button to the feature menu to open the transcript of the video you're watching" + }, + "remainingTime": { + "label": "Remaining time", + "title": "Shows the remaining time of the video you're watching" + }, + "rememberLastVolume": { + "label": "Remember last volume", + "title": "Remembers the volume of the last video you were watching and sets it when you open a new video" + }, + "videoHistory": { + "label": "Video history", + "title": "Keeps track of where you left off on videos you were watching and asks if you want to resume when that video loads again" + } + }, + "title": "Miscellaneous settings" + }, + "playbackSpeed": { + "enable": { + "label": "Forced playback speed", + "title": "Sets the video speed to what you choose below" + }, + "select": { + "label": "Player speed", + "title": "The speed to set the video to" + }, + "title": "Playback speed settings" + }, + "screenshotButton": { + "enable": { + "label": "Screenshot button", + "title": "Adds a button to the player to take a screenshot of the video" + }, + "saveAs": { + "clipboard": "Clipboard", + "file": "File" + }, + "selectFormat": { + "label": "Screenshot format", + "title": "The format to save the screenshot in" + }, + "selectSaveAs": { + "label": "Screenshot save type", + "title": "The screenshot save type" + }, + "title": "Screenshot settings" + }, + "scrollWheelVolumeControl": { + "enable": { + "label": "Scroll wheel volume control", + "title": "Lets you use the scroll wheel to control the volume of the video you're watching" + }, + "holdModifierKey": { + "enable": { + "label": "Enable when holding modifier key", + "title": "Press a modifier key to enable volume adjustment with the scroll wheel." + }, + "optionLabel": "{{KEY}} key", + "select": { + "label": "Modifier key", + "title": "The modifier key to use" + } + }, + "holdRightClick": { + "enable": { + "label": "Enable when holding right click", + "title": "Hold right click to enable scroll wheel volume control" + } + }, + "onScreenDisplay": { + "colors": { + "blue": "Blue", + "green": "Green", + "orange": "Orange", + "pink": "Pink", + "purple": "Purple", + "red": "Red", + "white": "White", + "yellow": "Yellow" + }, + "position": { + "bottom_left": "Bottom Left", + "bottom_right": "Bottom Right", + "center": "Center", + "top_left": "Top Left", + "top_right": "Top Right" + }, + "type": { + "line": "Line", + "no_display": "No display", + "round": "Round", + "text": "Text" + } + }, + "osdColor": { + "label": "OSD Color", + "title": "Select the color for the On-Screen Display" + }, + "osdHide": { + "label": "Hide Delay", + "title": "Specify the time, in milliseconds, before automatically hiding the OSD" + }, + "osdOpacity": { + "label": "OSD Opacity", + "title": "Adjust the transparency of the On-Screen Display" + }, + "osdPadding": { + "label": "Padding", + "title": "Adjust the spacing around the on-screen display (OSD) in pixels. This applies specifically to corner OSD." + }, + "osdPosition": { + "label": "OSD Position", + "title": "Select the position of the On-Screen Display" + }, + "osdType": { + "label": "OSD Type", + "title": "Select the style of On-Screen Display" + }, + "osdVolumeAdjustmentSteps": { + "label": "Volume Change Per Scroll", + "title": "Adjust the volume change per scroll" + }, + "title": "Scroll wheel volume control settings" + }, + "volumeBoost": { + "enable": { + "label": "Volume boost", + "title": "Boosts the volume of the video you're watching" + }, + "number": { + "label": "Volume boost amount (dB)", + "title": "The amount to boost the volume by" + }, + "title": "Volume boost settings" + } + } + } +} From 2dea512eaca67c9070f5bdae737878cb7d98e720 Mon Sep 17 00:00:00 2001 From: VampireChicken12 Date: Fri, 15 Dec 2023 00:04:39 -0500 Subject: [PATCH 15/15] fix(feature menu): ads button now dimmed when feature menu is open Closes #162 --- src/features/featureMenu/index.ts | 34 ++++++++++++++++++++++++++++++- src/manifest.ts | 3 +-- 2 files changed, 34 insertions(+), 3 deletions(-) diff --git a/src/features/featureMenu/index.ts b/src/features/featureMenu/index.ts index 76764831..a473588a 100644 --- a/src/features/featureMenu/index.ts +++ b/src/features/featureMenu/index.ts @@ -93,7 +93,16 @@ export async function enableFeatureMenu() { if (featureMenuButtonExists) return; await createFeatureMenuButton(); } - +function adjustAdsContainerStyles(featureMenuOpen: boolean) { + const adsContainer = document.querySelector("div.video-ads.ytp-ad-module"); + if (adsContainer) { + const adsSpan = adsContainer.querySelector("span.ytp-ad-preview-container"); + if (adsSpan) { + adsSpan.style.opacity = featureMenuOpen ? "0.4" : ""; + adsSpan.style.zIndex = featureMenuOpen ? "36" : ""; + } + } +} export function setupFeatureMenuEventListeners(featureMenuOpenType: FeatureMenuOpenType) { const settingsButton = document.querySelector("button.ytp-settings-button"); if (!settingsButton) return; @@ -111,10 +120,12 @@ export function setupFeatureMenuEventListeners(featureMenuOpenType: FeatureMenuO id: "yte-feature-menu-tooltip" }); const showFeatureMenu = () => { + adjustAdsContainerStyles(true); bottomControls.style.opacity = "1"; featureMenu.style.display = "block"; }; const hideFeatureMenu = () => { + adjustAdsContainerStyles(false); featureMenu.style.display = "none"; bottomControls.style.opacity = ""; }; @@ -178,4 +189,25 @@ export function setupFeatureMenuEventListeners(featureMenuOpenType: FeatureMenuO break; } } + function handleMutation(mutations: MutationRecord[]) { + mutations.forEach((mutation) => { + if (mutation.type === "childList") { + const addedNodes = Array.from(mutation.addedNodes); + const isAdsElementAdded = addedNodes.some( + (node) => (node as HTMLDivElement).classList?.contains("video-ads") && (node as HTMLDivElement).classList?.contains("ytp-ad-module") + ); + if (isAdsElementAdded) { + const featureMenu = document.querySelector("#yte-feature-menu"); + if (featureMenu) { + adjustAdsContainerStyles(featureMenu.style.display === "block"); + } + } + } + }); + } + const observer = new MutationObserver(handleMutation); + observer.observe(playerContainer, { + childList: true, + subtree: true + }); } diff --git a/src/manifest.ts b/src/manifest.ts index 518015cc..e97df952 100755 --- a/src/manifest.ts +++ b/src/manifest.ts @@ -63,8 +63,7 @@ const manifestV2: Manifest.WebExtensionManifest = { }, browser_specific_settings: { gecko: { - id: "{c49b13b1-5dee-4345-925e-0c793377e3fa}", - strict_min_version: "119.0" + id: "{c49b13b1-5dee-4345-925e-0c793377e3fa}" } }, content_scripts: [