Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name All Anonymous Are ANBU
- // @namespace http://tampermonkey.net/
- // @version 1.1
- // @description Turns Anonymous <animal> into ANBU <animal>
- // @author MeatcarpetPrincess
- // @match https://docs.google.com/*
- // @grant none
- // ==/UserScript==
- var observer = new MutationObserver(function() {
- var special = document.querySelectorAll( "div.docs-presence-plus-collab-widget-container" );
- special.forEach(function (currentValue, currentIndex, listObj){
- var regex = /Anonymous/;
- var animalName = currentValue.getAttribute("data-tooltip");
- if (animalName != null){
- currentValue.setAttribute("data-tooltip", animalName.replace(regex, "ANBU"))
- //console.log(currentValue.getAttribute("data-tooltip"));
- }
- });
- });
- var content = document.getElementById('docs-presence-container');
- if (content){
- observer.observe(content, { childList: true, subtree: true });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement