Skip to content

Instantly share code, notes, and snippets.

@fabiomcosta
Created June 4, 2012 05:06
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 fabiomcosta/2866466 to your computer and use it in GitHub Desktop.
Save fabiomcosta/2866466 to your computer and use it in GitHub Desktop.
Use dotjs (https://github.com/defunkt/dotjs) to remove the unwanted pop-up before downloading subtitles on legendas.tv - click and download the subtitle right away!
(function () {
var script = document.createElement('script');
script.type = 'text/javascript';
script.onload = ready;
script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';
document.body.appendChild(script);
function ready() {
var $ = jQuery;
$('.buscaNDestaque, .buscaDestaque').each(function(i, el) {
el = $(el);
var onclickAttr = el.attr('onclick'),
id = onclickAttr.match(/'(\w+)'/)[1];
el.attr('onclick', '').
wrap($('<a>').attr('href', 'http://legendas.tv/info.php?d='+ id +'&c=1'));
});
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment