File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,15 @@ const UF_MSG_API_RATE = "<b>GitHub API rate-limits exceeded.</b> Consider pr
1818 + "It's also possible that the queried repository has so many forks that it's impossible to scan it completely without running out of API calls.<br>"
1919 + ":(" ;
2020
21+ // list of messages which should not be cleared when the request ends
22+ const UF_PRESERVED_MSGS = [
23+ UF_MSG_NO_FORKS ,
24+ UF_MSG_EMPTY_FILTER ,
25+ UF_MSG_ERROR ,
26+ UF_MSG_SLOWER ,
27+ UF_MSG_API_RATE
28+ ] ;
29+
2130
2231const EXAMPLE_LINK_1 = `<a href="${ buildAutoQueryURL ( 'payne911/PieMenu' ) } "
2332 onclick="ga_shortExampleLink();">payne911/PieMenu</a>` ;
@@ -92,8 +101,8 @@ function clearMsg() {
92101 JQ_ID_MSG . empty ( ) ;
93102}
94103function clearNonErrorMsg ( ) {
95- const errorMsg = JQ_ID_MSG . html ( ) ;
96- if ( errorMsg !== UF_MSG_ERROR && errorMsg !== UF_MSG_SLOWER )
104+ const msg = JQ_ID_MSG . html ( ) ;
105+ if ( ! UF_PRESERVED_MSGS . includes ( msg ) )
97106 clearMsg ( ) ;
98107}
99108function setHeader ( msg ) {
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ function allRequestsAreDone() {
104104function decrementCounters ( ) {
105105 ONGOING_REQUESTS_COUNTER -- ;
106106 if ( allRequestsAreDone ( ) ) {
107- clearMsg ( ) ;
107+ clearNonErrorMsg ( ) ;
108108 sortTable ( ) ;
109109 enableQueryFields ( ) ;
110110 displayCsvExportBtn ( ) ;
You can’t perform that action at this time.
0 commit comments