Created
August 22, 2016 14:11
-
-
Save klepto/a8d2cd0f714944c9e3e5e8f222b84be7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ==UserScript== | |
| // @name KissAnime Linker | |
| // @namespace https://github.com/kLeptO- | |
| // @version 0.1 | |
| // @description Direct linker for KissAnime. | |
| // @author kLeptO | |
| // @match *.me/Anime/* | |
| // @require http://code.jquery.com/jquery-latest.js | |
| // @grant none | |
| // ==/UserScript== | |
| (function() { | |
| $(".listing a").each(function() { | |
| var link = $(this); | |
| var href = link.attr("href"); | |
| var directLink = $("<a>"); | |
| $.ajax({ | |
| url: href, | |
| type: 'GET', | |
| success: function(data) { | |
| var directHref = $(data).find('[itemprop="video"] iframe').attr("src"); | |
| directLink.html(" [Direct Link]"); | |
| directLink.attr("href", directHref); | |
| directLink.attr("target", "_blank"); | |
| link.after(directLink); | |
| } | |
| }); | |
| }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment