js


//kaomoji
var table = document.querySelector('.post-table');
var newRow = document.createElement('tr');
var newTh = document.createElement('th');
newTh.textContent = '颜文字';
var newTd = document.createElement('td');
var select = document.createElement('select');
select.onchange = function(event) {
var form = event.target.closest('form');
var field = form.querySelector('[name=body]');
var text = field.value;
var selectedText = event.target.options[event.target.selectedIndex].text;
field.value = text + selectedText;
};
var options = ["", "|∀゚", "(´゚Д゚`)", "(;´Д`)", "(`・ω・)", "(=゚ω゚)=", "| ω・´)", "|-` )", "|д` )", "|ー` )", "|∀` )", "(つд⊂)", "(゚Д゚≡゚Д゚)", "(^o^)ノ", "(|||゚Д゚)", "( ゚∀゚)", "( ´∀`)", "(*´∀`)", "(*゚∇゚)", "(*゚ー゚)", "( ゚ 3゚)", "( ´ー`)", "( ・_ゝ・)", "( ´_ゝ`)", "(*´д`)", "(・ー・)", "(・∀・)", "(ゝ∀・)", "(〃∀〃)", "(*゚∀゚*)", "( ゚∀。)", "( `д´)", "(`ε´ )", "(`ヮ´ )", "σ`∀´)", " ゚∀゚)σ", "゚ ∀゚)ノ", "(╬゚д゚)", "(|||゚д゚)", "( ゚д゚)", "Σ( ゚д゚)", "( ;゚д゚)", "( ;´д`)", "( д ) ゚ ゚", "( ☉д⊙)", "((( ゚д゚)))", "( ` ・´)", "( ´д`)", "( -д-)", "(>д<)", "・゚( ノд`゚)", "( TдT)", "( ̄∇ ̄)", "( ̄3 ̄)", "( ̄ー ̄)", "( ̄ .  ̄)", "( ̄皿 ̄)", "( ̄艸 ̄)", "( ̄︿ ̄)", "( ̄︶ ̄)", "ヾ(´ω゚`)", "(*´ω`*)", "(・ω・)", "( ´・ω)", "(`・ω)", "(´・ω・`)", "(`・ω・´)", "( `_っ´)", "( `ー´)", "( ´_っ`)", "( ´ρ`)", "( ゚ω゚)", "(o゚ω゚o)", "( ^ω^)", "(。◕∀◕。)", "/( ◕‿‿◕ )\\", "ヾ(´ε`ヾ)", "(ノ゚∀゚)ノ", "(σ゚д゚)σ", "(σ゚∀゚)σ", "|д゚ )", "┃電柱┃", "゚(つд`゚)", "゚Å゚ )", "⊂彡☆))д`)", "⊂彡☆))д´)", "⊂彡☆))∀`)", "(´∀((☆ミつ"];
options.forEach(function(text) {
var option = document.createElement('option');
option.textContent = text;
select.appendChild(option);
});
newTd.appendChild(select);
newRow.appendChild(newTh);
newRow.appendChild(newTd);
table.appendChild(newRow);


//AD
(function() {
'use strict';
//delete announcement
var aa = document.getElementsByClassName('announcement')
for (let i = 0; i < aa.length; i++) {
aa[i].innerHTML = ''
aa[i].innerText = ''
}
//delete ad
var bb = document.querySelector('.ad-banner')
if(null !== bb){
bb.parentNode.removeChild(bb);
}
//delete disclaimer
var cc = document.getElementsByClassName('disclaimer-8kun')
for (let i = 0; i < cc.length; i++) {
cc[i].innerHTML = ''
cc[i].innerText = ''
}
//delete bottom_ads
var dd = document.querySelector('.bottom_ads')
if(null !== dd){
dd.parentNode.removeChild(dd);
}
//delete bottom
var ee = document.querySelector('.bottom')
if(null !== ee){
ee.parentNode.removeChild(ee);
}
//delete footer
var ff = document.querySelector('footer')
if(null !== ff){
ff.parentNode.removeChild(ff);
}
})();


//Keywords
(function() {
'use strict';
var id;
// 屏蔽词
var wordList = ["䨻","䨻","䨻"]
// 过滤所有主题内容含屏蔽词的串(包括其回复)
var threads = document.getElementsByClassName("thread");
for (let i = 0; i < threads.length; i++) {
var t = threads[i];
for (const j in wordList) {
if(t.children[1].innerText.indexOf(wordList[j]) != -1){
id = t.id;
document.getElementById(id).className = "hidden";
i-=1;
break;
}
}
}
//过滤所有内容含屏蔽词的回复
var replies = document.getElementsByClassName("post reply");
for (let i = 0; i < replies.length; i++) {
var r = replies[i];
for (const j in wordList) {
if(r.innerText.indexOf(wordList[j]) != -1){
id = r.id;
document.getElementById(id).className = "hidden";
i-=1;
break;
}
}
}
// Your code here...
})();