testBycxl

用于在yu3.shop代理打开的Illution 网站下载对应的png资源

  1. // ==UserScript==
  2. // @name testBycxl
  3. // @namespace hello,cxl
  4. // @version 0.01
  5. // @description 用于在yu3.shop代理打开的Illution 网站下载对应的png资源
  6. // @author chenxinliang
  7. // @include *
  8. // @grant none
  9. // @license AGPL-3.0-or-later
  10. // ==/UserScript==
  11. (function() {
  12. 'use strict';
  13. // Your code here...
  14. console.log("你好呀,欢迎参考我的第一个脚本!!")
  15. // alert("你好呀,欢迎参考我的第一个脚本!")
  16. // 获取包含所有元素的父容器
  17. const container = document.getElementsByTagName("body")
  18.  
  19. // 添加点击事件监听器(事件委托)
  20. container.addEventListener("click", function(event) {
  21. // 使用事件对象的 target 属性获取点击的元素
  22. const clickedElement = event.target;
  23.  
  24. // 打印点击的元素
  25. console.log("Clicked Element:", clickedElement);
  26. });
  27. })();