publink-remove-dingtalk-boss-image

remove dingtalk boss image

目前为 2024-07-02 提交的版本,查看 最新版本

// ==UserScript==
// @name         publink-remove-dingtalk-boss-image
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  remove dingtalk boss image
// @author       huangbc
// @include      *://*
// @license      MIT
// @icon         https://www.google.com/s2/favicons?sz=64&domain=shb.ltd
// @grant        none
// ==/UserScript==

(function() {
    'use strict';


function remove() {
  // 目标 URL
  const targetUrl = "https://static.dingtalk.com/media/lADPDhmOzyk-JUfNAbLNAbI";

  // 获取所有 img 元素
  const images = document.querySelectorAll('img');

  console.log('images', images);

  // 遍历所有 img 元素
  images.forEach((img) => {
    // 检查 img 的 src 属性是否包含目标 URL
    if (img.src.includes(targetUrl)) {
      // 删除该 img 元素
      img.parentNode.remove();
    }
  });
  
}

const times = [0, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000];

times.forEach((time) => {
  setTimeout(remove, time);
})


})();