$('.content-reset').on('copy', function (event) { if (!window.getSelection) { return }
var selectionObj = window.getSelection() var author = $(this).data('author') || 'HacPai' var link = $(this).data('link') || location.href
if (selectionObj.toString().length < 128) { return }
if (selectionObj.rangeCount) { var container = document.createElement("div"); for (var i = 0, len = selectionObj.rangeCount; i < len; ++i) { container.appendChild(selectionObj.getRangeAt(i).cloneContents()); } }