【油猴脚本】去除背景水印,把品葱变成2047


  • https://2047.one/t/16196

    // ==UserScript==
    // @name         Pincong No BG
    // @namespace    http://tampermonkey.net/
    // @version      0.1
    // @description  try to take over the world!
    // @author       You
    // @match        https://www.pincong.rocks/*
    // @match        https://pincong.rocks/*
    // @icon         https://www.google.com/s2/favicons?domain=pincong.rocks
    // @grant        none
    // ==/UserScript==
    
    (function() {
        'use strict';
        var div = document.createElement('style')
        div.innerHTML = `.aw-content-wrap.clearfix {background-image: none;}`
        document.body.appendChild(div)
        document.getElementsByClassName('aw-logo')[0].firstElementChild.setAttribute(
            'style',
            `background-image: url(https://2047.name/images/2049bbslogo_clipped_small_pressed.png);
            background-size: contain;
            background-repeat-x: no-repeat;`
        )
    })();
    

    品葱站长做了脚本防御,直接修改<div>style.backgroundImage属性会把页面搞没,所以只能用<style>去override原有的style


    此脚本会同时将品葱logo修改为2047