Skip to content

Instantly share code, notes, and snippets.

@azu
Created December 31, 2015 12:28
Show Gist options
  • Save azu/e4a1a06878de81101561 to your computer and use it in GitHub Desktop.
Save azu/e4a1a06878de81101561 to your computer and use it in GitHub Desktop.
Greasemonkey script egghead: floting transcript
// ==UserScript==
// @name egghead: floting transcript
// @namespace info.efcl.egghead.transcript
// @include https://egghead.io/lessons/*
// @version 1
// @grant none
// ==/UserScript==
function GM_addStyle(aCss) {
'use strict';
let head = document.getElementsByTagName('head')[0];
if (head) {
let style = document.createElement('style');
style.setAttribute('type', 'text/css');
style.textContent = aCss;
head.appendChild(style);
return style;
}
return null;
}
GM_addStyle(`
#tab-transcript {
position:fixed;
top: 100px;
right:0;
z-index:123456;
background-color: white;
padding: 1rem;
}
#tab-transcript{
max-height: 32em;
max-width: 30%;
overflow-y: scroll;
}
`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment