Skip to content

Instantly share code, notes, and snippets.

@SLAPaper
Created June 19, 2018 10:08
Show Gist options
  • Save SLAPaper/eafcafa36f2f3b49381c36845bfbe326 to your computer and use it in GitHub Desktop.
Save SLAPaper/eafcafa36f2f3b49381c36845bfbe326 to your computer and use it in GitHub Desktop.
Juejin Max-Width Setter.js
// ==UserScript==
// @name Juejin max-width setter
// @namespace http://tampermonkey.net/
// @version 0.1
// @description make the sidebar no longer overlaps the article
// @author You
// @match https://juejin.im/post/*
// @grant none
// @license MIT
// ==/UserScript==
(function() {
'use strict';
function width_setter() {
let main = document.getElementsByTagName("main")[0];
main.style["max-width"] = "1024px";
}
window.addEventListener('load', width_setter);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment