// ==UserScript== // @name ResetEra: Display Posts Per Day // @version 1 // @grant none // @match *://*.resetera.com/members/* // @match *://*.neogaf.com/members/* // @namespace https://greasyfork.org/users/734 // @description Shows Post Per Day on ResetEra // @downloadURL none // ==/UserScript== (() => { 'use strict' class Posts { constructor() { let { joined, messages } = this.rawData console.log('Found date/messages:', joined, messages) this.messages = Posts.toInt(messages) joined = joined.split(' ') const month = Posts.MONTHS[joined[0]] const day = Posts.toInt(joined[1]) const year = Posts.toInt(joined[2]) this.joined = new Date(`${month} ${day} ${year}`) console.log('Detected date:', this.joined.toString()) } diff(initial, latest) { return Math.floor((latest - initial) / Posts.MILLS_PER_DAY) } template(title, body) { return `