Untuk Demo bisa kalian Cek disini
MainBlog.js (Script Untuk Blog Utama):
<script>//<![CDATA[
except=[location.hostname,'google.com','blogger.com'];
$.ajax({
url: 'https://info-miningbtc.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&max-results=150',
type: 'get',
dataType: 'jsonp',
success: function(json) {
let target = [];
for(var i = 0;i<json.feed.entry.length;i++){
var key = {};
feeds = json.feed.entry[parseInt(Math.random() * json.feed.entry.length)];
for(var e = 0;e<feeds.link.length;e++){
key['href'] = feeds.link[e].href;
}
target[i] = key;
}
var dupe = target.filter((tag, index, array) => array.findIndex(t => t.href == tag.href) == index),
tagLink = document.getElementsByTagName("a");
for(var i=0;i<tagLink.length;i++){
if(tagLink[i].getAttribute('href')){
var getUrl = tagLink[i].getAttribute('href'),
url = except.find(uri =>{
return getUrl.replace('www.','').split('/')[2] === uri;
});
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? dupe[i].href+'#?o='+btoa(getUrl) : getUrl);
}
}
}
});
//]]></script>
Untuk Blog Safelinknya kalian bebas menggunakan theme apapun.
Style.css (Untuk Blog Safelink) :
.none{display:none !important;}
svg {
width: 80px;
height: 80px;
transform: rotate(-90deg);
}
.circle_animation {
stroke-dasharray: 440;
stroke-dashoffset: 0;
transition: all 1s linear;
}
#containerSafe{margin: 0 auto;width: 70%;text-align: center;border: 2px solid #07a7e6;padding: 12px;clear: both;border-radius: 8px;}
#containerSafe div:nth-child(1){font-size: 18px;font-weight: 600;}
#btnLink{background: green;color: white;border-radius: 6px;padding: 4px;font-weight: 600;cursor:pointer;}
#timer{position:relative;display:inline-block}
#timer span{position: absolute;top: 45%;left: 50%;text-align: center;transform: translate(-50%, -45%)}
Markup HTML (Kamu letakkan di tempat yg kamu inginkan dimana button safelink muncul):
<div class='none' id='containerSafe'>
<div>Please Wait..</div>
<div id='timer'>
<svg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'>
<circle cx='81' cy='81' fill='none' id='circle' r='69.85699' stroke='#000' stroke-width='1.5'/>
<circle class='circle_animation' cx='81' cy='81' fill='none' id='circle' r='69.85699' stroke='#6fdb6f' stroke-width='8'/>
</svg>
<span>0</span>
</div>
<div class='none' id='btnLink'>Go To Link</div>
</div>
Script.js (Letakkan diatas </body>):
<b:if cond='data:view.isPost'>
<script>//<![CDATA[
if(window.location.href.indexOf('#?o=') > -1){
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe;
$('#containerSafe').removeClass('none');
const newtab = true;
let countdown = 10;
var timer = setInterval(()=>{
$('#timer span').html(countdown--);
$('.circle_animation').css('stroke-dashoffset', 440-((countdown+1)*(440/10)));
if(countdown < 0){
$('#containerSafe div:nth-child(1)').html('Link Successfully Generate');
$('#btnLink').removeClass('none');
document.getElementById('btnLink').addEventListener("click", e =>{window.open(atob(uri),newtab == true ? '_blank' : '_self');});
clearInterval(timer);
}
}, 1000);
}else{
$('#containerSafe').remove();
}
//]]></script>
</b:if>
Catatan :
- Script ini tidak memberatkan Theme mu karena ga butuh External Encoding.
- Untuk MainBlog.js :
Except (Link yang tidak bakal kena Safelink):
except=[location.hostname,'google.com','blogger.com'];
Untuk Feed Random Post,cari url blog dibawah ini lalu kamu ganti dengan Blog safelink mu:
https://info-miningbtc.blogspot.com
- Untuk Script.js (Script Blog Safelink):
Cari code dibawah ini lalu angkanya kamu ganti terserah itu buat countdown waktu.
let countdown = 10;
Saya sarankan wajib menggunakan countdown waktu agar tidak terjadi Bounce rate yg tinggi.
Lalu Cari Code dibawah ini.
const newtab = true;
pilih true atau false
Jika True saat click tombol "Go To Link" Bakal membuka jendela baru.Jika False bakal sebaliknya.
di halaman gini /p/safelink.html
except=['blogmu.com','google.com','blogger.com'];
var tagLink = document.getElementsByTagName("a");
for(var i=0;i{
return getUrl.replace('www.','').split('/')[2] === uri;
});
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? '/p/safelink.html#?o='+btoa(getUrl) : getUrl);
}}
kalo halamannya beda blog tinggal tambahin link blognya pada bagian ini :
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? 'https://www.blogmu.com/p/safelink.html#?o='+btoa(getUrl) : getUrl);
except=['blogmu.com','google.com','blogger.com'];
var tagLink = document.getElementsByTagName("a");
for(var i=0;i<tagLink.length;i++){
if(tagLink[i].getAttribute('href')){
var getUrl = tagLink[i].getAttribute('href'),
url = except.find(uri =>{
return getUrl.replace('www.','').split('/')[2] === uri;
});
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? '/p/safelink.html#?o='+btoa(getUrl) : getUrl);
}}
kalo dibuat gini bisa gak bang?
blog utama > safelink > ouo.io > link download
nah di blog safelink biar bisa pakai Full Page Script bisa gak ya?
<b:if cond='data:view.isPost'>
<script>//<![CDATA[
if(window.location.href.indexOf('#?o=') > -1){
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe;
$('#containerSafe').removeClass('none');
const newtab = true;
let countdown = 10;
var timer = setInterval(()=>{
$('#timer span').html(countdown--);
$('.circle_animation').css('stroke-dashoffset', 440-((countdown+1)*(440/10)));
if(countdown < 0){
$('#containerSafe div:nth-child(1)').html('Link Successfully Generate');
$('#btnLink').removeClass('none');
document.getElementById('btnLink').addEventListener("click", e =>{window.open('http://ouo.io/qs/YOURKEY?s='+atob(uri),newtab == true ? '_blank' : '_self');});
clearInterval(timer);
}
}, 1000);
}else{
$('#containerSafe').remove();
}
//]]></script>
</b:if>
Ubah Key ouo.io "YOURKEY" dengan key mu
bisa buatin template kosong yang responsive untuk safelinknya gak bang?
kaya gini contohnya pastelink.net/d9cisape
$('#containerSafe div:nth-child(1)').html('Link Successfully Generate');
$('.circle_animation').css('stroke-dashoffset', 440-((countdown+1)*(440/10)));
Bagian Markup HTML hapus ini :
<div>Please Wait..</div>
<svg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'>
<circle cx='81' cy='81' fill='none' id='circle' r='69.85699' stroke='#000' stroke-width='1.5'/>
<circle class='circle_animation' cx='81' cy='81' fill='none' id='circle' r='69.85699' stroke='#6fdb6f' stroke-width='8'/>
</svg>
Untuk CSS Hapus ini :
svg {
width: 80px;
height: 80px;
transform: rotate(-90deg);
}
.circle_animation {
stroke-dasharray: 440;
stroke-dashoffset: 0;
transition: all 1s linear;
}
#containerSafe div:nth-child(1){font-size: 18px;font-weight: 600;}
situsSafelinkmu.com#?o=Encrypt-Situs-yang-dari-value
nah untuk metode ku kamu encryptnya ckup pake btoa method
const value = btoa(document.getElementById('value').value),
link = 'https://situs.com/p/safelink.html#?o=;
document.getElementById('result').innerText = link + value;
<input id='urlLink' type='url'/>
<input id='resultLink' type='url'/>
<input id='submit' type='submit'/>
<script>
document.getElementById('submit').addEventListener('click',()=>{
const value = document.getElementById('urlLink').value;
document.getElementById('resultLink').setAttribute('value','https://linkBlogSafelinkmu.com#?o=' + btoa(value));
})
</script>
Jadi sebelum ngeklik tombol Go To Link, user harus ngisi captcha dulu,
<script async='async' defer='defer' src='https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit'>
letakkan tag html ini di bawah markup html countdown
<div data-callback='responseCaptcha' id='recaptcha'/>
lalu script JSnya seperti ini
if(window.location.href.indexOf('#?o=') > -1){
var onloadCallback = function() {
grecaptcha.render('recaptcha', {
'sitekey' : '6Lc7qPwfAAAAANdFqyFj0bEDdj0F5lBt9L8GW7Bq'
});
};
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe;
$('#containerSafe').removeClass('none');
const newtab = true;
let countdown = 10;
var responseCaptcha = function(response) {
var timer = setInterval(()=>{
$('#timer span').html(countdown--);
$('.circle_animation').css('stroke-dashoffset', 440-((countdown+1)*(440/10)));
if(countdown < 0){
$('#containerSafe div:nth-child(1)').html('Link Successfully Generate');
$('#btnLink').removeClass('none');
document.getElementById('btnLink').addEventListener("click", e =>{window.open(atob(uri),newtab == true ? '_blank' : '_self');});
clearInterval(timer);
}
}, 1000);
};
}else{
$('#containerSafe').remove();
}
Jika beda sama script js mu sesuaikan sendiri ya
'sitekey' : 'sitekey-mu'
contoh hasil penerapan
https://info-miningbtc.blogspot.com/2018/06/bitcoin-for-free-adalah-bot-telegram.html#?o=aHR0cHM6Ly93d3cuZm9ydW0ucHJvamV4Y29kZS5jb20=
#recaptcha {
transform:scale(.7);
-webkit-transform:scale(.7);
transform-origin:25% center;
-webkit-transform-origin:25% center;
width: 120%;
}
mainin breakpoint yang kamu ubah scale untuk besar kecilnya frame
lalu untuk posisi kamu ubah yg 25% tersebut kalo mau static pakai px jngan persentase %
dan apabila kalo kepotong ubah widthnya
cari ini di script js blog safelink mu
atob(uri)
ubah jadi
atob(uri).replace('&','%26')
contoh :
link asilnya https://mega.nz/file/dzwi3Lga#NuEqgr_li3r4U8hfFzDYVzGnj3JNMIIjEXb4R4tFBpc tapi yang ke load cuma https://mega.nz/file/tygAxTwC
link safelinkya gini : https://www.sobatanime.com/p/encrypted.html#?o=aHR0cHM6Ly9tZWdhLm56L2ZpbGUvdHlnQXhUd0MjRllfLTNXS2hyc0FQRmpnVW9NUE1jRDdIQUNGbnhhUEM0QmtNeUFHZDNlSQ==
jadi simplenya gini :
encodeURIComponent(atob(uri))
nah yg tadi yg ada replace Methodnya kamu ganti dengan itu aja
tinggal kamu masukin aja domain ouonya di except
contoh :
except=[location.hostname,'google.com','blogger.com','ouo.io'];
Blog Content > Blog Safelink Mu > Safelinku
bntr kalo gitu tinggal match condition di script safelink mu
kukira lgsg
Blog Content > Ouo
Klo lgsg exceptnya diisi
wait masih sibuk mungkin malaman nnti ku test
Ubah Btn Event Clicknya jadi seperti ini
document.getElementById('btnLink').addEventListener("click", e =>{
if(atob(uri).indexOf('ouo') > -1){
window.open(atob(uri),newtab == true ? '_blank' : '_self');
}else{
window.open('Quick Link Safelinku' + +encodeURIComponent(atob(uri)),newtab == true ? '_blank' : '_self');
}
});
kalo JS nya beda kamu sesuain ya cuma main condition doang untuk match apakah pake Ouo atau bukan
if(atob(uri).indexOf('ouo') > -1){
// hal yang dilakukan jika terdapat text ouo
}else if(atob(uri).indexOf('semawur') > -1){
// hal yang dilakukan jika terdapat text semawur
}else{
// hal yang dilakukan jika ke-2nya tidak benar
}
nah jika isi content nya sama (hal yang dilakukan)
bisa gunain tanda ||
if(atob(uri).indexOf('ouo') > -1 || atob(uri).indexOf('semawur') > -1){
// hal yang dilakukan jika terdapat text ouo atau semawur
}else{
// hal yang dilakukan jika condition-nya salah
}
https://sitemap001.blogspot.com/
1. Script lainnya error. setelah ku cek ada script di blogmu yg error di function listPost(json) jika dilihat dari Console log
2. Script di atas letakkan di bagian atas /body bukan head
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzblYmg3xe8H-QbLL7cY16h2lRrIGtKXg8BLLimKt4PsFjAKa8hds89tH0lYES5eGpZhQWLg2znkcvCrEbpNpRn9SXR5j72B9YEm1HX3X0q206_n01KHaxpr5UPFvzCYQpK_SAFahOusXMsl-x5Tr6j_m7x3zXTRTiyqeyPyjHGc2i5oJ0y5erZ6xCig/s320/workd.png
yang link test ga bisa karena gara2 itu link google. dimana di except mu itu terdapat link google.com nya, coba kamu hapus di exceptnya nnti bakal ke generate/kebaca
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzblYmg3xe8H-QbLL7cY16h2lRrIGtKXg8BLLimKt4PsFjAKa8hds89tH0lYES5eGpZhQWLg2znkcvCrEbpNpRn9SXR5j72B9YEm1HX3X0q206_n01KHaxpr5UPFvzCYQpK_SAFahOusXMsl-x5Tr6j_m7x3zXTRTiyqeyPyjHGc2i5oJ0y5erZ6xCig/s1000/workd.png
thanks sudah bantu,
except=[location.hostname,'google.com','blogger.com'];
$.ajax({
url: 'https://sitemap001.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&max-results=150',
type: 'get',
dataType: 'jsonp',
success: function(json) {
let target = [];
for(var i = 0;i<json.feed.entry.length;i++){
var key = {};
feeds = json.feed.entry[parseInt(Math.random() * json.feed.entry.length)];
for(var e = 0;e<feeds.link.length;e++){
key['href'] = feeds.link[e].href;
}
target[i] = key;
}
var tagLink = document.getElementsByTagName("a");
for(var i=0;i<tagLink.length;i++){
if(tagLink[i].getAttribute('href')){
var getUrl = tagLink[i].getAttribute('href'),
url = except.find(uri =>{
return getUrl.replace('www.','').split('/')[2] === uri;
});
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? target[parseInt(Math.random() * target.length)].href+'#?o='+btoa(getUrl) : getUrl);
}
}
}
});
tpi kalo seandainnya tnpa generate link bisa tidak, maksu saya biar linknya aja supaya kaya bitly dll gitu..?
Contohnya; saya punya web streaming dan link streaming nya menuju ke blog safelink, tpi ketika (go to link) di klik bukan ngebukak link melain kan membuka link di dalam iframe, gtu...
link (go to link) ini masuk ke ifame yg full iframe atau pop up iframe gtu...
Thanks, semoga ada caranya...
$("a#allmirror").click(function(e){e.preventDefault();$("a.server").removeClass("cur");$(this).addClass("cur");$("#plyr").attr("src",$(this).attr("data-video"));$("#plyr").show(500);});
kalo link acefile pakai link ouo, kalo gdrive pakai safelinku, kalo zippyshare pakai exe.
makasih sebelumnya
<a href='googledrive.ini'>GoogleDrive</a>
<a href='mega.ini'>Mega</a>
<a href='safedrive.ini'>Safedrive</a>
<a href='zippy.ini'>Zippy</a>
<script>
let tag = document.getElementsByTagName('a'),
result = '';
for(let i=0;i<tag.length;i++){
if(tag[i].getAttribute('href') == 'googledrive.ini'){
result = 'Pake Safelinku';
}else if(tag[i].getAttribute('href') == 'mega.ini'){
result = 'Pake Ouo';
}else if(tag[i].getAttribute('href') == 'safedrive.ini'){
result = 'Pake Bitly';
}else{
result = 'ga pake apa2';
}
tag[i].setAttribute('href', 'https://linkakanmenuju.com/' + result);
}
</script>
tinggal kamu atur aja di script MainBlog.js
let tag = document.getElementsByTagName('a'),
result = '';
for(let i=0;i<tag.length;i++){
if(tag[i].getAttribute('href') == 'acefile.co'){
result = '/p/safelinku.html#?o=';
}else if(tag[i].getAttribute('href') == 'drive.google.com'){
result = '/p/ouo.html#?o=';
}else if(tag[i].getAttribute('href') == 'mitedrive.my.id'){
result = '/p/safelink.html#?o=';
}else{
result = 'ga pake apa2';
}
tag[i].setAttribute('href', 'https://www.linktujuan.com' + result);
}
$.ajax({
url: location.protocol + '//' + location.hostname + '/feeds/posts/default?orderby=published&alt=json-in-script&max-results=150',
type: 'get',
dataType: 'jsonp',
success: function(json) {
let target = [];
for(var i = 0;i<json.feed.entry.length;i++){
var key = {},linkuri='';
feeds = json.feed.entry[parseInt(Math.random() * json.feed.entry.length)];
for(var e = 0;e<feeds.link.length;e++){
key['href'] = feeds.link[e].href;
}
target[i] = key;
}
var tagLink = document.getElementsByTagName("a");
for(var i=0;i<tagLink.length;i++){
if(tagLink[i].getAttribute('href')){
var getUrl = tagLink[i].getAttribute('href'),
url = except.find(uri =>{
return getUrl.replace('www.','').split('/')[2] === uri;
});
if(getUrl.replace('www.','').split('/')[2] == 'ace.com'){
linkuri='https://www.o.com/' + encodeURIComponent(getUrl);
}else if(getUrl.replace('www.','').split('/')[2] == 'gd.com'){
linkuri='https://www.se.com/' + encodeURIComponent(getUrl);
}else if(getUrl.replace('www.','').split('/')[2] == 'zip.com'){
linkuri='https://www.e.com/' + encodeURIComponent(getUrl);
}else{
linkuri = target[parseInt(Math.random() * target.length)].href +'#?o='+btoa(getUrl);
}
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? linkuri : getUrl);
}
}
}
});
if(window.location.href.indexOf('#?o=') > -1){
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe;
if(getUrl.replace('www.','').split('/')[2] == 'ace.com'){
linkuri='https://www.o.com/' + encodeURIComponent(atob(uri));
}else if(getUrl.replace('www.','').split('/')[2] == 'gd.com'){
linkuri='https://www.se.com/' + encodeURIComponent(atob(uri));
}else if(getUrl.replace('www.','').split('/')[2] == 'zip.com'){
linkuri='https://www.e.com/' + encodeURIComponent(atob(uri));
}else{
linkuri = atob(uri);
}
$('#containerSafe').removeClass('none');
const newtab = true;
let countdown = 10;
var timer = setInterval(()=>{
$('#timer span').html(countdown--);
$('.circle_animation').css('stroke-dashoffset', 440-((countdown+1)*(440/10)));
if(countdown < 0){
$('#containerSafe div:nth-child(1)').html('Link Successfully Generate');
$('#btnLink').removeClass('none');
document.getElementById('btnLink').addEventListener("click", e =>{window.open(linkuri,newtab == true ? '_blank' : '_self');});
clearInterval(timer);
}
}, 1000);
}else{
$('#containerSafe').remove();
}
const tomorrow = new Date().setDate(new Date().getDate() + 1),
date = new Date(tomorrow).toUTCString();
if(localStorage.safelink == null){
localStorage.setItem("safelink", date);
// Silahkan Sesuin apa yg di mau jika User Pertama kali datang
}else{
if(localStorage.safelink == new Date().toUTCString()){
localStorage.setItem("safelink", date);
// Silahkan Sesuin apa yg di mau,jika sudah 24jam
}else{
// Silahkan Sesuin apa yg di mau,jika belum 24jam
}
}
gajadi pake cookie karena ga bisa ngambil expiry time nya jadi pake localstorage aja
script safelink saya gini, bisa di terapin gak?
if(window.location.href.indexOf('#?o=') > -1){
var onloadCallback = function() {
grecaptcha.render('recaptcha', {
'sitekey' : 'API-KEY'
});
};
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe;
$('#containerSafe').removeClass('none');
const newtab = false;
let countdown = 0;
var correctCaptcha = function(response) {
var timer = setInterval(()=>{
$('#timer span').html(countdown--);
if(countdown < 0){
$('#btnLink')['removeClass']('none');
$('#timer')['addClass']('none');
$('#recaptcha')['addClass']('none');
document.getElementById('btnLink').addEventListener("click", e =>{window.open('https://semawur.com/st/?api=API-KEY&url='+encodeURIComponent(atob(uri)),newtab == true ? '_blank' : '_self');});
clearInterval(timer);
}
}, 1000);
}
}else{
$('#containerSafe').remove();
}
if(window.location.href.indexOf('#?o=') > -1){
var onloadCallback = function() {
grecaptcha.render('recaptcha', {
'sitekey' : 'API-KEY'
});
};
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe,
let urinew = '';
const tomorrow = new Date().setDate(new Date().getDate() + 1);
if(localStorage.safelink == null){
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau jika User Pertama kali datang
urinew = 'https://semawur.com/st/?api=API-KEY&url='+encodeURIComponent(atob(uri));
}else{
if(localStorage.safelink <= new Date().setDate(new Date().getDate())){
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau,jika sudah 24jam
urinew = 'https://semawur.com/st/?api=API-KEY&url='+encodeURIComponent(atob(uri));
}else{
// Silahkan Sesuin apa yg di mau,jika belum 24jam
urinew = 'http://ouo.io/qs/YOURKEY?s='+atob(uri);
}
}
$('#containerSafe').removeClass('none');
const newtab = false;
let countdown = 0;
var correctCaptcha = function(response) {
var timer = setInterval(()=>{
$('#timer span').html(countdown--);
if(countdown < 0){
$('#btnLink')['removeClass']('none');
$('#timer')['addClass']('none');
$('#recaptcha')['addClass']('none');
document.getElementById('btnLink').addEventListener("click", e =>{window.open(urinew,newtab == true ? '_blank' : '_self');});
clearInterval(timer);
}
}, 1000);
}
}else{
$('#containerSafe').remove();
}
untuk locastorage untuk patokan 24jam di atas salah ya yg benar ada di dalam script ini
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe,
let urinew = '';
jadi begini :
const uri = location.href.substr((location.href.indexOf('#?o='))+4) != null ? location.href.substr((location.href.indexOf('#?o='))+4) : getSafe;
let urinew = '';
diblogger itu safelink ckup index pada linknya, jika di linknya ada text "?#o=" otomatis script yg kamu tag(replies) itu bakal bekerja
jadi dimanapun bisa kamu pakai
kalo penulisan scriptnya jadi gimana ya?
except=['facebook.com','twitter.com','api.whatsapp.com','telegram.me','trakteer.id','ouo.io','semawur.com'];
var tagLink = document.getElementsByTagName("a");
for(var i=0;i{
return getUrl.replace('www.','').split('/')[2] === uri;
});
const tomorrow = new Date().setDate(new Date().getDate() + 1);
if(localStorage.safelink == null){
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau jika User Pertama kali datang
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? 'https://semawur.com/st/?api=XXX&url='+encodeURIComponent((getUrl)) : getUrl);
}else{
if(localStorage.safelink <= new Date().setDate(new Date().getDate())){
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau,jika sudah 24jam
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? 'https://semawur.com/st/?api=XXX&url='+encodeURIComponent((getUrl)) : getUrl);
}else{
// Silahkan Sesuin apa yg di mau,jika belum 24jam
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? 'https://ouo.io/qs/XXX?s='+encodeURIComponent((getUrl)) : getUrl);
}
}
}}
Tadi saya nyoba edit scriptnya jadi gini min, tapi cuma yang ouo yang jalan, safelinku gak jalan. Mohon koreksinya min...
except = ['facebook.com', 'twitter.com', 'api.whatsapp.com', 'telegram.me', 'trakteer.id', 'ouo.io', 'semawur.com'];
var tagLink = document.getElementsByTagName("a");
for (var i = 0; i < tagLink.length; i++) {
if (tagLink[i].getAttribute('href')) {
var getUrl = tagLink[i].getAttribute('href'),
url = except.find(uri => {
return getUrl.replace('www.', '').split('/')[2] === uri;
});
const tomorrow = new Date().setDate(new Date().getDate() + 1);
if (localStorage.safelink == null) {
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau jika User Pertama kali datang
tagLink[i].setAttribute('href', url == undefined && getUrl.indexOf("://") > -1 ? 'https://semawur.com/st/?api=XXX&url=' + encodeURIComponent((getUrl)) : getUrl);
} else {
if (localStorage.safelink <= new Date().setDate(new Date().getDate())) {
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau,jika sudah 24jam
tagLink[i].setAttribute('href', url == undefined && getUrl.indexOf("://") > -1 ? 'https://semawur.com/st/?api=XXX&url=' + encodeURIComponent((getUrl)) : getUrl);
} else {
// Silahkan Sesuin apa yg di mau,jika belum 24jam
tagLink[i].setAttribute('href', url == undefined && getUrl.indexOf("://") > -1 ? 'https://ouo.io/qs/XXX?s=' + encodeURIComponent((getUrl)) : getUrl);
}
}
}
}
except=['google.com','blogger.com','w3schools.com'];
const tomorrow = new Date().setDate(new Date().getDate() + 1);
let urinew = '';
if(localStorage.safelink == null){
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau jika User Pertama kali datang
urinew = 'https://semawur.com/st/?api=API-KEY&url=';
}else{
if(localStorage.safelink <= new Date().setDate(new Date().getDate())){
localStorage.setItem("safelink", tomorrow);
// Silahkan Sesuin apa yg di mau,jika sudah 24jam
urinew = 'https://semawur.com/st/?api=API-KEY&url=';
}else{
// Silahkan Sesuin apa yg di mau,jika belum 24jam
urinew = 'http://ouo.io/qs/YOURKEY?s=';
}
}
let tagLink = document.getElementsByTagName("a");
for(let i=0;i<tagLink.length;i++){
if(tagLink[i].getAttribute('href')){
const getUrl = tagLink[i].getAttribute('href'),
url = except.find(uri =>{
return getUrl.replace('www.','').split('/')[2] === uri;
});
tagLink[i].setAttribute('href',url == undefined && getUrl.indexOf("://") > -1 ? urinew + getUrl : getUrl);
}
}
Gini bener gak bang? sama biar url nya gak bisa di skip sama ektensi universall bypass, bisa gak bang?
aku gatau apa yang kamu maksud masalah method='get',
dan agar ga bisa di copas bisa diakali dengan menyimpan link pada array, lalu waktu click btn/link ambil datanya lewat array yang diredirect menggunakan location.href / window.open
<style>
a{color:blue;cursor:pointer;}
</style>
<a href='a.com'>a.com</a>
<a href='b.com'>b.com</a>
<a href='c.com'>c.com</a>
<a href='d.com'>d.com</a>
<script>
let link = document.getElementsByTagName('a'),arr=[];
for(let i = 0;i<link.length;i++){
arr[i] = link[i].getAttribute('href');
link[i].removeAttribute('href');
link[i].addEventListener('click',function(){
alert(arr[i]);
});
}
</script>
minusnya cuma kalo dia inspect element aja
dm aja admin/support di discord -X- Zone kalo blogmu bersifat privasi
Similar Threads