mizzzuno commited on
Commit
b8c1b76
·
verified ·
1 Parent(s): 7c2137d

Upload menu.js

Browse files
Files changed (1) hide show
  1. static/menu.js +34 -0
static/menu.js ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function showUserRegister() {
2
+ fetch("/reset");
3
+ window.location.href = "userregister";
4
+ }
5
+ function showRecorder() {
6
+ window.location.href = "index";
7
+ }
8
+ function showResults() {
9
+ window.location.href = "feedback";
10
+ }
11
+ function showTalkdetail() {
12
+ window.location.href = "talk_detail";
13
+ }
14
+ function resetAction() {
15
+ window.location.href = "reset_html";
16
+ }
17
+
18
+ // メニューの表示・非表示
19
+ function toggleMenu(event) {
20
+ event.stopPropagation();
21
+ const menu = document.getElementById("menu");
22
+ menu.classList.toggle("open");
23
+ }
24
+
25
+ function closeMenu(event) {
26
+ const menu = document.getElementById("menu");
27
+ if (
28
+ menu.classList.contains("open") &&
29
+ !menu.contains(event.target) &&
30
+ !event.target.closest("#menuButton")
31
+ ) {
32
+ menu.classList.remove("open");
33
+ }
34
+ }