var CLR = (function(self) {
  var my = self, fn = {};
  fn.init = function() {
    var asin = [];
    var items = [];

    items = document.querySelectorAll("input[name='asin']");
    items.forEach(function(item){
      asin.push(item.value);
    })

    items = document.querySelectorAll("#huc-first-upsell-row a.a-link-normal.link-without-underline");
    items.forEach(function(item){
      var href = item.href;
      var oooo = href.split("/");
      if(oooo.length > 6 && oooo[5].length == 10) {
        asin.push(oooo[5]);
      }
    })
    fn.copy(asin.join('\n'))
    alert("copy ( " + asin.length + " ) items successful");
  }

  fn.copy = function(text) {
    var textarea = document.createElement("textarea");
    textarea.innerHTML = text;
    document.body.appendChild(textarea);
    textarea.select();
    document.execCommand('copy')
    document.body.removeChild(textarea);

  }

  my.init = function() {
    fn.init();
  };
  return my;
})(CLR || {}).init()





javascript:var CLR=function(n){var e=n,t={};return t.init=function(){var n=[];document.querySelectorAll("input[name='asin']").forEach(function(e){n.push(e.value)}),document.querySelectorAll("#huc-first-upsell-row a.a-link-normal.link-without-underline").forEach(function(e){var t=e.href.split("/");t.length>6&&10==t[5].length&&n.push(t[5])}),t.copy(n.join("\n")),alert("copy ( "+n.length+" ) items successful")},t.copy=function(n){var e=document.createElement("textarea");e.innerHTML=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)},e.init=function(){t.init()},e}(CLR||{}).init();