mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix listener override condition
This commit is contained in:
@ -8,7 +8,7 @@ function overrideAddEventListener() {
|
|||||||
Element.prototype._addEventListener = Element.prototype.addEventListener;
|
Element.prototype._addEventListener = Element.prototype.addEventListener;
|
||||||
// Override addEventListener to Ignore specific events in volume-slider
|
// Override addEventListener to Ignore specific events in volume-slider
|
||||||
Element.prototype.addEventListener = function (type, listener, useCapture = false) {
|
Element.prototype.addEventListener = function (type, listener, useCapture = false) {
|
||||||
if (this.tagName === "TP-YT-PAPER-SLIDER") { // tagName of #volume-slider
|
if (this.id === "volume-slider" || this.id === "expand-volume-slider") { // id of both volume sliders
|
||||||
for (const eventType of nativeEvents) {
|
for (const eventType of nativeEvents) {
|
||||||
if (eventType === type) {
|
if (eventType === type) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user