Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name PPJ HFR
- // @namespace forum.hardware.fr
- // @description Indique le nombre de posts par jour pour un profil
- // @include http://forum.hardware.fr/hfr/profil-*
- // @version 1
- // @grant none
- // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
- // ==/UserScript==
- var pseudo = '';
- var nbMsg = 0;
- var nbDays = 0;
- $('.profilCase3').each(function(index){
- if (0==index){
- pseudo = $.trim($(this).text());
- }else if(9==index){
- nbMsg = parseInt($(this).text());
- }else if(10==index){
- nbDays = Math.floor((new Date() - new Date($(this).text().split('/')[2], parseInt($(this).text().split('/')[1]) - 1 , $(this).text().split('/')[0]))/(1000*60*60*24));
- }
- });
- alert(pseudo + ' poste environ '+ Math.floor(nbMsg/nbDays)+ ' messages par jour !');
Advertisement
Add Comment
Please, Sign In to add comment