Skip to content

Instantly share code, notes, and snippets.

@queile
Created May 8, 2014 15:18
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save queile/ceaebbe9c3c78b95a1d7 to your computer and use it in GitHub Desktop.
Save queile/ceaebbe9c3c78b95a1d7 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name show Showroom streaming url
// @description ShowroomのストリーミングURLを表示
// @include https://www.showroom-live.com/*
// ==/UserScript==
$.ajax({
url: "/room/get_data",
type: "GET",
data: {room_id:SrGlobal.roomId}
}).done(function(data, status, xhr) {
if (data.room == null) {
return false;
}
$('body').prepend($('<textarea>')
.val(data.streaming_url_hls)
.css('width','100%')
.focus(function(){
setTimeout(function(){$(this).select();},0);
})
.click(function(){
$(this).select();
return false;
})
);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment