Skip to content

Latest commit

 

History

History
72 lines (59 loc) · 1.86 KB

001_medium_helper.md

File metadata and controls

72 lines (59 loc) · 1.86 KB

logo

medium-helper

a tampermonkey script to improve Medium.com reading experience

Features

  • expand the reading area (728 -> 960)
  • add a table of contents (hide/show according to scroll bar height)
  • customize your own settings

Preview

preview.gif

Installation

  1. via greasyfork.org

    1. install Tampermonkey Chrome Extension
    2. https://greasyfork.org/zh-CN/scripts/388676-medium-helper
  2. via source code

    1. install npm (optional)
    2. install typescript
    3. install Tampermonkey Chrome Extension
    4. 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();