SAFELINK PAGE AUTOMATIC FOR BLOGGER

SafeLink Page Automatic For Blogger




ဒါကမိမိ site သို့ဝင်လာတဲ့ user တစ်ယောက်ရဲ့အမြင်ကိုဆွဲ‌‌ ဆောင်နိုင့်တဲ့ပုံစံမျိုးပါ။


ပထမဦးစွာ SafeLink Page တစ်ခုကိုအရင်ဖန်တီးပါ

  1. dashboard ထဲ Pages ကိုနှိပ်
  2. < > HTML view ကိုနှိပ်
  3. Page Title ကို SafeLink လို့ရေးပါ
  4. အောက်က code ကို copy ယူ၍ထည့်ပါ

<h2>Please Wait — Safe Link Redirect</h2>
<p>Original Link: <span id="realLink"></span></p>
<button id="continueBtn" style="padding:12px 20px;background:#2196F3;color:#fff;border:none;border-radius:5px;cursor:pointer;">Continue</button>
<script>//<![CDATA[
document.addEventListener("DOMContentLoaded", function () {
  const encoded = new URL(window.location.href).searchParams.get("url");
  if (!encoded) {
    alert("URL missing!");
    return;
  }
  let originalUrl = "";
  try { originalUrl = atob(encoded); } catch(e) { alert("Invalid link!"); return; }
  document.getElementById("realLink").textContent = originalUrl;
 document.getElementById("continueBtn").addEventListener("click", function () {
    window.location.href = "/p/download.html?url=" + encodeURIComponent(encoded);
  });
});
//]]></script>

ဒုတိယအနေနဲ့ Download Page တခုကိုဖန်တီးပါ

  1. dashboard ထဲ Pages ကိုနှိပ်
  2. < > HTML view ကိုနှိပ်
  3. Page Title ကို Download လို့ရေးပါ
  4. အောက်က code ကို copy ယူ၍ထည့်ပါ

<style>
.box{max-width:400px;margin:auto;padding:20px;border:1px solid #ddd;border-radius:8px;text-align:center;}
button{padding:10px 20px;background:#009688;border:none;color:#fff;font-size:16px;border-radius:5px;cursor:pointer;}
button:disabled{background:#aaa;}
</style>
<script>//<![CDATA[
function getParam(n){
  const url = new URL(window.location.href);
  return url.searchParams.get(n);
}
let time = 10;
function countdown(){
  const btn = document.getElementById("downloadBtn");
  btn.innerText = "Please wait " + time + " sec...";
  if(time > 0){
    time--;
    setTimeout(countdown,1000);
  }else{
    const encoded = getParam("url");
    const final = atob(encoded);
    btn.innerText = "Download Now";
    btn.disabled = false;
    btn.onclick = ()=> window.location.href = final;
  }
}
window.onload = countdown;
//]]></script>
<div class="box">
<h3>Your download is ready</h3>
<p>Preparing link...</p>
<button id="downloadBtn" disabled></button>
</div>

  1. dashboard ထဲ Theme ကိုနှိပ်
  2. 🔽 ကိုနှိပ်၍ Edit HTML ကို ရွေးနှိပ်ပါ
  3. </body> ကိုရှာပါ။တွေ့ရင်အောက်က code ကို copy ယူ၍အဲဒီ </body> အပေါ်ကထည့်ပါ

<script>//<![CDATA[
const safelink = "https://YOURBLOG.blogspot.com/p/safelink.html?url=";
document.addEventListener("DOMContentLoaded", () => {
  const domain = window.location.hostname;
document.querySelectorAll("a[href]").forEach(a => {
    let link = a.getAttribute("href");
    if (!link.startsWith("http")) return;
    if (link.includes(domain)) return;
   const encoded = btoa(link);
    a.setAttribute("href", safelink + encoded);
    a.setAttribute("rel", "nofollow noopener");
  });
});
//]]></script>

  1. https://YOURBLOG.blogspot.com/p/safelink.htmlနေရာမှာမိမိအပေါ်ကဖန်တီးထားတဲ့ safelink page link ထည့်ပါ
  2. ‌‌
  3. save ကိုနှိပ်

  1. မိမိထည့်သွင်းအသုံးပြုမဲ့ post ကို ရွေးချယ်၍အောက်က code ကို copy ယူ၍ထည့်ပါ
  2. ‌‌‌‌
<a href="Your-Target-Link-Here" style="padding:12px 20px; background:#2196F3; color:#fff; text-decoration:none; border-radius:5px;">Download</a>

  1. Your-Target-Link-Hereနေရာမှာမိမိ target လုပ်မဲ့ link ဖြင့်အစားထိုးပါ
  2. ▶️ save ကိုနှိပ်ပြီးပြီ


Post a Comment