Skip to content

Instantly share code, notes, and snippets.

@maxwellito
Created March 7, 2016 23:53
Show Gist options
  • Save maxwellito/30d89369a93078170272 to your computer and use it in GitHub Desktop.
Save maxwellito/30d89369a93078170272 to your computer and use it in GitHub Desktop.
Snippet of code to execute on youwatch to avoid adverts and download the content
(function () {
document
.querySelectorAll('iframe')
.forEach(function (e) {
if (e.src.indexOf('youwatch')!=-1 || e.src.indexOf('haouzy')!=-1) {
window.location = e.src;
return;
}
else
e.remove();
});
var vid = document.querySelector('video');
if (vid) window.location = document.querySelector('video').src;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment