daily pastebin goal
3%
SHARE
TWEET

vin

a guest Feb 20th, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. //localStorage.setItem("pDate", "2000-01-01");
  4.  
  5. $("#_historiapojazduportlet_WAR_historiapojazduportlet_\\:rej").val('WOR44447');
  6. $("#_historiapojazduportlet_WAR_historiapojazduportlet_\\:vin").val('WBAUB31040VH50533');
  7.  
  8. function formatDate1(date) {
  9.     var y = date.getFullYear();
  10.     var m =  ("0" + (date.getMonth()+1)).slice(-2);
  11.     var d = ("0" + date.getDate()).slice(-2);
  12.     var date_formatted = d + "." + m + "." + y;
  13.     return date_formatted;
  14. }
  15.  
  16. function formatDate2(date) {
  17.     var y = date.getFullYear();
  18.     var m =  ("0" + (date.getMonth()+1)).slice(-2);
  19.     var d = ("0" + date.getDate()).slice(-2);
  20.     var date_formatted = y + "-" + m + "-" + d;
  21.     return date_formatted;
  22. }
  23.  
  24.  
  25. function inject() {
  26.     var d = new Date(localStorage.getItem("pDate"));
  27.     var injectDate = formatDate1(d);
  28.    
  29.     console.log(injectDate);
  30.     $("#_historiapojazduportlet_WAR_historiapojazduportlet_\\:data").val(injectDate);
  31.     $("#_historiapojazduportlet_WAR_historiapojazduportlet_\\:btnSprawdz").click();
  32.    
  33.     $("#informacje").val();
  34.  
  35.     d.setDate(d.getDate() + 1);
  36.     var pDate = formatDate2(d);
  37.     localStorage.setItem("pDate", pDate);
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top