a tampermonkey script to improve Medium.com reading experience
- expand the reading area (728 -> 960)
- add a table of contents (hide/show according to scroll bar height)
- customize your own settings
-
via greasyfork.org
-
via source code
- install npm (optional)
- install typescript
- install Tampermonkey Chrome Extension
- install the script
>> git clone https://github.com/taseikyo/backup-utils.git
>> cd backup-utils/TypeScript
>> tsc 001_medium_helper.ts
The target js file is 001_medium_helper.js
, then create new script in Tampermonkey dashboard.
e.g.
// ==UserScript==
// @name medium-helper
// @namespace http://tampermonkey.net/
// @version 0.1
// @description a simple Medium helper to improve reading experience.
// @author Lewis Tian (https://github.com/LewisTian)
// @match https://*.medium.com/*
// @grant MIT
// ==/UserScript==
"use strict";
/**
*
* Copyright (c) 2019 Lewis Tian. Licensed under the MIT license.
* @authors Lewis Tian ([email protected])
* @date 2019-07-30 10:39:19
* @desc a simple Medium helper to improve reading experience.
*
*/
var CONFIG = {
...
};
var main = function () {
...
};
var toc = function (node) {
...
};
var pretty = function () {
...
};
pretty();
main();