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

Content deleted Content added
gaaaaaaaaaaaa
okay well that's how this is happening apparently
Line 12:
copies or substantial portions of the Software.
*/
 
 
 
class Nomination {
constructor(title,page){
this.title = title.replaceAll("_"," "); //MediaWiki stuff
this.content = this.page[0].revisions[0].slots.main.content;
get_pages(this.title,"user|content",null,"older").then((res) => {
this.isHatted = this.content.includes("'''No further edits should be made to this page'''.")
this.page = res
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.content = this.page[0].revisions[0].slots.main.content;
this.alphanumericals="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
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.alphanumericals="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
this.loadHooks();
this.loadFiles();
});
}
async create(title){
page = await get_pages(this.title,"user|content",null,"older").then((res) => {;
nom = new Nomination(title,page)
thisnom.loadHooks();
thisnom.loadFiles();
return nom
}
 
hasBeenEditedByUser(){