Damai Enable Ticket

Enable disabled tickets in Damai.cn

  1. // ==UserScript==
  2. // @name Damai Enable Ticket
  3. // @namespace https://greasyfork.org/zh-CN/scripts/10790-damai-enable-ticket
  4. // @version 0.1
  5. // @description Enable disabled tickets in Damai.cn
  6. // @icon http://dui.damai.cn/dm_2015/goods/images/m-logo.png
  7. // @license GPL version 3
  8. // @encoding utf-8
  9. // @date 07/05/2015
  10. // @modified 07/05/2015
  11. // @author Myfreedom614 <openszone@gmail.com>
  12. // @supportURL http://openszone.com/
  13. // @match http://item.damai.cn/*
  14. // @grant none
  15. // @copyright 2015,Myfreedom614
  16. // ==/UserScript==
  17.  
  18. var siteurl = document.URL;
  19.  
  20. function doCrack()
  21. {
  22. var lis = document.getElementsByClassName('lst')[1];
  23. var items = lis.getElementsByClassName('itm');
  24. //alert(items.length);
  25. for(i in items)
  26. {
  27. items[i].className = 'itm ';
  28. //var price = items[i].getElementsByClassName('price')[0].innerHTML;
  29. //alert(items[i].className);
  30. //alert(price);
  31. }
  32. }
  33.  
  34. var div = document.getElementsByClassName('m-crm')[0];
  35. div.innerHTML += "<span class='arrow'>&gt;</span><a id='btnEnableItem'><strong style='cursor: pointer; color: red !important; text-decoration: none !important;text-shadow: 0 0 15px #FF0000 !important;'>显示隐藏票<strong><a>";
  36.  
  37. div = document.getElementById('btnEnableItem');
  38. div.onclick = doCrack;