Last active
May 27, 2017 07:34
-
-
Save Junzki/db7e8016d0a3fafc1c5f8cd6ca23208c to your computer and use it in GitHub Desktop.
DingTalk Watermark-FREE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name DingTalk Watermark-FREE | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description DingTalk Watermark-FREE | |
// @author Andrew Junzki | |
// @match https://im.dingtalk.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var observer = new MutationObserver(function(mutations) { | |
mutations.forEach(function(mutation) { | |
if (!mutation.addedNodes) return; | |
for (var i = 0; i < mutation.addedNodes.length; i++) { | |
// do things to your newly added nodes here | |
var node = mutation.addedNodes[i]; | |
if (node.className === 'content-pannel-body chat-box-new ng-isolate-scope') | |
{ | |
var chat_bg = node.getElementsByClassName('main-chat chat-items ng-isolate-scope')[0]; | |
if (chat_bg !== undefined) | |
{ | |
chat_bg.style.background = null; | |
} | |
} | |
} | |
}); | |
}); | |
observer.observe(document.body, { | |
childList: true | |
, subtree: true | |
, attributes: false | |
, characterData: false | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
牛