if (window.location.hostname.substr(0, 5) !== 'smile') {
  window.location.hostname = 'smile.amazon.com'
}

if (window.location.hostname.substr(0, 5) !== 'smile') {
  tmp = window.location.hostname.replace(/^(www\.)?amazon/,"smile.amazon");
  window.location.hostname = tmp
}

Make it usable with international amazon websites
Make it usable with international amazon websites
