Buying Item Script

Item market item buyer

  1. // ==UserScript==
  2. // @name Buying Item Script
  3. // @namespace Buying Item Script
  4. // @version 1.0
  5. // @description Item market item buyer
  6. // @author Alec
  7. // @grant none
  8. // @include http://www.torn.com/imarket.php#/p=shop&type=*
  9. // @include https://www.torn.com/imarket.php#/p=shop&type=*
  10. // @include http://*.torn.com/imarket.php#/p=shop&type=*
  11. // @include https://*.torn.com/imarket.php#/p=shop&type=*
  12. // @match http://www.torn.com/imarket.php#/p=shop&type=*
  13. // @match https://www.torn.com/imarket.php#/p=shop&type=*
  14. // @match http://*.torn.com/imarket.php#/p=shop&type=*
  15. // @match https://*.torn.com/imarket.php#/p=shop&type=*
  16.  
  17. // ==/UserScript==
  18.  
  19.  
  20. $(document).ready(function() {
  21. var hrefs = new Array();
  22. var elements = $('.headline > a');
  23. elements.each(function() {
  24. hrefs.push($(this).attr('href'));
  25. });
  26. $('body').append('<input type="button" value="Open Links" id="CP">');
  27. $("#CP").css("position", "fixed").css("top", 0).css("left", 0);
  28. $('#CP').click(function(){
  29. $.each(hrefs, function(index, value) {
  30. setTimeout(function(){
  31. window.open(value, '_blank');
  32. },1000);
  33. });
  34. });
  35. });