洛谷自动签到

打开洛谷首页后自动签到。

  1. // ==UserScript==
  2. // @name 洛谷自动签到
  3. // @namespace peasoft.github.io
  4. // @match https://www.luogu.com.cn/
  5. // @grant none
  6. // @require https://unpkg.com/sweetalert2@10.16.6/dist/sweetalert2.min.js
  7. // @version 1.0
  8. // @author 陆鎏澄
  9. // @description 打开洛谷首页后自动签到。
  10. // @icon https://cdn.luogu.com.cn/fe/logo.png
  11. // @license CC BY-NC-SA
  12. // ==/UserScript==
  13.  
  14. function punch(){
  15. let btns = document.getElementsByName("punch");
  16. if(btns){
  17. btns[0].click();
  18. Swal.fire({
  19. toast: true,
  20. position: 'top',
  21. showCancelButton: false,
  22. showConfirmButton: false,
  23. title: '已自动签到!',
  24. icon: 'success',
  25. timer: 2000,
  26. });
  27. }
  28. }
  29.  
  30. setTimeout(punch, 1000);

QingJ © 2025

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