User:Novem Linguae/Scripts/IsReviewedTest.js

//

$(async function {	async function isReviewed(pageID) {		let api = new mw.Api;		let response = await api.get( { action: 'pagetriagelist', format: 'json', page_id: pageID, } );

// no result if ( response.pagetriagelist.result !== 'success' || response.pagetriagelist.pages.length === 0 ) { return true; // 1, 2, or 3 } else if ( parseInt(response.pagetriagelist.pages[0].patrol_status) > 0 ) { return true; // 0		} else { return false; }	}

// Joe_Ferguson_(sprinter) - should return false (0 unreviewed) console.log(await isReviewed(71330969));

// F-1_(nuclear_reactor) - should return true (no result) console.log(await isReviewed(30177094));

// Raymond_Peak - true (3 autopatrolled) console.log(await isReviewed(71330968));

// Ashok_Kumar_Yadav_(Siraha_politician) - true (1 reviewed) console.log(await isReviewed(71330828)); });

//