将自己博客中的随笔详情,复制一份随笔详情,放在标题下面

我是将这段代码放在 设置 -> 页脚Html代码 js代码中的,代码如下:

// post detail copy the post info after the post title
setTimeout(function(){
    if($("#post_detail").length > 0 && $(".postDesc").length == 1){
        $("#post_detail .post .clear").eq(0).after($("#post_detail .post .postDesc").clone());
    }
},1000);

想这样处理,是因为之前有人提过 闪存 中提过 博客园啊, 能不能把每篇博客的日期和点赞放在标题下面? 别人的博客是控制不了的,但是只能改变自己的博客,但这只影响自己的博客


或者使用 油猴脚本 (推荐),这样在看所有的博客园的所有作者随笔详情的时候,底部的随笔信息就会出现在标题后面了

// ==UserScript==
// @name         博客园随笔详情页,随笔标题后显示底部信息
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  博客园随笔详情,将文章内容底部信息复制显示到文章详情的标题下面,参考了 http://chromecj.com/web-development/2018-07/1468.html
// @author       wakasann
// @grant        none
// @include     https://www.cnblogs.com/*/p/*
// @match https://www.cnblogs.com/*/p/*
// @require https://cdn.bootcss.com/jquery/2.2.1/jquery.min.js
// ==/UserScript==


(function() {
    'use strict';
    jQuery(function($){
      // post detail copy the post info after the post title
      setTimeout(function(){
        if($("#post_detail").length > 0 && $(".postDesc").length == 1){
            $("#post_detail .post .clear").eq(0).after($("#post_detail .post .postDesc").clone());
        }
      },500);
    });
})();

猜你喜欢

转载自www.cnblogs.com/fsong/p/10269628.html