User:Theleekycauldron/Scripts/PSHAW/dependencies/Prep.js: Difference between revisions
Content deleted Content added
adding lost credits |
preserve existing botdo patch |
||
Line 26:
prep.loadHooks();
prep.loadFiles();
prep.loadDYKbotdo();
}
return prep
Line 78 ⟶ 79:
let filetext = this.content.match(/\{\{main page image\/DYK.*?}}/g);
this.file = new File(filetext[0])
}
loadDYKbotdo(){
let botdotext = this.content.match(/\{\{DYKbotdo\|(.*)\}\}/)
if (botdotext != null) {
this.botdo = botdotext[1]
} else {
if (this.title.includes("/Queue/")){
this.botdo = "~~~"
} else {
this.botdo = null
}
}
}
Line 112 ⟶ 126:
assemble(){
let res = []
res.push(`${this.title.includes("Queue")?"{{DYKbotdo|
<noinclude>{{Did you know/Clear/header}}
==Hooks==
|