Created
April 17, 2012 22:39
-
-
Save piksel/2409549 to your computer and use it in GitHub Desktop.
Greasemonkey script for adding links for watching SVTPlay in VLC and/or downloading
This file contains 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 SvtPlay VLC Link | |
// @namespace http://piksel.se | |
// @version 0.2 | |
// @description Adds links for watching in VLC and/or downloading | |
// @match http://*svtplay.se/t/* | |
// @copyright 2012+, Nils Måsén | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.js | |
// ==/UserScript== | |
(function() { | |
li = document.createElement('li'); | |
url = unsafeWindow.location.href.replace("svtplay","svtget"); | |
li.innerHTML = '<a href="'+url+'">HTTP-Strömmning</a> [<a href="vlc:'+url+'">VLC</a>]'; | |
$('#player .layer .info ul li.last-child').removeClass("last-child"); | |
ul = $("#player .layer .info ul")[0]; | |
ul.appendChild(li); | |
$(li).addClass("last-child"); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment