zoukankan      html  css  js  c++  java
  • 将自己博客中的随笔详情,复制一份随笔详情,放在标题下面

    只影响自己的博客园随笔详情的处理方法

    我是将这段代码放在 设置 -> 页脚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 .postTitle").eq(0).append("<div class='clear'></div>").after($("#post_detail .post .postDesc").clone());
      }
    },1000);
    

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


    使用 油猴脚本,影响的是看其它博主的随笔详情时,底部 随笔信息.postDesc 会显示在 随笔标题后面

    效果如图:

    点击油猴图标(状态应是 "已启用"), 添加新脚本,将以下内容复制在脚本窗口中,然后 文件 -> 保存, 然后刷新一下博客园中博主的随笔详情页面,底部的随笔信息理应会显示的随笔标题后面

    // ==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($){
          setTimeout(function(){
    	      // post detail copy the post info after the post title
    	      if($("#post_detail").length > 0 && $(".postDesc").length <= 1){
    	        $("#post_detail .post .postTitle").eq(0).append("<div class='clear'></div>").after($("#post_detail .post .postDesc").clone());
    	      }
          },500);
        });
    })();
    

    发布了油猴脚本博客园随笔详情页,随笔标题后显示底部信息

  • 相关阅读:
    wireshark1
    攻防世界Crypto高手进阶区部分Writeup
    flag_in_your_hand1
    扩展GridView之添加单选列
    C#关于日期月天数和一年有多少周及某年某周时间段的计算
    C# 开发和使用中的32个技巧
    TSQL编程的全局变量
    计算当前月底天数
    存储过程编写经验和优化措施
    ASP.NET 程序中常用的三十三种代码
  • 原文地址:https://www.cnblogs.com/fsong/p/10269628.html
Copyright © 2011-2022 走看看