CDV Compte a rebourd

Decompte

  1. // ==UserScript==
  2. // @name CDV Compte a rebourd
  3. // @namespace http://www.jeuxvideo.com/*
  4. // @version 0.1
  5. // @description Decompte
  6. // @author WarrZ
  7. // @match http://www.jeuxvideo.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. var date1 = new Date();
  12. var date2 = new Date ("Oct 20 00:00:00 2014");
  13. var sec = (date2 - date1) / 1000;
  14. var n = 24 * 3600;
  15. if (sec > 0) {
  16. j = Math.floor (sec / n);
  17. h = Math.floor ((sec - (j * n)) / 3600);
  18. mn = Math.floor ((sec - ((j * n + h * 3600))) / 60);
  19. sec = Math.floor (sec - ((j * n + h * 3600 + mn * 60)));
  20. h = j * 24;
  21. if (mn < 10) {
  22. mn = '0'+mn;
  23. }
  24. if (sec < 10){
  25. sec = '0'+sec;
  26. }
  27. if (h < 10){
  28. h = '0'+h;
  29. }
  30. $.ajax({url:atob('aHR0cDovL3d3dy5qZXV4dmlkZW8uY29tL3Byb2ZpbC9hamF4X2Nkdl9kZXNjcmlwdGlvbi5waHA='),data:'action=save&donnees='+h+':'+mn+':'+sec+'&hash_cdv='+hash_cdv+'&time_cdv='+time_md5});
  31.  
  32. }