removal of clipboard write

10.3.x-maintenance
cTn 2014-04-03 14:20:12 +02:00
parent d953917953
commit 2977f9725b
4 changed files with 0 additions and 36 deletions

View File

@ -25,7 +25,6 @@
"storage",
"fileSystem",
"fileSystem.write",
"clipboardWrite",
"notifications"
],

View File

@ -33,25 +33,4 @@
border: 1px solid silver;
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;
}

View File

@ -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>

View File

@ -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();
});
});
}