29 lines
880 B
HTML
29 lines
880 B
HTML
|
<!doctype HTML>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>elmoji</title>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="node"></div>
|
||
|
<script src="js/main.js"></script>
|
||
|
<script>
|
||
|
var app = Elm.Main.init({
|
||
|
node: document.getElementById('node')
|
||
|
});
|
||
|
|
||
|
app.ports.copy.subscribe(function(str) {
|
||
|
var el = document.createElement('textarea');
|
||
|
el.value = str;
|
||
|
el.setAttribute('readonly', '');
|
||
|
el.style = {position: 'absolute', left: '-9999px'};
|
||
|
document.body.appendChild(el);
|
||
|
el.select();
|
||
|
document.execCommand('copy');
|
||
|
document.body.removeChild(el);
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|