@2018/11/29
运用背景
自从开始运用高分屏的 thinkpad,我总觉得那些常常惠顾的网站字体太小,看起来既费力又轻易睡觉,因而就想着把它们调大一点。
为了从体系层面处理这一题目,我加大了体系的团体字号:
- 谢绝运用百分比缩放图标尺寸
那样不管运用什么字体、怎样调解,都邑隐约 - 运用仅变动字体大小
将下拉列表项的字体悉数设置为 10 号(默许9号)。
做了以上设置,翻开资源管理器以及装置的软件,字体都要大一些,看起来能够顺应了。然则浏览器翻开的网站,他们都有各自的字号,照样有些偏小。尤其是 github。所以我还得折腾一下浏览器。
平常情况下,调解浏览器默许字体大小,我们能够在设置内里修正字体,或许按住Ctrl+鼠标滚轮
暂时放大浏览器页面就能够了。然则也有一些题目:
- 设置修正的是全局字体,字体过大,一些网站的导航栏会显现非常,比方字体显现一半或许不能一般显现
- 放大页面,页面规划会发生变化,有时候以至歪曲变形
所以厥后我就想到了用 F12 直接来修正字号,然则每次都这么改必定很蛋疼,有无剧本啥的?有!
Tampermonkey 就是特地做这个事变的。
Tampermonkey 是一款免费的浏览器扩大和最为盛行的用户剧本管理器,它适用于 Chrome, Microsoft Edge, Safari, Opera Next, 和 Firefox。
Greasy Fork 是一个免费的剧本商城,它的剧本能够直接在 Tampermonkey 中装置和运用。
下面就是我经常使用的一些剧本,包含他人提交到 Greasy Fork 的在线剧本,以及我本身摹仿的的一些 js 代码(只能在当地增加运用)。
这些剧本的大部分目标都是为了修正页面宽度、字体大小,以及屏障一些广告。
我不懂 JavaScript,个中的自有剧本是运用过程中用 F12 一步一步积聚出来的,一定写得不好,迎接斧正。
有内行能帮我兼并这些疏散的剧本到一个剧本了么?求指导。
现成剧本
Bypass Google Sorry (reCAPTCHA)
Direct download from Google Play
自有剧本
修正有道云笔记分享页面宽度
为了轻易在别的处所装置,这个剧本我提交到了 Greasy Fork。
地点:修正有道云笔记分享页面宽度
// ==UserScript==
// @name 修正有道云笔记分享页面宽度
// @namespace http://tampermonkey.net/
// @version 0.2
// @description 修正有道云笔记分享页面宽度,以便越发合适浏览。
// @author High Jiang
// @match *://note.youdao.com/share/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.file{ min-width: 256px; max-width: 1080px; width: 100%; padding-left: 0px; padding-right: 0px;} .file-name-container{ padding-left: 5%;}';
document.head.appendChild(style);
})();
Better github read
为了轻易在别的处所装置,这个剧本我提交到了 Greasy Fork。
地点:Better github read
// ==UserScript==
// @name Better github read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解Github页面宽度及字体大小,以便越发合适浏览。
// @author High Jiang
// @match https://github.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.markdown-body{ font-size: 1.4em } .repository-content{ min-width: 256px; max-width: 1080px; width: 100% } .discussion-timeline{ min-width: 256px; max-width: 1080px; width: 100%; } .container{max-width: 1080px; width: 100%;}';
document.head.appendChild(style);
//.timeline-new-comment{max-width: 1080px; width: 100%;}
var items = document.querySelectorAll('#wiki-content, #discussion_bucket');
for (var i = 0; i < items.length; i++) {
items[i].style.width = "1320px";
}
})();
Better CSDN read
// ==UserScript==
// @name Better CSDN read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://blog.csdn.net/*
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.recommend-right{ visibility: hidden; } .fourth_column{ visibility: hidden; } .recommend-box{ visibility: hidden; }'
document.head.appendChild(style);
document.getElementById("asideFooter").remove();
document.getElementById("dmp_ad_58").remove();
})();
Better gopl read
// ==UserScript==
// @name Better gopl read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解 Gopl 页面宽度及字体大小,以便越发合适浏览。
// @author High Jiang
// @match *://b.ykfq.me/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.page-inner{ max-width: 1080px; width: 100%; font-size: 16px}';
document.head.appendChild(style);
})();
Better zhihu Read
// ==UserScript==
// @name Better zhihu Read
// @namespace https://www.zhihu.com
// @version 0.1
// @description 去掉知乎题目页侧边栏并举行界面居中优化
// @author High Jiang
// @match *://www.zhihu.com/question/*
// @run-at document-start
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML =".Question-mainColumn { max-width: 1080px; width: 100%; padding-bottom: 20px;} .Question-sideColumn{width: 0}"
document.head.appendChild(style);
})();
Better medium read
// ==UserScript==
// @name Better medium read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解 Medium 页面宽度及字体大小,以便越发合适浏览。
// @author High Jiang
// @match https://medium.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.postArticle--full .sectionLayout--insetColumn{ max-width: 1080px; width: 100%; font-size: 16px}';
document.head.appendChild(style);
document.getElementsByClassName("u-marginAuto u-maxWidth1000 js-postLeftSidebar")[0].remove()
})();
Better jobbole read
// ==UserScript==
// @name Better jobbole read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解 伯乐在线 页面宽度及字体大小,以便越发合适浏览。
// @author High Jiang
// @match *://*.jobbole.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.container .grid-8 .container{ max-width: 940px; width: 100% } .grid-8{ max-width: 940px; width: 100% } .grid-4{ max-width: 450px; width: 100% }'
document.head.appendChild(style);
//document.getElementsByClassName("u-marginAuto u-maxWidth1000 js-postLeftSidebar")[0].remove()
})();
Better Ceph read
// ==UserScript==
// @name Better Ceph read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match *://docs.ceph.com/*
// @match *://docs.ceph.org.cn/*
// @run-at document-end
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.document{ font-size: 17px; }'
document.head.appendChild(style);
document.getElementById("asideFooter").remove();
})();
Better prometheus read
// ==UserScript==
// @name Better prometheus read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解Github页面宽度及字体大小,以便越发合适浏览。
// @author High Jiang
// @match https://prometheus.io/docs/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.container{max-width: 1320px; width: 100%; } .col-md-9{width: 80%;} .col-md-3{ width: 20%; } .doc-content{ font-size: 18px;} .toc-right{ width: 30%; } '
document.head.appendChild(style);
})();
Better OpenStack read
// ==UserScript==
// @name Better OpenStack read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解 OpenStack 文档中间页面宽度及字体大小,以越发合适浏览。
// @author High Jiang
// @match https://docs.openstack.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
document.getElementsByClassName("container docs-book-wrapper")[0].style= "width: 1366px; font-size: 18px"
})();
Better jianshu read
// ==UserScript==
// @name Better jianshu read
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 调解 伯乐在线 页面宽度及字体大小,以便越发合适浏览。
// @author High Jiang
// @match https://www.jianshu.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var style = document.createElement('style');
style.innerHTML = '.note .post{ max-width: 960px; width: 100% }'
document.head.appendChild(style);
document.getElementById("web-note-ad-fixed").remove()
})();
Better StackOverflow read
没搞定,迎接补充。