Ad-skipper + Fix attempt #1762
Labels
Bug
Bug or required update after YouTube changes
good first issue
A GitHub standard for inviting (new) contributors *Congratulations in advance!*
help wanted
Just an old github standard we add automatically. (The team can remove it when working on it.)
up-for-grabs
(a github standard for inviting new contributors) - Welcome! ♥
1.) mutationObserver trigger ( there could also be eventListeners)
} else if (id === 'movie_player') {
if (!this.elements.player) {
ImprovedTube.elements.player = node;
// if (this.storage.player_autoplay === false) { ImprovedTube.elements.player.stopVideo(); }
ImprovedTube.elements.video = node.querySelector('video');
ImprovedTube.elements.player_left_controls = node.querySelector('.ytp-left-controls');
ImprovedTube.elements.player_thumbnail = node.querySelector('.ytp-cued-thumbnail-overlay-image');
ImprovedTube.elements.player_subtitles_button = node.querySelector('.ytp-subtitles-button');
ImprovedTube.playerSize();
new MutationObserver(function (mutationList) {
for (var i = 0, l = mutationList.length; i < l; i++) {
var mutation = mutationList[i];
if (mutation.type === 'childList') {
for (var j = 0, k = mutation.addedNodes.length; j < k; j++) {
var node = mutation.addedNodes[j];
if (node.nodeName === 'DIV' && node.className.indexOf('ytp-ad-player-overlay') !== -1) {
ImprovedTube.playerAds(node);
}
}
}
}
}).observe(node, {
attributes: false,
childList: true,
subtree: true
});
new MutationObserver(function (mutationList) {
for (var i = 0, l = mutationList.length; i < l; i++) {
var mutation = mutationList[i];
if (mutation.type === 'attributes') {
if (mutation.attributeName === 'style') {
ImprovedTube.playerHdThumbnail();
}
}
}
}).observe(ImprovedTube.elements.player_thumbnail, {
attributes: true,
attributeFilter: ['style'],
childList: false,
subtree: false
});
}
youtube/js&css/web-accessible/functions.js
Lines 157 to 203 in 7b3020f
2.) Function:
youtube/js&css/web-accessible/www.youtube.com/player.js
Lines 372 to 394 in fe43c30
experimental change: 917041b
youtube/js&css/web-accessible/functions.js
Lines 177 to 190 in fe43c30
youtube/js&css/extension/www.youtube.com/styles.css
Lines 38 to 75 in fe43c30
The text was updated successfully, but these errors were encountered: