File tree 8 files changed +19
-16
lines changed
8 files changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,12 @@ jobs:
20
20
21
21
22
22
- name : Install dependencies
23
- run : zypper --non-interactive --gpg-auto-import-keys install rome
23
+ run : zypper --non-interactive --gpg-auto-import-keys install biome
24
24
25
25
- name : Lint
26
26
run : |
27
- rome check .
27
+ biome check .
28
28
29
29
- name : Format
30
30
run : |
31
- rome ci .
31
+ biome ci .
Original file line number Diff line number Diff line change 3
3
"enabled" : true ,
4
4
"rules" : {
5
5
"recommended" : true ,
6
- "nursery" : {
7
- "useConst" : " error" ,
6
+ "style" : {
7
+ "useConst" : " error"
8
+ },
9
+ "suspicious" : {
8
10
"noAssignInExpressions" : " off"
9
11
}
10
12
}
Original file line number Diff line number Diff line change 1
1
import { onBrowse , sleep } from "./../util.js" ;
2
2
3
3
onBrowse ( async ( ) => {
4
- const fileRegex = / \/ ( [ ^ / ] + ) \/ ( [ ^ / ] + ) \/ b l o b \/ ( [ ^ ] + ) \/ ( .+ ) / ;
4
+ const fileRegex = / \/ ( [ ^ / ] + ) \/ ( [ ^ / ] + ) \/ b l o b \/ ( . + ) \/ ( .+ ) / ;
5
5
6
6
const fileMatch = location . pathname . match ( fileRegex ) ;
7
7
@@ -29,9 +29,9 @@ onBrowse(async () => {
29
29
commits = getCommits ( ) ;
30
30
if ( commits . length > 0 ) {
31
31
break ;
32
- } else {
33
- await sleep ( 500 ) ;
34
32
}
33
+
34
+ await sleep ( 500 ) ;
35
35
} while ( ++ attempts < 10 ) ;
36
36
37
37
const ctr = document . querySelector ( ".range-editor" ) ;
Original file line number Diff line number Diff line change @@ -33,15 +33,15 @@ onBrowse(() => {
33
33
*
34
34
* @see https://gist.github.com/chris-kwl/6172eb00971ab81bf99a213682b42e21
35
35
*/
36
- const disableOnmousedown = function ( node ) {
36
+ const disableOnmousedown = ( node ) => {
37
37
const as = node . getElementsByTagName ( "a" ) ;
38
38
for ( let a = as [ 0 ] , i = 1 ; a ; i ++ ) {
39
39
a . removeAttribute ( "data-jsarwt" ) ;
40
40
a = as [ i ] ;
41
41
}
42
42
} ;
43
43
44
- const disableOnmousedownOfInsertedNode = function ( evt ) {
44
+ const disableOnmousedownOfInsertedNode = ( evt ) => {
45
45
const node = evt . target ;
46
46
//const requestURL = evt.newValue;
47
47
//const parentNode = evt.relatedNode;
Original file line number Diff line number Diff line change @@ -12,12 +12,12 @@ b.style.backgroundImage = "none";
12
12
/**
13
13
* remove promotional content for social media
14
14
*/
15
- [ ".fbLikeBoxHolder" , ".subscribe" ] . forEach ( ( css ) => {
15
+ for ( const css of [ ".fbLikeBoxHolder" , ".subscribe" ] ) {
16
16
const like = document . querySelector ( css ) ;
17
17
if ( like ) {
18
18
like . parentNode . remove ( ) ;
19
19
}
20
- } ) ;
20
+ }
21
21
22
22
/**
23
23
* automatically move to next verse
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ switch (location.host) {
24
24
case "npmjs.com" :
25
25
case "reddit.com" :
26
26
case "youtube.com" :
27
+ // biome-ignore lint/suspicious/noFallthroughSwitchClause: intentional
27
28
target = domain ;
28
29
default : {
29
30
if ( / ( g g p h t | g o o g l e u s e r c o n t e n t ) .c o m $ / . test ( domain ) ) {
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ function run_it(node = document) {
46
46
const sections = location . pathname . split ( / (? ! ^ ) \/ / ) ;
47
47
const loc = sections [ 0 ] ;
48
48
if ( [ "/user" , "/r" ] . includes ( loc ) ) {
49
- [ ... node . querySelectorAll ( "a" ) ] . forEach ( ( element ) => {
49
+ for ( const element of node . querySelectorAll ( "a" ) ) {
50
50
const href = element . getAttribute ( "href" ) ;
51
51
if ( ! href ) {
52
52
return ;
@@ -113,7 +113,7 @@ function run_it(node = document) {
113
113
'url("https://upload.wikimedia.org/wikipedia/commons/0/0f/External-link-ltr-icon_Dark.png")' ;
114
114
element . style . paddingRight = "11px" ;
115
115
}
116
- } ) ;
116
+ }
117
117
}
118
118
node . marked = true ;
119
119
}
Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ export const onBrowse = (doit) => {
8
8
window . onpopstate = doit ;
9
9
10
10
// https://stackoverflow.com/a/64927639/270302
11
- [ "pushState" , "replaceState" ] . forEach ( ( type ) => {
11
+ for ( const type of [ "pushState" , "replaceState" ] ) {
12
12
window . history [ type ] = new Proxy ( window . history [ type ] , {
13
13
apply : ( target , thisarg , argarray ) => {
14
14
doit ( ) ;
15
15
return target . apply ( thisarg , argarray ) ;
16
16
} ,
17
17
} ) ;
18
- } ) ;
18
+ }
19
19
20
20
doit ( ) ;
21
21
} ;
You can’t perform that action at this time.
0 commit comments