document.addEventListener("DOMContentLoaded", function() { const links = document.querySelectorAll('article a'); // Lấy tất cả các thẻ trong bài viết links.forEach(function(link) { if (link.hostname !== window.location.hostname) { link.setAttribute('target', '_blank'); // Mở các liên kết ngoài trong tab mới } }); });