[Zetaboard] Find and Replace Text - Tìm và thay thế từ cấm

[Mr.P]

New member
Tác giả: Cory
Preview: Khi dùng code này, nó sẽ thay đổi các từ cầm dùng trong forum thành một từ khác
=========
Đặt code tại Below The Boards
Mã:
<script type="text/javascript">
$("*").contents().each(function () {
if (this.nodeType == 3) this.nodeValue = this.nodeValue.replace("Từ Cấm", "Từ thay thế");
});
</script>
Các bạn chỉnh sửa tại ("Từ Cấm", "Từ thay thế");
Nếu dùng nhiều từ các bạn sử dụng code này:
Mã:
<script type="text/javascript">
$("*").contents().each(function () {
if (this.nodeType == 3) this.nodeValue = this.nodeValue.replace("Từ Cấm", "Từ thay thế").replace("Từ Cấm", "Từ thay thế").replace("Từ Cấm", "Từ thay thế");
});
</script>
Lập lại đoạn .replace("Từ Cấm", "Từ thay thế")
 
Back
Top