// ==UserScript==
// @name           Friendfeed beta redirector
// @namespace      http://kylehasegwa.com/ffbetaredir
// @description    Redirects friedfeed to beta.friendfeed
// @include        http://friendfeed.com/*
// @include        http://www.friendfeed.com/*
// ==/UserScript==

// Split the path into an array
var pathArray = window.location.pathname.split('/');

// These pages should be excluded from beta
var legacyPaths = ['e','account','share','iphone','settings','public','embed','about','api'];

// Redirect all requests to pages that are not in the legacyPaths
if (legacyPaths.indexOf(pathArray[1]) < 0) {
    window.location = window.location.protocol + '//' + 'beta.friendfeed.com' + window.location.pathname + window.location.search;
}
