var licenses
$(function () {
var textBox = document.querySelector('#wpTextbox1');
var fileinfo = textBox.value.replace(new RegExp("==[ ]*라이선스[ ]*=="), '/*/');
var license = fileinfo.split('/*/\n')[1];
licenses = license.match(/\{\{[^}]*\}\}/g);
licenses.__proto__.remove = function(key) {
for (var i=0; i < this.length; i++) {
if (this[i] == '{{' + key + '}}') {
this.splice(i, 1); this.repaint(); break;
}
}
}
licenses.__proto__.add = function(key) {
this.push('{{' + key + '}}'); this.repaint()
}
licenses.__proto__.makeLicenseSection = function() {
if (this.length < 1)
return '== 라이선스 ==\n'
else
return '== 라이선스 ==\n' + this.join('\n') + '\n';
}
licenses.__proto__.repaint = function () {
var textBox = document.querySelector('#wpTextbox1');
var fileinfo = textBox.value.replace(new RegExp("==[ ]*라이선스[ ]*=="), '/*/');
var value =
fileinfo.split('/*/\n')[0] + this.makeLicenseSection() + fileinfo.split('/*/\n')[1].replace(/\{\{[^}]*\}\}\n/g, '');
document.querySelector('#wpTextbox1').value = value;
}
})
var h2 = document.querySelector('#라이선스').parentElement;
var iter
for (iter = h2.nextElementSibling; iter.nextElementSibling != null; iter = iter.nextElementSibling);
// go to end
//드롭 다운 위키 편집기에 추가하거나 파일 업로드 시 나오는 스크립트 등등
list = ""
document.querySelectorAll('#routeRunInfoTbody li td[class] a').forEach(e => {
list += ":" + e.innerText + "\n";
})
console.log(list);