Jobastion's Time and Post Count Revival Tool

Adds full time/date and post count to every post in the Penny-Arcade Forums.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name            Jobastion's Time and Post Count Revival Tool
// @include         /^https?://forums.penny-arcade.com/discussion/.*$/
// @include			/^https?://forums.penny-arcade.com/vanilla/discussion/.*$/
// @grant			none
// @version			3.2
// @history			3.1	Added HTTPS support
// @history			3.2	Removed commented/unused code at end of file because somehow it broke the entire script in GM 4 :/  WHHHHHYYYYYY?  Best developers 2017.
// @namespace https://greasyfork.org/users/4687
// @description Adds full time/date and post count to every post in the Penny-Arcade Forums.
// ==/UserScript==

function do_platypus_script() {
	do_modify_html_it(window.document,document.evaluate("//span[@class='MItem DateCreated']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue,/time title="([^"]+)" datetime="([^"]+)">[^<]+<\//,'time title="$1" datetime="$2">$1 - Post 1</',null);
	var itemdate = document.evaluate("//span[@class='MItem DateCreated']", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null)
	for (var i = 0; i<itemdate.snapshotLength;i++) {
		var idsnap = itemdate.snapshotItem(i)
		{	
			do_modify_html_it(window.document,idsnap,/name="Item_(\d+)" rel="nofollow"><time title="([^"]+)" datetime="([^"]+)">[^<]+</,'name="Item_$1" rel="nofollow"><time title="$2" datetime="$3">$2 - Post deleteme$1<',null);
			
			do_modify_html_it(window.document,idsnap,/deleteme(\d+)/,function(){return RegExp.$1-(-1)},null);}

}}; // Ends do_platypus_script
//
//  Mon Dec 19 15:59:37 2005 -- Scott R. Turner
//  Short, uncommented file containing all* the code to implement Platypus
//  actions.  Can be "included" into the Platypus script.
//
//  *Jobastion has removed most of the code to implement Platypus actions, and left only the bare bones required for this script.  Full code can be found by googling Platypus & Firefox & Extension.  Snippy.
// 
function do_modify_html_it(doc, element, match_re, replace_string) {
    match_re = new RegExp(match_re);
    if (element.innerHTML) {
element.innerHTML = element.innerHTML.replace(match_re, replace_string);
    };
};
do_platypus_script()