cancelBtn

取消离线包图片选中态!

  1. // ==UserScript==
  2. // @name cancelBtn
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 取消离线包图片选中态!
  6. // @author You
  7. // @match https://yoda.corp.kuaishou.com/*
  8. // @icon https://www.google.com/s2/favicons?domain=kuaishou.com
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. let cancelBtn = document.createElement('div');
  16. cancelBtn.innerHTML = "取消图片";
  17. cancelBtn.className = "yh_cancelBtn";
  18. cancelBtn.onclick = function(){
  19. // 模拟点击页面展开符
  20. const pages = document.querySelectorAll('.tree-checkbox-selection > ul > li > i');
  21. pages.forEach((item) => {
  22. item.click();
  23. });
  24. // 模拟点击success展开符
  25. const success = document.querySelectorAll('.tree-checkbox-selection > ul > li > ul > li > i');
  26. success.forEach((item) => {
  27. item.click();
  28. });
  29. // 模拟点击img展开符
  30. const imgsTree = document.querySelectorAll('.tree-checkbox-selection > ul > li > ul > li > ul > li:nth-child(4) > .tree-selected');
  31. imgsTree.forEach((item) => {
  32. item.children[0].click();
  33. });
  34. }
  35. document.body.appendChild(cancelBtn);
  36. let style = document.createElement('style');
  37. style.type = "text/css";
  38. let styleCon = document.createTextNode(".yh_cancelBtn{position: fixed; right: 0; top: calc(50% - 22px); width: 85px; height: 44px; font-size: 13px; background-color: #ff976a; border-radius: 2px; line-height: 44px; text-align: center; color: #fff;cursor: pointer;}")
  39. style.appendChild(styleCon);
  40. let head = document.getElementsByTagName('head')[0];
  41. head.appendChild(style);
  42. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址