Pasteing in ywot.


SUBMITTED BY: Guest

DATE: Sept. 10, 2013, 9:08 p.m.

FORMAT: Text only

SIZE: 1.0 kB

HITS: 1138

  1. //Original by POOPMAN_
  2. (function() {
  3. var text = prompt("TYPE WHAT YOU WANT TO PASTE.");
  4. for (baa=0; baa < 1; baa ++) {
  5. text += text * 99999999999999999999999999999;
  6. }
  7. var width = $(".active-cursor").width();
  8. var height = $(".active-cursor").height();
  9. var start = $(".active-cursor").offset();
  10. var current = {
  11. top: Math.round(start.top + height / 2),
  12. left: Math.round(start.left + width / 2)
  13. };
  14. var i = 0;
  15. function next() {
  16. var c = text.charAt(i);
  17. if (c === "\n") {
  18. current.left = start.left;
  19. current.top += height;
  20. } else {
  21. $(document.elementFromPoint(current.left, current.top)).click();
  22. w.typeChar(c);
  23. current.left += width;
  24. }
  25. i++;
  26. if (i < text.length) {
  27. setTimeout(next, 10);
  28. }
  29. }
  30. next()
  31. })();

comments powered by Disqus