File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 11// ==UserScript==
22// @name GitHub Table of Contents
3- // @version 2.1.5
3+ // @version 2.1.6
44// @description A userscript that adds a table of contents to readme & wiki pages
55// @license MIT
66// @author Rob Garrison
77// @namespace https://github.com/Mottie
8- // @include https://github.com/*
9- // @include https://gist.github.com/*
8+ // @match https://github.com/*
9+ // @match https://gist.github.com/*
1010// @run -at document-idle
1111// @grant GM_registerMenuCommand
1212// @grant GM.registerMenuCommand
3535 right : "10px" , // popup right position when reset
3636 headerPad : "48px" , // padding added to header when TOC is collapsed
3737 headerSelector : [ ".header" , ".Header" , ".header-logged-out > div" ] ,
38+ wrapperSelector : "#wiki-body, #readme, [id^='file-'][id$='-md']" ,
3839 headerWrap : ".js-header-wrapper" ,
3940 toggle : "g+t" , // keyboard toggle shortcut
4041 restore : "g+r" , // keyboard reset popup position shortcut
267268 if ( ! tocInit ) {
268269 return ;
269270 }
270- const wrapper = $ ( "#wiki-body, #readme" ) ;
271+ const wrapper = $ ( defaults . wrapperSelector ) ;
271272 if ( wrapper ) {
272273 let indx , header , anchor , txt ;
273274 let content = "<ul>" ;
You can’t perform that action at this time.
0 commit comments