Created
December 31, 2015 12:28
-
-
Save azu/e4a1a06878de81101561 to your computer and use it in GitHub Desktop.
Greasemonkey script egghead: floting transcript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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