Last active
October 18, 2018 18:24
-
-
Save dan-petty/d9c3218d5deded3c0519d82a4062ae09 to your computer and use it in GitHub Desktop.
Improve AWS Docs Table of Contents usability with this greasemonkey script
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 AWSDocsTOC | |
// @version 1.0 | |
// @description Configure AWS Table of Contents | |
// @author Dan Petty | |
// @match *://docs.aws.amazon.com/* | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var leftWidth = "435px"; | |
var padding = "5px"; | |
$( '#left-column' ).css( "width", leftWidth ); | |
$( '#main-column' ).css( "margin-left", leftWidth ); | |
$( '#left-col-header' ).css( "padding-left", padding ); | |
$( '#left-col-header' ).css( "padding-right", padding ); | |
$( '#toc' ).css( "padding-left", padding ); | |
$( '#toc' ).css( "padding-right", padding ); | |
$( '#left-column' ).scrollTop( localStorage.getItem( 'left-column-scroll' ) ); | |
$( '#left-column' ).scroll(function() { | |
localStorage.setItem( 'left-column-scroll', $( '#left-column' ).scrollTop() ); | |
}); | |
})(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment