只影响本身的博客园随笔详情的处理方法css
我是将这段代码放在 设置
-> 页脚Html代码
js代码中的,代码以下:html
// 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);
想这样处理,是由于以前有人提过 闪存 中提过 博客园啊, 能不能把每篇博客的日期和点赞放在标题下面?
别人的博客是控制不了的,可是只能改变本身的博客,但这只影响本身的博客jquery
使用 油猴脚本,影响的是看其它博主的随笔详情时,底部 随笔信息.postDesc
会显示在 随笔标题后面web
效果如图:chrome
点击油猴图标(状态应是 "已启用"), 添加新脚本
,将如下内容复制在脚本窗口中,而后 文件
-> 保存
, 而后刷新一下博客园中博主的随笔详情页面,底部的随笔信息理应会显示的随笔标题后面app
// ==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); }); })();
发布了油猴脚本博客园随笔详情页,随笔标题后显示底部信息post