Skip to content

Instantly share code, notes, and snippets.

@piksel
Created April 17, 2012 22:39
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 piksel/2409549 to your computer and use it in GitHub Desktop.
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
// ==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&ouml;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