// ==UserScript== // @name BetterReading // @namespace http://tampermonkey.net/ // @version 0.1 // @description try to take over the world! // @author greatcl // @match http://www.laruence.com/* // @match http://wiki.jikexueyuan.com/* // @match https://time.geekbang.org/* // @match http://*.blog.163.com/* // @require https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js // @grant none // @downloadURL https://update.greasyfork.icu/scripts/41060/BetterReading.user.js // @updateURL https://update.greasyfork.icu/scripts/41060/BetterReading.meta.js // ==/UserScript== (function() { 'use strict'; var commonStyle = ''; $('head').append(commonStyle); if (location.host === 'www.laruence.com') { laruence(); } if (location.host === 'wiki.jikexueyuan.com') { $('body').css({ 'background-color': '#c8e3f7' }); $('.detail-nav, .breadcrumb').css({ 'background-color': '#c8e3f7' }); } if (location.host === 'time.geekbang.org') { geekTime(); } if (location.host.match(/.*\.blog.163.com/)) { blog163(); } function blog163() { $('#blog-163-com-topbar').hide(); } function geekTime() { $('body').css({ 'background-color': 'rgb(235, 240, 243)', 'font-family': 'Consolas, "Pingfang SC", "Microsoft Yahei"' }); $('a').css({ 'text-decoration': 'none' }); $('.mobile-tips').hide(); var style = ''; $('head').append(style); var noDisplayImgList = [ 'https://static001.geekbang.org/resource/image/40/18/40341574317cc135385c6946a17d2818.jpg' ]; if (location.pathname.match(/^\/column\/article\/\d+/)) { setTimeout(function(){ $('title').html($('.article-title').html()); $('img').each(function(){ var src = this.src; for (var i = 0, len = noDisplayImgList.length; i < len; ++i) { if (src === noDisplayImgList[i]) { console.log(src); $(this).hide(); } } }); $('p a').each(function(){ if (this.text == '戳此获取你的专属海报') { $(this).hide(); } }); }, 1000); } } function laruence(){ var sidebar = $('.sidebar'), content = $('.content'); content.css('width', content.width() + sidebar.width()); sidebar.hide(); var style = ''; $('head').append(style); $('body').append('