title: JavaScript Code that redirect to a domain if published on a different domain?
body: <p>A few years ago I came across a piece of code that will redirect the page to a certain domain name.</p>
  
  <p>For example, I put the code in on of my <code>.js</code> files and somebody tries to rip my site, and publish it to their own domain, it will redirect them to my domain.</p>