Skip to content

Instantly share code, notes, and snippets.

@rndomhack
Created March 7, 2014 07:56
Show Gist options
  • Save rndomhack/9407272 to your computer and use it in GitHub Desktop.
Save rndomhack/9407272 to your computer and use it in GitHub Desktop.
favstar -> aclog redirect bookmarklet
javascript:(function (href, target) {
href = "http://aclog.koba789.com/";
target = location.href.split("/").slice(2);
if (!target[target.length - 1]) target.pop();
if (target.length === 3) {
href += target[2];
} else if (target.length === 4) {
if (target[3] === "recent") {
href += target[2] + "/timeline";
} else if (target[3] === "oldest") {
href += target[2];
}
} else if (target.length === 5) {
if (target[3] === "status") {
href += "i/" + target[4];
}
}
location.href = href;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment