HowardZhangdqs commited on
Commit
6c0c3bb
Β·
1 Parent(s): a6758dd

fix: update papers while the date is specified

Browse files
Files changed (4) hide show
  1. app-dev.py +1 -1
  2. interface.py +1 -1
  3. js/detail.js +11 -0
  4. js/writeInput.js +2 -0
app-dev.py CHANGED
@@ -9,6 +9,6 @@ demo = create_interface()
9
  if __name__ == "__main__":
10
  demo.launch(
11
  server_name="localhost",
12
- server_port=7860,
13
  # share=True
14
  )
 
9
  if __name__ == "__main__":
10
  demo.launch(
11
  server_name="localhost",
12
+ # server_port=7860,
13
  # share=True
14
  )
interface.py CHANGED
@@ -206,7 +206,7 @@ def create_interface():
206
  last_week_btn = gr.Button("Last Week")
207
  last_month_btn = gr.Button("Last Month")
208
 
209
- query_btn = gr.Button("πŸ” Query", variant="primary")
210
 
211
  with gr.Row():
212
 
 
206
  last_week_btn = gr.Button("Last Week")
207
  last_month_btn = gr.Button("Last Month")
208
 
209
+ query_btn = gr.Button("πŸ” Query", variant="primary", elem_id="query_button")
210
 
211
  with gr.Row():
212
 
js/detail.js CHANGED
@@ -13,4 +13,15 @@ function showDetail(paperId) {
13
  document.getElementById("paper-detail-area").scrollIntoView({
14
  behavior: 'smooth'
15
  });
 
 
 
 
 
 
 
 
 
 
 
16
  }
 
13
  document.getElementById("paper-detail-area").scrollIntoView({
14
  behavior: 'smooth'
15
  });
16
+ }
17
+
18
+
19
+
20
+ // 从URLδΈ­θŽ·ε–ε‚ζ•°
21
+ function getPaper() {
22
+ const paperId = new URLSearchParams(window.location.search).get('paper');
23
+
24
+ if (paperId) {
25
+ // showDetail(paperId);
26
+ }
27
  }
js/writeInput.js CHANGED
@@ -71,6 +71,8 @@ function findElement(selector, callback) {
71
  // 1η§’εŽεœζ­’θ§¦ε‘ε›žθ°ƒε‡½ζ•°
72
  setTimeout(() => {
73
  clearInterval(intervalid2);
 
 
74
  }, 2000);
75
  }
76
  }, 100);
 
71
  // 1η§’εŽεœζ­’θ§¦ε‘ε›žθ°ƒε‡½ζ•°
72
  setTimeout(() => {
73
  clearInterval(intervalid2);
74
+ console.log("click");
75
+ document.querySelector("#query_button").click();
76
  }, 2000);
77
  }
78
  }, 100);