removal of clipboard write
parent
d953917953
commit
2977f9725b
|
@ -25,7 +25,6 @@
|
|||
"storage",
|
||||
"fileSystem",
|
||||
"fileSystem.write",
|
||||
"clipboardWrite",
|
||||
"notifications"
|
||||
],
|
||||
|
||||
|
|
21
tabs/cli.css
21
tabs/cli.css
|
@ -34,24 +34,3 @@
|
|||
|
||||
resize: none;
|
||||
}
|
||||
.tab-cli .copy {
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
||||
bottom: 55px;
|
||||
right: 40px;
|
||||
|
||||
height: 28px;
|
||||
line-height: 28px;
|
||||
|
||||
padding: 0 15px 0 15px;
|
||||
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
|
||||
border: 1px solid silver;
|
||||
background-color: #ececec;
|
||||
}
|
||||
.tab-cli .copy:hover {
|
||||
background-color: #dedcdc;
|
||||
}
|
|
@ -8,5 +8,4 @@
|
|||
</div>
|
||||
</div>
|
||||
<textarea name="commands" placeholder="Write your command here" rows="0" cols="0"></textarea>
|
||||
<a class="copy" href="#">Copy to Clipboard</a>
|
||||
</div>
|
13
tabs/cli.js
13
tabs/cli.js
|
@ -70,19 +70,6 @@ function tab_initialize_cli() {
|
|||
|
||||
// give input element user focus
|
||||
$('.tab-cli textarea').focus();
|
||||
|
||||
$('.tab-cli .copy').click(function() {
|
||||
var text = $('.tab-cli .window .wrapper').html();
|
||||
text = text.replace(/<br\s*\/?>/mg,"\n"); // replacing br tags with \n to keep some of the formating
|
||||
|
||||
var copyFrom = $('<textarea/>');
|
||||
|
||||
copyFrom.text(text);
|
||||
$('body').append(copyFrom);
|
||||
copyFrom.select();
|
||||
document.execCommand('copy');
|
||||
copyFrom.remove();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue