[WIP] Bug 1026426 — Handle short URLs

and put that into an "util.js" file, maybe? or just let it here, but remove all the old content.