Greasy Fork

百度文心一言去水印

去文心一言水印

目前为 2023-03-18 提交的版本。查看 最新版本

// ==UserScript==
// @name         百度文心一言去水印
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  去文心一言水印
// @author       夜雨
// @match        https://yiyan.baidu.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=baidu.com
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
	'use strict';

	var clearWater = function(){
		if (document.querySelector("#eb-watermark")) {
			document.querySelector("#eb-watermark").setAttribute("style","display:none");
		}
	}

	try {
		MutationObserver.prototype.observe = function(target, options) {
			console.log("Hook MutationObserver observe")
			clearWater();

		}
	} catch (e) {}

	try {
		WebKitMutationObserver.prototype.observe = function(target, options) {
			console.log("Hook WebKitMutationObserver observe")
			clearWater();
		}
	} catch (e) {}

	try {
		MozMutationObserver.prototype.observe = function(target, options) {
			console.log("Hook MozMutationObserver observe")
			clearWater();
		}
	} catch (e) {}



	// Your code here...
})();