It is in the name
Seznam verzí skriptu, při kterých došlo ke změnám v kódu. Zobrazit všechny verze.
The script now removes any element with the class name seventv-yt-theater-mode-button-container on YouTube, instead of only targeting the specific button element with the aria label "Theater mode". This should make the script more robust to changes in the aria label or other attributes of the button element.The removeElementByXpath function used in the previous version of the script has been replaced with a simpler removeElementsByClassName function that uses the getElementsByClassName method to find and remove all elements with the target class name. This should make the script more efficient and easier to read.The targetXPath variable used in the previous version of the script has been replaced with the targetClassName variable to reflect the change in the target element selector.The if statement inside the mutation observer has been modified to check whether the added node has a classList property and contains the target class name before removing elements. This should prevent errors when the added node does not have a classList property, such as when a text node is added to the DOM.The script should now work for any element on YouTube with the seventv-yt-theater-mode-button-container class name, not just the specific button element with the aria label "Theater mode".
Changelog for version 1.2:- Changed the xpath used to locate the element to be removed to a more general one that should work across different YouTube videos.- Added a MutationObserver that listens for changes in the page and removes the element as soon as it appears, instead of waiting for a fixed delay.- No other changes were made. The script is still licensed under the MIT License.
1.1 Script stopped working for some reason that is now fixed