주소 복사 수정

dev_bert
kyebyungha 3 years ago
parent 65189dfa36
commit 74c27be983

@ -396,7 +396,6 @@
var shareUrlFB = "https://www.facebook.com/sharer/sharer.php?u="+encodeURIComponent(pageUrl)+"&t="+encodeURI(pageTitle);
$(".facebook").on("click" , function(e) {
debugger;
FB.ui({
method : 'share_open_graph',
action_type: 'og.shares',
@ -423,13 +422,14 @@
$(".copy").on("click" , function(e) {
debugger;
e.preventDefault();
$("#copy").val(window.location.href);
var target = $("#copy");
target.val($(".cont_txt").text());
// target.val($(".cont_txt").text());
var urlbox = document.getElementById( 'copy' );
urlbox.select();
document.execCommand('copy');
$("#shared").removeClass("open");
Swal.fire({text:"게시글이 복사 되었습니다."});
Swal.fire({text:"주소가 복사 되었습니다."});
});
@ -717,17 +717,21 @@
$("#edit_copy").on("click", function(e) {
e.preventDefault();
debugger;
$("#copy").val(window.location.href);
var target = $("#copy");
/*
$(".comment_text").each( function(idx,ele) {
if(ele.dataset.ctno == $ct_no) {
target.val(ele.innerText);
return;
}
});
*/
var urlbox = document.getElementById( 'copy' );
urlbox.select();
document.execCommand('copy');
Swal.fire({text:"댓글이 복사 되었습니다."});
Swal.fire({text:"주소가 복사 되었습니다."});
$("#option2").removeClass("open");
});

Loading…
Cancel
Save