Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -159,27 +159,43 @@ def main():
|
|
| 159 |
<div class="question-box" id="question3">Was sind die Vorteile des ambulanten operierens?</div>
|
| 160 |
""", unsafe_allow_html=True)
|
| 161 |
|
| 162 |
-
# JavaScript for handling question box clicks
|
| 163 |
st.markdown("""
|
| 164 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
document.getElementById('question1').onclick = function() {
|
|
|
|
| 166 |
document.querySelectorAll('div.stTextInput input')[0].value = 'Was genau ist ein Belegarzt?';
|
| 167 |
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
|
| 168 |
-
|
| 169 |
};
|
| 170 |
document.getElementById('question2').onclick = function() {
|
|
|
|
| 171 |
document.querySelectorAll('div.stTextInput input')[0].value = 'Wofür wird die Alpha-ID verwendet?';
|
| 172 |
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
|
| 173 |
-
|
| 174 |
};
|
| 175 |
document.getElementById('question3').onclick = function() {
|
|
|
|
| 176 |
document.querySelectorAll('div.stTextInput input')[0].value = 'Was sind die Vorteile des ambulanten operierens?';
|
| 177 |
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
|
| 178 |
-
|
| 179 |
};
|
| 180 |
</script>
|
| 181 |
""", unsafe_allow_html=True)
|
| 182 |
|
|
|
|
|
|
|
| 183 |
|
| 184 |
if __name__ == "__main__":
|
| 185 |
main()
|
|
|
|
| 159 |
<div class="question-box" id="question3">Was sind die Vorteile des ambulanten operierens?</div>
|
| 160 |
""", unsafe_allow_html=True)
|
| 161 |
|
|
|
|
| 162 |
st.markdown("""
|
| 163 |
<script>
|
| 164 |
+
function clickAskButton() {
|
| 165 |
+
let askButton = document.querySelector('button[data-baseweb="button"]');
|
| 166 |
+
if (!askButton) {
|
| 167 |
+
askButton = document.querySelector('button:contains("Ask")');
|
| 168 |
+
}
|
| 169 |
+
if (askButton) {
|
| 170 |
+
askButton.click();
|
| 171 |
+
} else {
|
| 172 |
+
console.error('Ask button not found');
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
document.getElementById('question1').onclick = function() {
|
| 177 |
+
console.log('Question 1 clicked');
|
| 178 |
document.querySelectorAll('div.stTextInput input')[0].value = 'Was genau ist ein Belegarzt?';
|
| 179 |
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
|
| 180 |
+
clickAskButton();
|
| 181 |
};
|
| 182 |
document.getElementById('question2').onclick = function() {
|
| 183 |
+
console.log('Question 2 clicked');
|
| 184 |
document.querySelectorAll('div.stTextInput input')[0].value = 'Wofür wird die Alpha-ID verwendet?';
|
| 185 |
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
|
| 186 |
+
clickAskButton();
|
| 187 |
};
|
| 188 |
document.getElementById('question3').onclick = function() {
|
| 189 |
+
console.log('Question 3 clicked');
|
| 190 |
document.querySelectorAll('div.stTextInput input')[0].value = 'Was sind die Vorteile des ambulanten operierens?';
|
| 191 |
document.querySelectorAll('div.stTextInput input')[0].dispatchEvent(new Event('change'));
|
| 192 |
+
clickAskButton();
|
| 193 |
};
|
| 194 |
</script>
|
| 195 |
""", unsafe_allow_html=True)
|
| 196 |
|
| 197 |
+
|
| 198 |
+
|
| 199 |
|
| 200 |
if __name__ == "__main__":
|
| 201 |
main()
|