.copy-btn { padding: 12px ; border: 3px solid #EEEEC6; border-radius: 5px; background: #3F88C5; color: white; font-size: 16px; font-family: inherit; cursor: pointer; font-weight: 600;}.copied { background: #04AA6D; transition: 0.5s;}::selection{ background: #04AA6D; color:yellow;}
..styles/bootstrap/up_boxes.html
<div class="form-groupp w-100"> <label class="fileclass" for="file1">{b_title}</label> <textarea id="file1" readonly="readonly" rows="1" cols="40" class="form-control" tabindex="2">{b_url_link}</textarea>
<button class="copy-btn">نسخ الرابط</button> </div>
<script src="codes/fire.js"></script>
document.addEventListener("click", e => { let button = e.target; if (button.tagName !== "BUTTON") { button = button.closest("button"); } if (!button || !button.classList.contains("copy-btn")) { return; } e.preventDefault(); let textarea = button.previousElementSibling; while (textarea && textarea.tagName !== "TEXTAREA") { textarea = textarea.previousElementSibling; } if (!textarea) { alert("Unable to find the textarea to copy!"); return; } textarea.select(); textarea.setSelectionRange(0, 99999); document.execCommand("copy"); button.classList.toggle("copied"); Swal.fire( 'تم نسخ الرابط ', `${textarea.value}`, 'success') });
جميع المواضيع والمشاركات المكتوبة تعبّر عن وجهة نظر صاحبها ,, ولا تعبّر بأي شكل من الاشكال عن وجهة نظر إدارة المنتدى .
هذا المنتدى يستخدم برنامج PBBoard لمعرفة المزيد عنه اذهب إلى www.pbboard.info