var ts = "";
var res = window.location.href.split("site:");
if (res.length > 1) {
ts = res[length];
} else {
ts = window.location;
}
location.href='https://www.google.com/#q=' + prompt("Search for what from here?") + '+site:' + ts;
This Pen doesn't use any external CSS resources.