@@ -5,6 +5,9 @@ settings.register({
55
66( ( ) => {
77 if ( settings . value ( 'underscript.disable.questHighlight' ) ) return ;
8+ const questSelector = 'input[type="submit"][value="Claim"]:not(:disabled)' ;
9+
10+ eventManager . on ( 'jQuery' , ( ) => $el . removeClass ( document . querySelectorAll ( '.yellowLink' ) , 'yellowLink' ) ) ;
811 style . add ( 'a.highlightQuest {color: gold !important;}' ) ;
912
1013 function highlightQuest ( ) {
@@ -21,12 +24,12 @@ settings.register({
2124 function checkHighlight ( ) {
2225 axios . get ( '/Quests' ) . then ( function ( response ) {
2326 const data = $ ( response . data ) ;
24- const quests = data . find ( 'input[name="dailyQuest"]:not(:disabled)' ) ;
27+ const quests = data . find ( questSelector ) ;
2528 if ( quests . length ) {
2629 localStorage . setItem ( 'underscript.quest.clear' , true ) ;
2730 if ( onPage ( 'Game' ) ) {
2831 let questsCleared = '' ;
29- quests . each ( ( i , e ) => questsCleared += `- ${ $ ( e ) . parent ( ) . text ( ) . trim ( ) } \n` ) ;
32+ quests . each ( ( i , e ) => questsCleared += `- ${ $ ( e ) . parentsUntil ( 'tbody' , 'tr' ) . find ( 'span.descEN' ) . text ( ) } \n` ) ;
3033 fn . toast ( {
3134 title : 'Quest Completed!' ,
3235 text : `${ questsCleared } Click to go to Quests page` ,
@@ -63,7 +66,7 @@ settings.register({
6366 }
6467 }
6568
66- if ( onPage ( 'Quests' ) && ! $ ( 'input[name="dailyQuest"]:not(:disabled)' ) . length ) {
69+ if ( onPage ( 'Quests' ) && ! $ ( questSelector ) . length ) {
6770 clearHighlight ( ) ;
6871 }
6972
0 commit comments