Skip to content

Instantly share code, notes, and snippets.

@Junzki
Last active May 27, 2017 07:34
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 Junzki/db7e8016d0a3fafc1c5f8cd6ca23208c to your computer and use it in GitHub Desktop.
Save Junzki/db7e8016d0a3fafc1c5f8cd6ca23208c to your computer and use it in GitHub Desktop.
DingTalk Watermark-FREE
// ==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
});
})();
@Mtax
Copy link

Mtax commented May 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment