User:JJPMaster/Scripts/AfC time logger.js: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 14:
function postToLog(title, time, action) {
var params = {
action: "parsequery",
pagetitles: "User:" + mw.config.get("wgUserName") + "/AfC time log",
format: "json"
},
api = new mw.Api();
api.get(params).done((data) => {
if(typeof data.errorquery.code.equals(pages["missingtitle-1")].missing !== undefined) {
params = {
action: "edit",
title: "User:" + mw.config.get("wgUserName") + "/AfCLAfC time log",
text: "This page measures the amount of time it takes for me to review articles at AfC. This information is obtained using a [[User:JJPMaster/afc.js|user script]].\r\n* [[" + title + "]] - " + action + " after " + time + " seconds",
summary: "Added " + title + " to AfC time log using [[User:JJPMaster/afc.js]]",