Xem demo tại đây.
Chú giải:
| : | Có thể thay đổi tùy ý :3 | |
| : | Sai là die |
Bước 1:Tạo một trang để chờ lấy liên kết
|
|
|
Trang trờ lấy liên kết của Đầu Ngựa. |
Rồi thêm đoạn code này vào HTML của trang đó :
(Nên xóa hết code trong trang đi để dán code vào)
<div class='time-wrapper hidden'>
<p><b>Quá trình tải xuống của bạn sẽ bắt đầu sau giây lát!</b></p>
<p><span id="thoi-gian-dem-nguoc-by-Dau-Ngua">0</span></p>
<div class="nut-lay-lien-ket-by-Dau-Ngua"></div>
</div>
<style>
.hidden{display:none!important}
p{margin:0}
p,.nut-lay-lien-ket-by-Dau-Ngua,.time-wrapper{text-align:center}
.nut-lay-lien-ket-by-Dau-Ngua a{background:#6dab3c;border:1px solid #6dab3c;position:relative;color:#ffffff;font-size:14px;display:inline-block;padding:7px 20px;min-width:70px;border-radius:3px}
#thoi-gian-dem-nguoc-by-Dau-Ngua{margin:25px 0 30px 0;display:inline-block;border-radius:100%;width:120px;height:120px;line-height:120px;color:#33b5e5;border-radius:50%;border:2px solid #33b5e5;font-size:60px;font-weight:100}
</style>
Bước 2: Mở phần chỉnh sửa HTML của Blog,thêm đoạn code này ở trước thẻ "</body>" :
<!-- Nút chờ lấy liên kết by Đầu Ngựa -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>//<![CDATA[
$('.phan-tai-xuong-by-Dau-Ngua').click(function() {
var id_sp = $(this).attr('name');
localStorage.setItem('luu_id', id_sp);
$.ajax({type: 'GET',url: '/feeds/posts/summary/' + id_sp,data: {'alt': 'json'},dataType: 'jsonp',
success: function(k) {
if (k.entry) {
for (var c = 0; c < k.entry.link.length; c++) {
if ("enclosure" == k.entry.link[c].rel) {
if ("text/html" == k.entry.link[c].type) {
var get_link = k.entry.link[c].href;
localStorage.setItem('luu_get_link', get_link);}}}}}});
var url_tv = '/p/link trang';
setTimeout(function() {
location.href = url_tv;}, 1000);});
var id = localStorage.getItem('luu_id')
var get_link = localStorage.getItem('luu_get_link');
var timer = 20;if (id) {
document.querySelector('.time-wrapper').classList.remove('hidden')
var downloadTimer = setInterval(function() {
document.getElementById('thoi-gian-dem-nguoc-by-Dau-Ngua').innerHTML = timer;
timer -= 1;
if (timer <= -1) {
clearInterval(downloadTimer);
document.getElementById('thoi-gian-dem-nguoc-by-Dau-Ngua').innerHTML = '0';
document.querySelector('.nut-lay-lien-ket-by-Dau-Ngua').innerHTML = '<a href=' + get_link + ' target="_blank" rel="noopener nofollow" title="Get link">Get link</a>';}}, 1000)}
//]]></script>
<!-- /Nút chờ lấy liên kết by Đầu Ngựa -->
Trong đó:
timer = "20"; là thời gian
chờ lấy liên kết
"link trang"thì bạn thay thành
link trang chờ của bạn vào
VD link trang chờ lấy liên kết của mình là:
daungua.blogspot.com/p/vui-long-cho-e-lay-lien-ket.html
Thì ta sẽ thay từ đoạn "/p/" đến hết đoạn còn lại nghĩa là phần:
/p/vui-long-cho-e-lay-lien-ket.html
rồi thay thế vào phần "/p/link trang"
Bước 3: Dán tiếp code này ở trước thẻ "</b:skin>" (Muốn nút đẹp thì cho vào,không cần cho cũng được)
.nut-tai-ve-by-Dau-Ngua {
width: 100px;
height: 40px;
color: black;
border: 3px solid black;
background: whitesmoke;}
Bước cuối cùng: Bạn hãy cho phần code này vào bài đăng,bạn muốn nó hiển thị ở đâu thì dán nó ở đó:(dán ở chế độ "chỉnh sửa HTML")
<button class="nut-tai-ve-by-Dau-Ngua phan-tai-xuong-by-Dau-Ngua" name="id bài viết" type="button">Tải về</button>
Nếu làm xong mà bạn thấy web bị lỗi như hình thì hãy làm cách sau:
|
|
| Lỗi không hiển thị ảnh Thumb |
B1: Vào phần "chỉnh sửa HTML" rồi cắt đoạn code sau:
<script
src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'/>
B3: Kiểm tra xem sửa đc lỗi chưa,nếu vẫn chưa được thì các bạn
hãy bình luận xuống dưới hoặc liên hệ
với Ngựa tại đây.
0 Post a Comment: