gregH commited on
Commit
3f93432
·
verified ·
1 Parent(s): 9402ef4

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +9 -9
index.html CHANGED
@@ -205,25 +205,25 @@ gradient norm and then apply soft removal on them to mitigate the potential jail
205
  // Highlight specific parts of the text
206
  switch (exampleId) {
207
  case 'example1':
208
- highlightText(exampleText, 'successful jailbreaks');
209
  break;
210
  case 'example2':
211
- highlightText(exampleText, 'our proposed defense');
212
  break;
213
  case 'example3':
214
- highlightText(exampleText, 'Affirmation Loss');
215
  break;
216
  case 'example4':
217
- highlightText(exampleText, 'soft removal');
218
- // exampleText.innerHTML="We select those tokens with the larger <span class="highlight">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
219
  break;
220
  }
221
  }
222
 
223
- function highlightText(element, keyword) {
224
- const regex = new RegExp(`(${keyword})`, 'gi');
225
- element.innerHTML = element.innerHTML.replace(regex, '<span class="highlight">$1</span>');
226
- }
227
  </script>
228
 
229
 
 
205
  // Highlight specific parts of the text
206
  switch (exampleId) {
207
  case 'example1':
208
+ exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
209
  break;
210
  case 'example2':
211
+ exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
212
  break;
213
  case 'example3':
214
+ exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
215
  break;
216
  case 'example4':
217
+ // highlightText(exampleText, 'soft removal');
218
+ exampleText.innerHTML="We select those tokens with the larger <span class=\"highlight\">hallo</span> gradient norm and then apply soft removal on them to mitigate the potential jailbreak risks."
219
  break;
220
  }
221
  }
222
 
223
+ //function highlightText(element, keyword) {
224
+ // const regex = new RegExp(`(${keyword})`, 'gi');
225
+ // element.innerHTML = element.innerHTML.replace(regex, '<span class="highlight">$1</span>');
226
+ //}
227
  </script>
228
 
229