Rooni commited on
Commit
5a6e0c4
·
verified ·
1 Parent(s): 308cf0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -110,10 +110,14 @@ footer {visibility: hidden !important;}
110
  custom_javascript = """
111
  document.addEventListener('DOMContentLoaded', function() {
112
  const instructionElement = document.querySelector('textarea');
113
- const charCounterElement = document.querySelector('label[for="textbox"]');
 
 
 
 
114
 
115
  function updateCharCount() {
116
- const text = instructionElement.value.replace(/\\s+/g, '');
117
  const charCount = text.length;
118
  charCounterElement.textContent = `${charCount}/250`;
119
  }
 
110
  custom_javascript = """
111
  document.addEventListener('DOMContentLoaded', function() {
112
  const instructionElement = document.querySelector('textarea');
113
+ const submitButton = document.querySelector('.submit-button-class');
114
+ const charCounterElement = document.createElement('span');
115
+ charCounterElement.classList.add('char-counter-class');
116
+ charCounterElement.textContent = '0/250';
117
+ submitButton.appendChild(charCounterElement);
118
 
119
  function updateCharCount() {
120
+ const text = instructionElement.value.replace(/\\s/g, '');
121
  const charCount = text.length;
122
  charCounterElement.textContent = `${charCount}/250`;
123
  }