Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Usage recorder
  3. // @namespace http://your.homepage/
  4. // @version 0.1
  5. // @description Record the use of a page thanks to AJAX calls
  6. // @author jt
  7. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
  8. // @match http://gabrielecirulli.github.io/2048/
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. /*
  13. Il reste à écrire les appels ajax et ça sera bon
  14. */
  15.  
  16. Pseudo = "Raph"
  17.  
  18. $(function(){
  19.  
  20. $.post('http://vps170784.ovh.net/jt/rec.php?file=2048', {data:"start, " + Pseudo + "," + Math.round(new Date().getTime())})
  21.  
  22. setInterval(function () {
  23.  
  24. $.post('http://vps170784.ovh.net/jt/rec.php?file=2048', {data:"still, " + Pseudo + "," + Math.round(new Date().getTime())});
  25.  
  26. }, 10000);
  27.  
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement