User:Theleekycauldron/Scripts/PSHAW/dependencies/Nomination.js: Difference between revisions

Content deleted Content added
move it all in
Undid revision 1170957668 by Theleekycauldron (talk) rv, hang on
Line 21:
this.title = title; //MediaWiki stuff
get_pages(mw.config.get(this.title),"user|content",null,"older").then((res) => {
this.page = res
this.content = this.page[0].revisions[0].slots.main.content;
this.isHatted = this.content.includes("'''No further edits should be made to this page'''.")
this.isApproved = this.content.includes("[[File:Symbol voting keep.svg|16px]]") || this.content.includes("[[File:Symbol confirmed.svg|16px]]") || this.content.match(/\|.*?status.*?=.*?y/g) != undefined
this.hooks = []
this.files = []
loadHooks();
});
this.hooks = []
this.files = []
}
 
Line 52 ⟶ 53:
loadHooks(){
console.log(this.content)
credits = this.content.match(/\* \{\{DYK(make|nom).*?\}\}/g);
if (credits != null){