“; var appendHtml = String.format(formatHtml, html, alt); if (ispopup) { $ (“.pw-list-news li[data-id='” + newsId + “‘] .news_source p”).html(linkFormat + appendHtml); $ (“.pw-list-news li[data-id='” + newsId + “‘] .btn-copy-link-source”).click(function (e) { e.stopPropagation(); if ($ (this).hasClass(‘disable’)) return false; copyStringToClipboard(html); $ (this).find(‘i’).text(‘Link đã copy!’); setTimeout(function () { $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .btn-copy-link-source’).find(‘i’).text(‘Lấy link’); $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .btn-copy-link-source’).addClass(‘disable’); $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .link-source-full’).removeClass(‘active’); }, 3000); }); $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .btn-copy-link-source2’).click(function (e) { e.stopPropagation(); if (!$ (“.pw-list-news li[data-id='” + newsId + “‘] .popup-source-container”).hasClass(‘show’)) $ (“.pw-list-news li[data-id='” + newsId + “‘] .popup-source-container”).addClass(‘show’).show(); else { $ (“.pw-list-news li[data-id='” + newsId + “‘] .popup-source-container”).removeClass(‘show’).hide(); } }); $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .link-source-full’).mouseup(function () { if ($ (this).hasClass(‘active’)) { $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .btn-copy-link-source’).addClass(‘disable’); $ (this).removeClass(‘active’); } else { $ (‘.pw-list-news li[data-id=”‘ + newsId + ‘”] .btn-copy-link-source’).removeClass(‘disable’); $ (this).addClass(‘active’); } }); } else { $ (“.news_source p”).html(linkFormat + appendHtml); $ (‘.btn-copy-link-source’).click(function (e) { e.stopPropagation(); if ($ (this).hasClass(‘disable’)) return false; copyStringToClipboard(html); $ (this).find(‘i’).text(‘Link đã copy!’); setTimeout(function () { $ (‘.btn-copy-link-source’).find(‘i’).text(‘Lấy link’); $ (‘.btn-copy-link-source’).addClass(‘disable’); $ (‘.link-source-full’).removeClass(‘active’); }, 3000); }); $ (‘.btn-copy-link-source2’).click(function (e) { e.stopPropagation(); if (!$ (“.popup-source-container”).hasClass(‘show’)) $ (“.popup-source-container”).addClass(‘show’).show(); else { $ (“.popup-source-container”).removeClass(‘show’).hide(); } }); $ (‘.link-source-full’).mouseup(function () { if ($ (this).hasClass(‘active’)) { $ (‘.btn-copy-link-source’).addClass(‘disable’); $ (this).removeClass(‘active’); } else { $ (‘.btn-copy-link-source’).removeClass(‘disable’); $ (this).addClass(‘active’); } }); } //$ (“.link-source-name”).attr(“href”, html).attr(“target”, “_blank”).attr(“rel”, “nofollow”); } } //});
Nguồn: Sưu tầm