javascript:(function(){location.assign("http://" + ((location.hostname == "www.hive.blog") ? "ecency.com" : "www.peakd.com") + ((location.pathname.split("/")[1].indexOf("@") == -1) ? location.pathname : ("/" + location.pathname.split("/")[1])))})();
How would I add a fourth option to this, so that it changes all three urls to become a stemgeeks.net
url instead? I tried to just move your : "www.peakd.com"
to the other side of the colon and add another question mark, then follow the colon with "stemgeeks.net"
instead, but that didn't work. This is what I have at present...
javascript:(function(){location.assign("http://" + ((location.hostname == "www.hive.blog") ? "ecency.com" ? "www.peakd.com" : "stemgeeks.net" ) + ((location.pathname.split("/")[1].indexOf("@") == -1) ? location.pathname : ("/" + location.pathname.split("/")[1])))})();
I guess the "or" here it isn't that simple to implement, but I'm no Javascript master. I really want to have a scriptlet like this which can convert all three common urls to the stemgeeks.net url.
This will do it — even though you don't see "ecency.com" listed there, it will still work:
javascript:(function(){location.assign("http://" + ((location.hostname == "www.hive.blog") ? "peakd.com" : "stemgeeks.net") + ((location.pathname.split("/")[1].indexOf("@") == -1) ? location.pathname : ("/" + location.pathname.split("/")[1])))})();
That is awesome! Thank you so much for your help with this.