Skip to content

Instantly share code, notes, and snippets.

@Udo Udo/user.js
Last active Aug 20, 2016

Embed
What would you like to do?
Tampermonkey script for displaying the Ludum Dare Streamers widget on the LD website
// ==UserScript==
// @name Ludum Dare Streamers Widget
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Simple script to patch a live stream preview into the Ludum Dare website.
// @author Udo Schroeter udo.schroeter@gmail.com
// @grant none
// @include http://ludumdare.com/*
// ==/UserScript==
(function() {
'use strict';
var injectLinkIntoSidebar = function() {
jQuery('.imagebox').append('<div>'+
'<img src="http://direct.openfu.com/ld/live/img/playbutton.png" width="56" />'+
'<div>'+
'<div class="headline">Streaming Ludum Dare</div>'+
'<div>Programming live streams</div>'+
'</div>'+
'<a href="https://openfu.com/ld/live"><img src="/_.png" class="blank" /></a>'+
'</div>');
};
var injectPreview = function() {
jQuery('.imagebox').prepend('<iframe '+
'style="border: none; border-radius: 12px;" '+
'src="https://openfu.com/ld/live/?preview-widget" '+
'width="100%" height="180"></iframe>');
};
if(jQuery && jQuery('.imagebox').length > 0) {
// injectLinkIntoSidebar();
injectPreview();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.