Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
First version that adds realtime filtering of middlecoin addresses.
// ==UserScript==
// @name Middlecoin utilities
// @namespace
// @version 0.1
// @description Some extras for middlecoin, i.e. table search filter
// @match
// @copyright 2012+, KamiNuvini
// @run-at document-end
// @require
// ==/UserScript==
// Realtime address search
$('table').before('<div id="searchbox"><b>Search address: </b><input id="search" type="search"></div>');
// Search snippet, thanks to dfsq at StackOverflow -
var $rows = $('table tbody tr');
$('#search').keyup(function() {
var val = $.trim($(this).val()).replace(/ +/g, ' ').toLowerCase();
$ {
var text = $(this).text().replace(/\s+/g, ' ').toLowerCase();
return !~text.indexOf(val);
// End of realtime address search
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.