File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -135,20 +135,36 @@ <h1><center><b>Wiki | FAQ | More Links</b></center></h1><button onclick=createWi
135
135
136
136
< h2 > Saved Pages:</ h2 >
137
137
< ul id ="wikiPages "> </ ul >
138
-
138
+
139
139
< div id ="wikiPageView " style ="display: none; ">
140
140
< h2 id ="viewTitle "> </ h2 >
141
141
< iframe id ="viewContent " style ="width: 100%; height: 300px; border: none; "> </ iframe >
142
142
< button onclick ="closePageView() "> Close Page</ button >
143
143
</ div >
144
+ < script >
145
+ // Get the content element by its ID
146
+ const content = document . getElementById ( "wikiForm" ) ;
147
+
148
+ // Check the current display style and toggle between "none" and "block"
149
+ if ( content . style . display === "none" || content . style . display === "" ) {
150
+ content . style . display = "block" ; // Show the content
151
+ } else {
152
+ content . style . display = "none" ; // Hide the content
153
+ }
154
+
144
155
156
+ </ script >
145
157
< script >
146
158
147
159
function createWikiPage ( ) {
148
160
const title = document . getElementById ( 'pageTitle' ) . value ;
149
161
const content = document . getElementById ( 'pageContent' ) . value ;
150
162
const username = localStorage . getItem ( 'username' ) ;
163
+ // Get the content element by its ID
164
+ const content = document . getElementById ( "wikiForm" ) ;
151
165
166
+ // Change its display style to "block" to make it visible
167
+ content . style . display = "block" ;
152
168
if ( ! title || ! content ) {
153
169
alert ( 'Please enter both a title and content.' ) ;
154
170
return ;
You can’t perform that action at this time.
0 commit comments