JavaScript博客园操作

  1. 编辑当前博客页面,编辑的时候最大化(不能一步到位,待实现)

javascript:(function(){
    var script=document.createElement('script');
    script.src='https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js';
    document.body.appendChild(script);
    var thisURL = document.location.href; 
    var test = /http://|https://i.cnblogs.com.*/g; 
    if (!test.test(thisURL)){
        var reg = /http://|https://(w|=|?|.|/|&|-)+/(d+).html/g;
        var newUrl = thisURL.replace(reg,"https://i.cnblogs.com/EditPosts.aspx?postid=$2"); 
        document.location.href = newUrl; 
    }else{
        $("li[title='全屏']").click();
    } 
})();

  1. 编辑当前博客
javascript:(function(){var thisURL = document.location.href;
var reg = /http://|https://(w|=|?|.|/|&|-)+/(d+).html/g;
var newUrl = thisURL.replace(reg,"https://i.cnblogs.com/EditPosts.aspx?postid=$2");
document.location.href = newUrl;})();

  1. 去掉自定义的目录

javascript:(function(){document.getElementById("sideToolbar").style.display ='none';})();

原文地址:https://www.cnblogs.com/amize/p/14537324.html