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

Content deleted Content added
mm
frontloading credits processing, which seems like a waste of time but what the heck
Line 53:
console.log(this.content)
let credits = this.content.match(/\* \{\{DYK(make|nom).*?\}\}/g);
if (credits !== null){
credits = credits.join(["\n* {{DYKmake|Example|Editor|subpage=}}");]
for (let c=0; c<credits.length; c++){
credits[c] = new Credit(credits[c]);
}
} else {
credits = "* {{DYKmake|Example|Editor|subpage=}}"
}
let hooktext = this.content.match(/('''ALT.+?)?(\.\.\..*?)(?:{{-\?}}|\?)/g);
Line 74 ⟶ 69:
u++;
}
this.hooks.push(hook = new Hook(hook[0],"..."+hook[1],credits)[])
for (let c=0; c<credits.length; c++){
hook.credits[c] = .push(new Credit(credits[c]));
}
this.hooks.push(hook);
}
}