File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
export default {
2
2
3
3
re : [
4
- / ^ h t t p s ? : \/ \/ q u i z l e t \. c o m \/ (?: \w { 2 } \/ ) ? ( \d + ) \/ ( [ ^ \/ ] + ) \/ ? / i
4
+ / ^ h t t p s ? : \/ \/ q u i z l e t \. c o m \/ (?: \w { 2 } \/ ) ? ( \d + ) \/ [ ^ \/ ] + \/ ? / i,
5
+ / ^ h t t p s ? : \/ \/ q u i z l e t \. c o m \/ (?: \w { 2 } \/ ) ? (?: f l a s h c a r d s | m a t c h | l e a r n | s p e l l | t e s t ) \/ [ ^ \/ ] + \- ( \d + ) \/ ? (?: \? .+ ) ? $ / i
5
6
] ,
6
7
7
8
mixins : [
8
9
"*"
9
10
] ,
10
11
11
- getLinks : function ( urlMatch , options ) {
12
+ getLinks : function ( url , urlMatch , options ) {
13
+ const TYPE_RE = / \/ ( f l a s h c a r d s | m a t c h | l e a r n | s p e l l | t e s t ) \/ / i;
12
14
13
- var mode = options . getRequestOptions ( 'quizlet.mode' , / ^ f l a s h c a r d s | m a t c h | l e a r n | s p e l l | t e s t $ / i . test ( urlMatch [ 2 ] ) ? urlMatch [ 2 ] : 'flashcards' ) ;
15
+ var mode = options . getRequestOptions ( 'quizlet.mode' , TYPE_RE . test ( url ) ? url . match ( TYPE_RE ) [ 1 ] : 'flashcards' ) ;
14
16
15
17
return {
16
18
href : 'https://quizlet.com/' + urlMatch [ 1 ] + '/' + mode + '/embed' ,
@@ -41,7 +43,7 @@ export default {
41
43
"https://quizlet.com/43729824/scatter" ,
42
44
"https://quizlet.com/43729824/gravity" ,
43
45
"https://quizlet.com/43729824/test" ,
44
- "https://quizlet.com/ca/385594556/math-flash-cards/"
46
+ "https://quizlet.com/ca/385594556/math-flash-cards/" ,
47
+ "https://quizlet.com/test/conceptual-physics-final-review-part-1-43729824"
45
48
]
46
-
47
49
} ;
You can’t perform that action at this time.
0 commit comments