Skip to content

Instantly share code, notes, and snippets.

@cowlby
Created November 30, 2009 22:17
Show Gist options
  • Save cowlby/245819 to your computer and use it in GitHub Desktop.
Save cowlby/245819 to your computer and use it in GitHub Desktop.
javascript:(function(){var b="inurl:reddit.com",a="http://www.searchreddit.com/",c=/\/r\/[\w\.]+\//.exec(document.location.pathname);b=(c)?b+c[0]:"";window.location=a+"?s="+b})();
(function() {
var s = 'inurl:reddit.com',
l = 'http://www.searchreddit.com/',
r = /\/r\/[\w\.]+\//.exec(document.location.pathname);
s = (r) ? s + r[0] : '';
window.location = l + '?s=' + s;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment