Jobastion's Time and Post Count Revival Tool

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

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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()