Skip to content

Instantly share code, notes, and snippets.

@kiwec

kiwec/monero-lambo.js

Last active Jan 17, 2018
Embed
What would you like to do?
// Code de QUALITÉ (issou)
// picunroll avant de lancer le script bien entendu
var arr = [];
$('.conteneur-message').each(function(){
var name = $(this).find('.text-user').text().trim();
// HACK nettoyage du message
$(this).find('a').remove();
$(this).find('blockquote').remove();
$(this).find('.signature-msg').remove();
var text = $(this).find('.bloc-contenu').text();
// x chiffres + optionellement un séparateur + 3 chiffres ou +
// Tout montant > 100$ ok
var re = /(\d+)\D?(\d{3,})/g;
var matches = re.exec(text);
if(!matches) return;
var val = parseInt((matches[1] + "" + matches[2]), 10);
if(!val || isNaN(val)) return;
if(arr[val])
arr[val].push(name);
else
arr[val] = [name];
});
for(var i in arr) {
if(!arr.hasOwnProperty(i)) continue;
document.getElementById('message_topic').value += '* ' + i + '$ : ' + arr[i].join(', ') + '\n';
}
@kiwec

This comment has been minimized.

Copy link
Owner Author

@kiwec kiwec commented Jul 14, 2017

MaJ : '2' + 3 carac changé en regex de 4 chiffres

TO THE GANGE

@kiwec

This comment has been minimized.

Copy link
Owner Author

@kiwec kiwec commented Jul 31, 2017

MaJ : suppression des citations, liens et signatures avant recherche

@kiwec

This comment has been minimized.

Copy link
Owner Author

@kiwec kiwec commented Dec 13, 2017

MaJ : plusieurs nombres par pseudo + tous nombres au dessus de 10 gérés, y compris les "10 000" au lieu de "10000".

@kiwec

This comment has been minimized.

Copy link
Owner Author

@kiwec kiwec commented Jan 17, 2018

MaJ : meilleur regex

  // (x chiffres) + (optionellement un séparateur) + (3 chiffres ou +)
  // Tout montant > 100$ ok
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.