Greasy Fork is available in English.

知乎 答主编辑时间提前

把知乎回答/知乎专栏的编辑/发布时间放到前面,方便查看。

// ==UserScript==
// @name			知乎 答主编辑时间提前
// @namespace		http://www.zhihu.com
// @version			0.11
// @description		把知乎回答/知乎专栏的编辑/发布时间放到前面,方便查看。
// @homepage		http://www.greasyfork.org/users/89556
// @iconURL			https://www.zhihu.com/favicon.ico
// @author       You
// @match        https://www.zhihu.com/question/*
// @match        https://zhuanlan.zhihu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
		var d = document;
	    var url1 = window.location.origin;
	    if(url1=="https://zhuanlan.zhihu.com")
		{
			var edTimeA = d.getElementsByClassName('ContentItem-time')[0].getElementsByTagName('a')[0];
			var textSpan = edTimeA.getElementsByTagName('span')[0].innerHTML;
			textSpan = "   "+ textSpan;
			var postDiv = d.getElementsByClassName('Voters')[0].firstElementChild;
			postDiv.insertBefore(edTimeA,postDiv.firstElementChild);
			console.log(textSpan);
		}
		else
		{
			var editTime,content,answerCount,tmpCount,pcont;
			answerCount = d.getElementsByClassName('List-item').length;
			tmpCount = 0;
			//避免第一页过长时间等待
			for(var i=0;i<d.getElementsByClassName('ContentItem-time').length;i++)
			{
				editTime = d.getElementsByClassName('ContentItem-time')[i];
				content = d.getElementsByClassName('RichContent-inner')[i];
				pcont = d.getElementsByClassName('RichContent')[i];
				pcont.insertBefore(editTime,content);
			}
			var detectNew = setInterval(function()
			{
				if(d.getElementsByClassName('List-item').length!=tmpCount)
				{
					for(var i=0;i<d.getElementsByClassName('ContentItem-time').length;i++)
					{
						editTime = d.getElementsByClassName('ContentItem-time')[i];
						content = d.getElementsByClassName('RichContent-inner')[i];
						pcont = d.getElementsByClassName('RichContent')[i];
						pcont.insertBefore(editTime,content);
					}
					tmpCount = d.getElementsByClassName('List-item').length;
				}
			},5000);
		}
})();