File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ This repo is experimental and was created out of the need to have a better exper
2525
2626### Supported Pages
2727
28- - [ ] github
28+ - [x ] github (reads special ` data-code-text ` attributes)
2929- [x] gitlab
3030- [x] bitbucket server
3131
Original file line number Diff line number Diff line change @@ -151,9 +151,12 @@ function runGuidReplacer() {
151151 elements [ i ] . parentNode . removeChild ( elements [ i ] ) ;
152152 }
153153
154- // Traverse all text nodes in the document body
154+ // Traverse all potential nodes in the document body
155155 traverseTextNodes ( document . body ) ;
156- traverseDataCodeTextElements ( document . body ) ;
156+ if ( window . location . hostname === "github.com" ) {
157+ // Additionally traverse all special github elements with data-code-text attribute
158+ traverseDataCodeTextElements ( document . body ) ;
159+ }
157160
158161 console . log ( "Found " + matchCount + " matches" + " in " + nodeCount + " nodes (duration: " + ( performance . now ( ) - startTime ) + " ms)" ) ;
159162}
You can’t perform that action at this time.
0 commit comments