Fossil

Diff
Login

Differences From Artifact [ef6a9488a0]:

To Artifact [84cea5371f]:


77
78
79
80
81
82
83



84
85
86
87
88
89
90
91
92

93


94
      elButton.style.opacity = 1;
    }
    lockCopyText = false;
  }.bind(null,this.id),400);
}
/* Create a temporary <textarea> element and copy the contents to clipboard. */
function copyTextToClipboard(text){



  var x = document.createElement("textarea");
  x.style.position = 'absolute';
  x.style.left = '-9999px';
  x.value = text;
  document.body.appendChild(x);
  x.select();
  try{
    document.execCommand('copy');
  }catch(err){}

  document.body.removeChild(x);


}







>
>
>
|
|
<
|
|
|
|
|
|
>
|
>
>

77
78
79
80
81
82
83
84
85
86
87
88

89
90
91
92
93
94
95
96
97
98
99
      elButton.style.opacity = 1;
    }
    lockCopyText = false;
  }.bind(null,this.id),400);
}
/* Create a temporary <textarea> element and copy the contents to clipboard. */
function copyTextToClipboard(text){
  if( window.clipboardData && window.clipboardData.setData ){
    clipboardData.setData('Text',text);
  }else{
    var x = document.createElement("textarea");
    x.style.position = 'fixed';

    x.value = text;
    document.body.appendChild(x);
    x.select();
    try{
      document.execCommand('copy');
    }catch(err){
    }finally{
      document.body.removeChild(x);
    }
  }
}