Jobastion's Time and Post Count Revival Tool

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

当前为 2014-08-24 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name            Jobastion's Time and Post Count Revival Tool
// @description     Adds full time/date and post count to every post in the Penny-Arcade Forums.
// @include         http://forums.penny-arcade.com/discussion/*
// @include			http://forums.penny-arcade.com/vanilla/discussion/*
// @version			3.0
// @namespace https://greasyfork.org/users/4687
// ==/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()
//.user.js