বর্তমান সময়ে ওয়েব কনটেন্ট চুরি এক সাধারণ সমস্যা হয়ে দাঁড়িয়েছে। আপনি যতো কষ্ট করে একটি ব্লগ লিখেন, কেউ তা এক ক্লিকে কপি করে নিজের নামে চালিয়ে দেয়।
এই সমস্যা থেকে রক্ষা পেতে আপনাকে ব্যবহার করতে হবে একটি শক্তিশালী Copy Protection Script এবং DMCA ব্যাজ। এই পোস্টে আমরা শেখাবো কীভাবে আপনি Blogger বা যেকোনো HTML সাইটে এটি যুক্ত করবেন।
✅ আপনি যা শিখবেন
- Copy, Cut, Right Click ও Ctrl+C ব্লক করা
- Copy করলে এলার্ট বক্স দেখানো
- ক্লিপবোর্ডে কাস্টম বার্তা বা পোস্ট লিংক বসানো
- DMCA ব্যাজ যুক্ত করা
🔧 স্ক্রিপ্ট যুক্ত করার ধাপ
- Blogger এ যান, থিম > Edit HTML খুলুন
</body>
ট্যাগ খুঁজুন- তার উপরে নিচের স্ক্রিপ্ট ও স্টাইল কোডটি বসান
📜 কপি প্রোটেকশন কোড (CDATA সহ)
<script type="text/javascript">
//<![CDATA[
(function () {
function createAlertBox() {
const alertBox = document.createElement('div');
alertBox.id = 'copy-protection-alert';
alertBox.style.cssText = `position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:999999;display:flex;justify-content:center;align-items:center;opacity:0;pointer-events:none;transition:opacity 0.3s ease;`;
alertBox.innerHTML = `
<div class="alert-content" style="background:white;border-radius:12px;width:90%;max-width:400px;box-shadow:0 10px 30px rgba(0,0,0,0.2);transform:translateY(20px);transition:transform 0.3s ease;">
<div class="alert-header" style="background:#ff4444;padding:20px;color:white;display:flex;align-items:center;">
<h3 style="margin:0;font-size:18px;">Copy Disabled</h3>
</div>
<div class="alert-body" style="padding:25px 20px;text-align:center;">
<p>এই কনটেন্ট কপিরাইট ও DMCA দ্বারা সুরক্ষিত।</p>
<a href="https://www.dmca.com/Protection/Status.aspx?ID=YOUR-ID" target="_blank">
<img src="https://images.dmca.com/Badges/dmca_protected_16_120.png?ID=YOUR-ID" alt="DMCA.com Protection Status">
</a>
<br><br>
<button id="protection-alert-close" style="padding:8px 20px;background:#ff4444;color:white;border:none;border-radius:6px;cursor:pointer;">OK</button>
</div>
</div>
`;
document.body.appendChild(alertBox);
document.getElementById('protection-alert-close').addEventListener('click', hideAlert);
alertBox.addEventListener('click', function (e) {
if (e.target === alertBox) hideAlert();
});
}
function showAlert() {
const alertBox = document.getElementById('copy-protection-alert');
if (!alertBox) createAlertBox();
const alertContent = document.querySelector('#copy-protection-alert .alert-content');
alertBox.style.opacity = '1';
alertBox.style.pointerEvents = 'auto';
alertContent.style.transform = 'translateY(0)';
setTimeout(hideAlert, 5000);
}
function hideAlert() {
const alertBox = document.getElementById('copy-protection-alert');
if (!alertBox) return;
const alertContent = document.querySelector('#copy-protection-alert .alert-content');
alertBox.style.opacity = '0';
alertBox.style.pointerEvents = 'none';
alertContent.style.transform = 'translateY(20px)';
}
function initCopyProtection() {
document.addEventListener('copy', function (e) {
showAlert();
e.preventDefault();
const customText = `📢 কনটেন্টটি কপিরাইট সুরক্ষিত।
🔗 Source: ${window.location.href}
© Digital Donia`;
e.clipboardData.setData('text/plain', customText);
});
document.addEventListener('cut', function (e) { showAlert(); e.preventDefault(); });
document.addEventListener('contextmenu', function (e) { showAlert(); e.preventDefault(); });
document.addEventListener('keydown', function (e) {
if (e.ctrlKey && ['c', 'C', 'x', 'X'].includes(e.key)) {
showAlert(); e.preventDefault();
}
});
document.addEventListener('selectstart', function (e) { e.preventDefault(); });
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', initCopyProtection);
} else {
initCopyProtection();
}
})();
//]]>
</script>
<style type="text/css">
#copy-protection-alert .alert-content {
animation: alertSlideIn 0.4s ease-out forwards;
}
@keyframes alertSlideIn {
0% { opacity: 0; transform: translateY(20px); }
100% { opacity: 1; transform: translateY(0); }
}
#protection-alert-close:hover {
background: #cc0000 !important;
}
body {
user-select: none;
-webkit-user-select: none;
}
@media (max-width: 480px) {
#copy-protection-alert .alert-content {
width: 95%;
}
}
</style>
📌 শেষ কথা
এই স্ক্রিপ্ট আপনার ব্লগের কনটেন্ট চুরি ঠেকাতে কার্যকর ভূমিকা রাখবে। কাস্টম বার্তা ও DMCA ব্যাজ সংযুক্ত থাকায় এটি আরও প্রফেশনাল দেখায়।
আপনার কনটেন্ট, আপনার সম্পদ — কপি চোরদের রুখুন!