Skip to content

Commit de00653

Browse files
authored
Update badword.ts
1 parent b8effe6 commit de00653

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

badword.ts

+6-11
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
*/
2323

2424

25-
2625
function RegexMatch(word: string, regex: RegExp): boolean {
2726
const words = word.trim();
2827
const barisdata: string[] = [];
@@ -171,16 +170,6 @@ class FilterBadWord {
171170

172171
if (check.length > 0) {
173172
const word = this._text.toLowerCase();
174-
function before_str(number , key){
175-
176-
return word.substring(number, word.indexOf(key));//nomer dan keyword
177-
178-
};
179-
180-
function after_str(w, spec){
181-
let data =word.substring( word.indexOf(w), spec.length+word.length );
182-
return data.replace(w, "").trim(); //, word.indexOf(spec));
183-
};
184173

185174
for (const index of check) {
186175
const word_s = this.getBoundPosition(this._text.toLowerCase(), index);
@@ -250,6 +239,12 @@ class FilterBadWord {
250239
class filters_badword extends FilterBadWord {
251240
protected _cl: boolean;
252241
protected _st: boolean;
242+
243+
constructor() {
244+
super(); // Memanggil konstruktor kelas induk
245+
this._cl = true; // Inisialisasi properti cl
246+
this._st = true; // Inisialisasi properti st
247+
}
253248

254249
public text_o(text: string): void {
255250
this._text = text.toString();

0 commit comments

Comments
 (0)