Nov 12

OneRiot has entered your Google

Search, Tech with tags: , 11 Comments »

Tobias Peggs told me about the rebranding of Me.dium to OneRiot to show the change in direction from a “social browsing” company to a real-time search solution.

As a little experiment, to coincide with their launch today, I whipped up a little bit of Greasemonkey goodness in the form of OneRiot in your Google.

The premise is simple, and you have probably seen it before. When you do a Google search, this userscript will head over to OneRiot to do the search there. The top result will then pop-in to the results.

I always tend to do something like this when a new search engine comes out. I am not mentally going to switch from using Google, so bring the mountain to Mohamed and plug in the top result to Google itself. This way, if it shows me something truly new (read: not the same as what Google gives me and still useful) then I will maybe pay more attention to it in the future.

Most of the work itself is infrastructure crud to get around loading up jQuery. Oh for a better way to load standard libraries!

// ==UserScript==
// @name          OneRiot in your Google
// @namespace
// @description   Add a riot to your Google
// @include       http://**
// ==/UserScript==
(function() {
	// Add jQuery
	var $;
	var query = parseQuery();
	var oneriotURL = '' + query;
	var script = document.createElement('script');
	script.src = '';
	script.type = 'text/javascript';
	// Check if jQuery's loaded
	function jQueryCheck() {
		if (typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(jQueryCheck, 100); }
		else { $ = unsafeWindow.jQuery; jQueryReady(); }
	// The Real Work
	function jQueryReady() {
		    method: 'GET',
		    url: oneriotURL,
		    onload: function(response) { // Get the first result from OneRiot
				var resulttitle = response.responseText.match(/(\<a class="result_title".*?\<\/a\>)/)[0];
				if (resulttitle) {
					var title = $(resulttitle);
					var url = title.attr('href');
					var text = title[0].textContent;
					var result = '<div id="oneriot" style="padding: 2px;"><a href="" title="Visit"><img src="" border="0" style="margin-right: 4px;"/></a> <a href="' + url + '" title="View the OneRiot result">' + text + '</a> <a href="' + oneriotURL + '" style="color: #3399FF; padding: 0 8px;" title="See more results for this query on the website">more oneriot results</a></div>';
					$('#ssb').after(result); // Add it to the Google DOM at the top
	// Get the Google query from the query string
	function parseQuery() {
		var result =\&q=(.*?)\&/);
		if (result && result.length > 0) {
			return result[1];

OneRiot at Google

OneRiot seems to do well for certain queries. This example does a good job at showing it off. In the Obama search, instead of just getting, it shows recent news. That is why it is a nice complement to traditional search engines.

Kudos to the OneRiot team on the launch!

Oct 24

Gmail now supports IMAP

Google, Tech, iPhone with tags: , , , 4 Comments »

I was really excited when I logged in to Gmail and saw the new settings:

Gmail Imap

I think this is my number one feature request for Gmail, so it is great to see it role out. Since Gmail is tag/label based, it isn’t as easy to implement IMAP as it may seem, so good job dev team!

The reason that I personally care is that I have been able to do this for my corporate account:

And now, I can finally do the same for my personal email account. Check out the automatic labels that you get.