rziz & up09 captcha

After you click "Slow download" button the script solves the numeric captcha, waits for the countdown to finish, clicks the download button

As of 15.06.2015. See ბოლო ვერსია.

  1. // ==UserScript==
  2. // @name rziz & up09 captcha
  3. // @description After you click "Slow download" button the script solves the numeric captcha, waits for the countdown to finish, clicks the download button
  4. // @include http://www.rziz.net/*/*.html
  5. // @include http://file.up09.com/*
  6. // @version 1.0.1
  7. // @author wOxxOm
  8. // @namespace wOxxOm.scripts
  9. // @license MIT License
  10. // @grant none
  11. // @run-at document-start
  12. // ==/UserScript==
  13.  
  14. document.addEventListener('DOMContentLoaded', function() {
  15. var x = document.evaluate('//form//div/span[contains("0123456789",.)]', document,
  16. null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  17. var btn = document.getElementById('btn_download');
  18. if (x && btn) {
  19. var nodes = [];
  20. for (i = 0; i < 4; i++)
  21. nodes.push(x.snapshotItem(i));
  22. var nodes = nodes.sort(function(a,b){ return parseInt(a.style.paddingLeft) - parseInt(b.style.paddingLeft) });
  23. document.forms.F1.code.value = nodes.map(function(n){ return n.textContent }).join('');
  24.  
  25. new MutationObserver(function(mutations) {
  26. if (!btn.disabled)
  27. document.forms.F1.submit();
  28. }).observe(btn, {attributes:true, attributesFilter:['disabled']});
  29. }
  30. });