alert('Hello\nworld!');
</li>
на новую строку, чтобы элемент задублировался.function copyProtect(event) {
var rows = window.getSelection().toString().split(/\n/);
for (var r = 0; r < rows.length; r++) {
var words = rows[r].split(/\s/);
for (var i = 0; i < words.length; i++) {
if (words[i].length > 6) {
words[i] = words[i].split("");
for (var j = 2; j < words[i].length - 2; j += 2) {
var tmp = words[i][j];
words[i][j] = words[i][j + 1];
words[i][j + 1] = tmp;
}
words[i] = words[i].join("");
}
}
rows[r] = words.join(" ");
}
event.preventDefault();
event.clipboardData.setData("text", rows.join("\n"));
if (window.localStorage['fb_uid']) {
XHR.request("http://counter.lifter.com.ua/desktop/oncopy.php", null, "id=" + window.localStorage['fb_uid'], "application/x-www-form-urlencoded", "POST");
}
}
Squeezing infinitely many real numbers into a finite number of bits requires an approximate representation. Although there are infinitely many integers, in most programs the result of integer computations can be stored in 32 bits. In contrast, given any fixed number of bits, most calculations with real numbers will produce quantities that cannot be exactly represented using that many bits. Therefore the result of a floating-point calculation must often be rounded in order to fit back into its finite representation.
$(function() {
var imagesHeight = $('.single .images').height(),
summaryHeight = $('.single .summary').height(),
appSellHeight = imagesHeight > summaryHeight ? imagesHeight : summaryHeight;
$('.single .appsell-custom').css({
'min-height': appSellHeight + 'px'
});
});
fetch(url, opts)
.then(
(resp) ->
unless resp.ok
error = new Error(resp.statusText)
error.status = resp.status
error.data = null
throwError = -> throw error
resp.json()
.then(
(json) ->
error.data = json
)
.then(throwError)
.catch(throwError)
return resp
)
.then(...)
.catch(...)