@@ -18,27 +18,27 @@ export function initRepoGraphGit() {
18
18
window . history . replaceState ( { } , '' , window . location . pathname ) ;
19
19
}
20
20
$ ( '.pagination a' ) . each ( ( _ , that ) => {
21
- const href = $ ( that ) . attr ( 'href' ) ;
21
+ const href = that . getAttribute ( 'href' ) ;
22
22
if ( ! href ) return ;
23
23
const url = new URL ( href , window . location ) ;
24
24
const params = url . searchParams ;
25
25
params . set ( 'mode' , 'monochrome' ) ;
26
26
url . search = `?${ params . toString ( ) } ` ;
27
- $ ( that ) . attr ( 'href' , url . href ) ;
27
+ that . setAttribute ( 'href' , url . href ) ;
28
28
} ) ;
29
29
} ) ;
30
30
$ ( '#flow-color-colored' ) . on ( 'click' , ( ) => {
31
31
$ ( '#flow-color-colored' ) . addClass ( 'active' ) ;
32
32
$ ( '#flow-color-monochrome' ) . removeClass ( 'active' ) ;
33
33
$ ( '#git-graph-container' ) . addClass ( 'colored' ) . removeClass ( 'monochrome' ) ;
34
34
$ ( '.pagination a' ) . each ( ( _ , that ) => {
35
- const href = $ ( that ) . attr ( 'href' ) ;
35
+ const href = that . getAttribute ( 'href' ) ;
36
36
if ( ! href ) return ;
37
37
const url = new URL ( href , window . location ) ;
38
38
const params = url . searchParams ;
39
39
params . delete ( 'mode' ) ;
40
40
url . search = `?${ params . toString ( ) } ` ;
41
- $ ( that ) . attr ( 'href' , url . href ) ;
41
+ that . setAttribute ( 'href' , url . href ) ;
42
42
} ) ;
43
43
const params = new URLSearchParams ( window . location . search ) ;
44
44
params . delete ( 'mode' ) ;
0 commit comments