Removes the attribute controlslist=nodownload of video tag.
< Feedback on Remove controlslist=nodownload
Consider this:
// ==UserScript==
// @name Remove controlslist=nodownload
// @namespace remove-controlslist-nodownload
// @version 8
// @description Removes the attribute controlslist=nodownload of video and audio tag.
// @author Shawphy
// @grant none
// @match *://*/*
// ==/UserScript==
(function() {
var target = document.querySelector('body');
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
Array.prototype.forEach.call(document.querySelectorAll('video[controlslist~=nodownload], audio[controlslist~=nodownload]'), function(el){
el.controlsList.remove("nodownload");
});
});
});
var config = { childList: true, subtree: true }
observer.observe(target, config);
})();
Maybe you can consider doing that for
<audio>
too. Certainly I have done that myself.