Skip to content

Instantly share code, notes, and snippets.

@y4code
Created April 24, 2020 10:03
Show Gist options
  • Save y4code/d0e043fc33f35e5b9ef77c8cb42c761b to your computer and use it in GitHub Desktop.
Save y4code/d0e043fc33f35e5b9ef77c8cb42c761b to your computer and use it in GitHub Desktop.

Revisions

  1. y4code created this gist Apr 24, 2020.
    29 changes: 29 additions & 0 deletions v2ex_for_work_tamper_monkey.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    // ==UserScript==
    // @name V2EX for work
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author y4code
    // @match *://*.v2ex.com/*
    // @run-at document-end
    // @grant none
    // ==/UserScript==

    (function () {
    'use strict';
    // $('body')[0].style.background = 'black !important' ;
    document.querySelector('html').style.display='none';
    $.each($('*'), (_, element) => {
    console.log(element.style =
    'background: black;'
    + 'color: green;'
    + 'text-shadow: none;'
    + ''
    + ''
    );
    });
    $.each($('img'), (_, img) => {
    console.log(img.style = 'filter: grayscale(1)')
    });
    document.querySelector('html').style.display='';
    })();