Skip to content

Instantly share code, notes, and snippets.

@abearxiong
Created May 7, 2022 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abearxiong/c491422f760464cc8f9ac4e2b486f751 to your computer and use it in GitHub Desktop.
Save abearxiong/c491422f760464cc8f9ac4e2b486f751 to your computer and use it in GitHub Desktop.
资料打印
// ==UserScript==
// @name print juejin
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author abearxiong
// @match *://juejin.cn/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=juejin.cn
// @grant none
// ==/UserScript==
(function() {
'use strict';
const hideNameList = ['.main-header-box', '.sidebar', '.article-suspended-panel', '.action-bar', '.container .comment-list-box', '.sticky-block-box', '.recommended-area', '.suspension-panel', '.tag-list-box', '.column-container', '.extension-banner']
function hide(name) {
const el = document.querySelector(name)
el && (el.style.display = 'none')
}
const main = () => {
// get link
hideNameList.map(item => {
hide(item);
return item;
})
}
setTimeout(main, 2000)
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment