Fossil SCM

chat: fixed links to /env and /self to use the file's current name instead of hard-coded to 'chat'.

stephan 2020-12-22 13:05 chatroom-dev
Commit 896d7d44b048934d1dee932c8eed6ea4c00c6202079677c5576314e242ea90f0
1 file changed +4 -2
+4 -2
--- tools/chat.tcl
+++ tools/chat.tcl
@@ -35,10 +35,12 @@
3535
<p>You must have privileges to use this chatroom</p>
3636
</div>
3737
}
3838
return
3939
}
40
+ set scriptFile [wapp-param SCRIPT_FILENAME]
41
+ set cgiFn [file tail $scriptFile]
4042
wapp-trim {
4143
<form accept-encoding="utf-8" id="chat-form">
4244
<div id='chat-input-area'>
4345
<div id='chat-input-line'>
4446
<input type="text" name="msg" id="sbox" placeholder="Type message here.">
@@ -56,12 +58,12 @@
5658
--></span>
5759
5860
</div><!-- .fossil-doc -->
5961
<hr>
6062
<p>
61
- <a href="chat/env">CGI environment</a> |
62
- <a href="chat/self">Wapp script</a>
63
+ <a href="%string($cgiFn)/env">CGI environment</a> |
64
+ <a href="%string($cgiFn)/self">Wapp script</a>
6365
<style>
6466
\#dialog {
6567
width: 97%;
6668
}
6769
\#chat-input-area {
6870
--- tools/chat.tcl
+++ tools/chat.tcl
@@ -35,10 +35,12 @@
35 <p>You must have privileges to use this chatroom</p>
36 </div>
37 }
38 return
39 }
 
 
40 wapp-trim {
41 <form accept-encoding="utf-8" id="chat-form">
42 <div id='chat-input-area'>
43 <div id='chat-input-line'>
44 <input type="text" name="msg" id="sbox" placeholder="Type message here.">
@@ -56,12 +58,12 @@
56 --></span>
57
58 </div><!-- .fossil-doc -->
59 <hr>
60 <p>
61 <a href="chat/env">CGI environment</a> |
62 <a href="chat/self">Wapp script</a>
63 <style>
64 \#dialog {
65 width: 97%;
66 }
67 \#chat-input-area {
68
--- tools/chat.tcl
+++ tools/chat.tcl
@@ -35,10 +35,12 @@
35 <p>You must have privileges to use this chatroom</p>
36 </div>
37 }
38 return
39 }
40 set scriptFile [wapp-param SCRIPT_FILENAME]
41 set cgiFn [file tail $scriptFile]
42 wapp-trim {
43 <form accept-encoding="utf-8" id="chat-form">
44 <div id='chat-input-area'>
45 <div id='chat-input-line'>
46 <input type="text" name="msg" id="sbox" placeholder="Type message here.">
@@ -56,12 +58,12 @@
58 --></span>
59
60 </div><!-- .fossil-doc -->
61 <hr>
62 <p>
63 <a href="%string($cgiFn)/env">CGI environment</a> |
64 <a href="%string($cgiFn)/self">Wapp script</a>
65 <style>
66 \#dialog {
67 width: 97%;
68 }
69 \#chat-input-area {
70

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button