jd_force_submit

try to open tab

  1. // ==UserScript==
  2. // @name jd_force_submit
  3. // @description try to open tab
  4. // @include http://trade.jd.com/shopping/order/getOrderInfo.action?rid=*
  5. // @author nemoDebug
  6. // @grant GM_getValue
  7. // @grant GM_setValue
  8. // @grant GM_deleteValue
  9. // @grant GM_xmlhttpRequest
  10. // @version 2015.7.21.23
  11. // @namespace https://greasyfork.org/scripts/153
  12. // ==/UserScript==
  13.  
  14.  
  15. if(document.getElementById("order-submit")==null)
  16. {
  17. console.log("-----------no submit-----------");
  18.  
  19. setTimeout('location.href="http://"+location.hostname+location.pathname+location.search',100)
  20. }
  21. else
  22. {
  23.  
  24. setTimeout('var result=document.getElementById("shopping-lists").innerText.indexOf("有货");if(result>0){console.log("----goods--have-submit--");javascript:submit_Order();}else{ console.log("--reloading--");location.href="http://"+location.hostname+location.pathname+location.search;}',3000);
  25. setTimeout('location.href="http://"+location.hostname+location.pathname+location.search',7000);
  26.  
  27. }
  28.  
  29.  
  30.  
  31.  
  32.