当前位置 博文首页 > zcy_wxy的博客:Tampermonkey CSDN按时间先后,排序用户专栏博文
// ==UserScript==
// @name Clean Csdn
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author zcy
// @match https://*blog.csdn.net/*
// @grant none
// @require http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==
$(document).ready(function(){
var keyArray=[];
var _ul=$(".column_article_list");
var li_Children=_ul.children().remove();
var time2ele=new Map;
$.each(li_Children, function(idx, ele){
var time=$($($(ele).children("a:last-child")).children("div:last-child")).children("span:first-child").text().trim();
time2ele.set(time,ele);
keyArray.push(time);
});
keyArray.sort();
$.each(keyArray,function(index,value){
_ul.append(time2ele.get(value));
});
});
cs