XuiteDownloader

專為 Xuite 網路硬碟下載頁面設計可以不需要按廣告就下載

  1. // ==UserScript==
  2. // @id demo_XuiteDownloader
  3. // @name XuiteDownloader
  4. // @namespace demoshop
  5. // @description 專為 Xuite 網路硬碟下載頁面設計可以不需要按廣告就下載
  6. // @include http://webhd.xuite.net/_oops/*
  7. // @include http://sync.hamicloud.net/_oops/*
  8. // @exclude http://webhd.xuite.net/*@*
  9. // @version 2.0-個人修改版
  10. //
  11. // ==/UserScript==
  12. (function(){
  13.  
  14. var $jq;
  15.  
  16. function init(){
  17. $jq = unsafeWindow.jQuery;
  18. if(typeof $jq == 'undefined' || $jq("#global").data() == null){
  19. unsafeWindow.setTimeout(init, 100);
  20. }
  21. else{
  22. openADframe();
  23. clickDownloadButton();
  24. setDelayTime();
  25. }
  26. }
  27.  
  28. function openADframe(){
  29. $jq('#footer').after("<iframe id='showAD' width='0' height='0'></iframe>");
  30. $jq('#showAD').attr('src', $jq('#share-download-ad a').attr('href'));
  31. }
  32.  
  33. function clickDownloadButton(){
  34. unsafeWindow.isClick = 1;
  35. $jq('#global').data('isClick', 1);
  36. unsafeWindow.setTimeout(function(){
  37. $jq('#share-download-func-submit').click();
  38. }, 800);
  39. }
  40.  
  41. function setDelayTime(){
  42. if($jq('#delayTime').length > 0){
  43. unsafeWindow.setTimeout(function(){
  44. $jq("#global").data("time", 10);
  45. }, 800);
  46. }
  47. }
  48.  
  49. init();
  50.  
  51. })();