Skip to content

Instantly share code, notes, and snippets.

@ttwj
Created June 26, 2014 07:56
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 ttwj/e6202d475ea6d3710662 to your computer and use it in GitHub Desktop.
Save ttwj/e6202d475ea6d3710662 to your computer and use it in GitHub Desktop.
Scrollback iFrame
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<style type="text/css">
body {
font-family: 'Open Sans', sans-serif;
overflow-x: hidden;
}
.text-swap-swag {
left:0 !important;
}
.scrollback-swag {
width:100% !important;
height:100% !important;
right:0 !important;
}
.scrollback-log-swag {
top:5px !important;
}
</style>
<script>
function JS_ready() {
console.log("js ready for reals");
$('.scrollback-title').click();
$('.scrollback-title').hide();
$('.scrollback-text-wrap').addClass('text-swap-swag');
$('.scrollback-title').removeClass('scrollback-title');
$('.scrollback-stream').addClass('scrollback-swag');
$('.scrollback-log').addClass('scrollback-log-swag');
$('.scrollback-nick').hide();
$('.scrollback-nick-guest').hide();
};
function JS_wait() {
if ($('.scrollback-stream').length == 0) {
window.setTimeout(JS_wait, 150);
}
else {
JS_ready();
}
}
var queryDict = {}
var _nick;
location.search.substr(1).split("&").forEach(function(item) {queryDict[item.split("=")[0]] = item.split("=")[1]})
if (queryDict['nick'] == undefined) {
_nick = "CakeGuest";
}
else {
_nick = queryDict['nick'];
}
window.scrollback = {
streams:["iphonecake"],
theme: 'light',
nick: _nick,
ticker: true,
};
console.log(window.scrollback);
/***** don't edit below *****/
(function(d,s,h,e){e=d.createElement(s);e.async=1;
e.src=h+'/client.min.js';scrollback.host=h;
d.getElementsByTagName(s)[0].parentNode.appendChild(e);}
(document,'script',(location.protocol=="https:"?"https:":"http:")+'//scrollback.io'));
$(document).ready(JS_wait);
</script>
<body>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment