最近CSDN需要登录后才能查看更多内容,有点影响心情

解决方案

添加一段书签

javascript:(function(){document.getElementById('article_content').style.height='auto';document.getElementsByClassName('hide-article-box')[0].style.display='none';}())

在网页里面点一下就行了

进阶版

每次点一下还是有点麻烦,还是使用了一个chorme插件TamperMonkey来自动执行代码,下面的代码隐藏掉一些碍眼的广告和推荐(CSDN自带JQuery)

// ==UserScript==
// @name BOLCK CSDN
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author WozHuang
// @match https://blog.csdn.net/*
// @grant none
// @run-at document-end
// ==/UserScript== function rm(elementArray){
for(let element of elementArray){
element && element.parentNode.removeChild(element);
//element.style.display='none';
}
} (function() {
'use strict';
var old_onload = window.onload;
var temp
window.onload=function(){
old_onload && old_onload();
(function(){
(temp = document.getElementById('article_content')) && (temp.style.height='auto');
(temp = document.getElementsByClassName('hide-article-box')[0]) && (temp.style.display='none');
}())
rm([
document.getElementsByClassName('adblock')[0],
document.getElementById('csdn-toolbar'),
document.getElementById('asideProfile').parentNode,
document.getElementsByClassName('pulllog-box')[0],
document.getElementsByClassName('recommend-right')[0],
document.getElementsByClassName('tool-box')[0],
document.getElementsByClassName('fourth_column')[0],
document.getElementsByClassName('comment-box')[0],
document.getElementById('dmp_ad_58'),
]);
var main = document.getElementsByTagName('main')[0];
main && (main.style.float='none');
main && (main.style.margin='0px auto');
var $ = window.$;
if(!$){alert('There are no jQuery');}
$(function(){
var rec_box = $(".recommend-box");
rec_box.css("opacity","0.1");
rec_box.css("overflow","hidden");
rec_box.css("height","100px");
});
$(".recommend-box").hover(function(){
$(this).css("opacity","1");
$(this).css("height","auto");
},function(){
$(this).css("opacity","0.1");
});
};
})();

用TamperMonkey去掉cdsn中的广告的更多相关文章

  1. Dedecms去掉URL中a目录的方法

    本文实例讲述了Dedecms去掉URL中a目录的方法.分享给大家,供大家参考.具体分析如下: 使用dedecms的朋友可能会发现自己的URL目录生成是会自动带有一个/A/目录了,那么要如何去掉URL中 ...

  2. C#中去掉表中重复的数据

    /// <summary> /// 去掉表中重复的数据  int /// </summary> /// <param name="SourceTable&quo ...

  3. zencart分类页产品页去掉url中的id号

    最近公司新上的网站被seo指出要修改url,去掉url中产品id.由于我们用的是zencart框架,装了 Ultimate SEO URLs 插件,所以在网上应该有这方面的资料,本文主要参考资料: 原 ...

  4. C++去掉字符串中首尾空格和所有空格

    c++去掉首尾空格是参考一篇文章的,但是忘记文章出处了,就略过吧. 去掉首尾空格的代码如下: void trim(string &s) { if( !s.empty() ) { s.erase ...

  5. C# 使用正则表达式去掉字符串中的数字,或者去掉字符串中的非数字

            /// 去掉字符串中的数字           public static string RemoveNumber(string key)           {            ...

  6. 如何在Android应用中加入广告

    转载自:http://mobile.51cto.com/aprogram-387527.htm 目前我自己的一款小程序中正进行到加入广告阶段,BAIDU了一下,找到如下好文章,非常有必要共享一下,故转 ...

  7. 屏蔽QQ聊天对话框中的广告

    原文地址: 怎么在QQ聊天对话框中屏蔽广告_百度经验 http://jingyan.baidu.com/article/48a42057ca12c1a924250402.html     QQ已经成为 ...

  8. 去掉Eclipse中的Validating

    去掉Eclipse中的Validating 最近我的Eclipse一直经常效验javascript,我疯了校验了一个多小时还是在验.我只能在项目的.project文件中: 去掉.project文件中的 ...

  9. 19 Remove Nth Node From End of List(去掉链表中倒数第n个节点Easy)

    题目意思:去掉链表中倒数第n个节点 思路:1.两次遍历,没什么技术含量,第一次遍历计算长度,第二次遍历找到倒数第k个,代码不写了   2.一次遍历,两个指针,用指针间的距离去计算. ps:特别注意删掉 ...

随机推荐

  1. C++ should define all local variable outside the loop?

    see the following two examples, the conclusion is that we should define variable in the loop if it c ...

  2. 关于表格元素的使用,table、<width>、<heigh>、<border>、<tr>、<th>、<td>、<align>、<colspan>、<rowspan>

    <html>    <head>        <meta charset="UTF-8">        <title>个人简历& ...

  3. 怎样验证layer.prompt输入的值为数值型???

    JS中使用isNaN()判断layer.prompt输入的值为数值型,代码如下: layer.prompt({ title: '设置比值', }, function(value, index, ele ...

  4. Unity5.X 创建基本的3D游戏场景

    点New(新建懒得写了,反正不是智障应该都会) 创建好的项目会自带一个场景,场景会自带Main Camera (主摄像机),Directional Light (方向光)   系统自带几个可以创建的3 ...

  5. Parse error: syntax error, unexpected '__data' (T_STRING), expecting ',' or ')'

    使用laravel时,建立view文件引入dafault文件时报错: Parse error: syntax error, unexpected '__data' (T_STRING), expect ...

  6. python 网络编程 粘包问题

    1.粘包现象 TCP粘包是指发送方发送的若干包数据到接收方接收时粘成一包,从接收缓冲区看,后一包数据的头紧接着前一包数据的尾.   粘包出现原因 使用了优化方法(Nagle算法),将多次间隔较小.数据 ...

  7. java数组简单逻辑代码

    package cuteSnow; public class HelloWorld { // 遍历数组里面的每个数字 public static void print(int[] array){ St ...

  8. Android知识点总结

    说明 当中大部分文章都是转载自其它大神之手.在转载的过程中学到了非常多,这里主要解说的是android体系的相关知识点,本文会持续更新. 1 Android service相关知识点 Android ...

  9. 开心的小明(南阳oj49)(01背包)

    开心的小明 时间限制:1000 ms  |  内存限制:65535 KB 难度:4 描写叙述 小明今天非常开心.家里购置的新房就要领钥匙了,新房里有一间他自己专用的非常宽敞的房间.更让他高兴的是,妈妈 ...

  10. caffe环境配置2

    参考链接: http://blog.csdn.net/enjoyyl/article/details/47397505 http://blog.csdn.net/baobei0112/article/ ...