Skip to content

Instantly share code, notes, and snippets.

@rudiedirkx
Created September 22, 2014 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rudiedirkx/df73ea67218ca1c8f117 to your computer and use it in GitHub Desktop.
Save rudiedirkx/df73ea67218ca1c8f117 to your computer and use it in GitHub Desktop.
Blur YouTube share input
var el = document.querySelector('#watch7-content');
var mo = new MutationObserver(function(muts) {
muts.forEach(function(mut) {
[].forEach.call(mut.addedNodes, function(node) {
var el = node.querySelector && node.querySelector('input[name="share_url"]');
if ( el ) {
setTimeout(function() {
el.blur();
}, 1);
}
});
});
});
mo.observe(el, {childList: 1, subtree: 1});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment