yunfile_auto_click

enter something useful

  1. // ==UserScript==
  2. // @name yunfile_auto_click
  3. // @namespace yunfile.com
  4. // @version 0.1
  5. // @description enter something useful
  6. // @include *.yunfile.com/*
  7. // @match *.yunfile.com/*
  8. // @copyright 2012+, You
  9. // ==/UserScript==
  10.  
  11. if( document.getElementById('downbtn') ){
  12. var a = document.querySelectorAll('#downbtn a')
  13. for(var x in a){
  14. if ( a.hasOwnProperty(x) ) {
  15. if( a[x].innerHTML == '這裡下載' ){
  16. simulateClick(a[x])
  17. break;
  18. }
  19. }
  20. }
  21. }
  22.  
  23. function simulateClick(e){
  24. e.nodeType || (e=e.length==1?e[0]:null);
  25. if( e )
  26. {
  27. var Event;
  28. Event = document.createEvent("MouseEvents");
  29. Event.initEvent("mousedown", true, true);
  30. e.dispatchEvent(Event);
  31. Event = document.createEvent("MouseEvents");
  32. Event.initEvent("click", true, true);
  33. e.dispatchEvent(Event);
  34. Event = document.createEvent("MouseEvents");
  35. Event.initEvent("mouseup", true, true);
  36. e.dispatchEvent(Event);
  37. }
  38. }
  39. var vcode = document.getElementById('vcode');
  40. if( vcode ){
  41. var auto_wait = setInterval(function(){
  42. if( document.getElementById('showmsgdiv').css.display == 'block' ){
  43. setTimeout(function(){
  44. document.getElementById('showmsgdiv').css.display = 'none';
  45. },5000);
  46. }
  47. if( vcode.value.length == 4){
  48. simulateClick( document.getElementById('slow_button') )
  49. }
  50. },30000);
  51. }

QingJ © 2025

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