Replace javascript:void(0) for href attribute

This commit is contained in:
Helen Chong 2024-06-03 23:43:42 +08:00
parent 47d5c521b5
commit bb724e828b
1 changed files with 7 additions and 0 deletions

View File

@ -20,3 +20,10 @@
</div> </div>
</li> </li>
</ul> </ul>
<script>
const jsVoidStr = 'javascript:void(0)';
if (randomText.includes(jsVoidStr)){
randomText.replace(jsVoidStr, '#!');
}
</script>