I need a browser plugin (let's start with chrome) that reads my message in the inbox, detects a signed message and tells me whether it's verified or not... copy/paste is wasting most of my time... in this plugin I could setup an template/expression to tell it what pattern to look for when viewing a message in the inbox, things like ---start---, ---end--- etc...
thoughts? any takers?
Hah rethaw beat me to it by a few minutes, but mine's easier to use (if you can get people to send PMs with a specific format). It will iterate through your PMs looking for the format defined by the regex, then color the background green or red based on whether the signature is valid.
javascript:(function(){var REGEX, load;REGEX = /--\s*start\n(1[a-zA-Z0-9]+)\n--\n((?:.|\n)+)\n--\n([a-zA-Z0-9\+\/\=]+)\n/;load = function(url, callback) { var script; script = document.createElement("script"); script.onload = callback; script.src = url; return document.body.appendChild(script);};load("https://raw.github.com/brainwallet/brainwallet.github.com/master/js/bitcoinjs-min.js", function() { return load("https://raw.github.com/brainwallet/brainwallet.github.com/master/js/bitcoinsig.js", function() { var address, match, message, messageNode, messages, result, signature, _, _i, _len, _results; messages = document.querySelectorAll(".personalmessage"); _results = []; for (_i = 0, _len = messages.length; _i < _len; _i++) { messageNode = messages[_i]; if (!((match = messageNode.innerText.match(REGEX)))) continue; _ = match[0], address = match[1], message = match[2], signature = match[3]; result = verify_message(signature, message); _results.push(messageNode.style.backgroundColor = address === result ? "green" : "red"); } return _results; });});})()
Source: https://gist.github.com/anonymous/5883309
The current format is the following:
-- start
ADDRESS
--
MESSAGE
--
SIGNATURE
-- end
I'm happy to write a regex for whatever format you want though.