‹ SMP Finder
Post your SMP
Listings are checked before they appear and stay up for 21 days. Contact happens through your Discord invite only.
Checking your account…
Thanks, your listing was sent for review. It appears on the list once it is approved. You can follow its status below.
Stay safe when joining a group
- Contact happens on the group’s Discord only. Listings never show personal accounts, emails or phone numbers.
- Do not share your age, real name, school, address or photos with people you meet in a group.
- Leave and report any group that asks to move to private chats, asks for personal details, or asks for money.
- If you are under 18, tell a parent or guardian before you join a new group.
- Every listing has a Report button. Listings reported by several people are hidden until we review them.
"']/g, function (c) { return { '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]; }); }
/* Lay ve ky: uu tien ban n9acc.js da giu trong sessionStorage; khong co thi hoi thang www. */
function veTuKho() {
try {
var r = JSON.parse(sessionStorage.getItem('n9acc') || 'null');
if (r && r.ve && r.het > Date.now()) return r.ve;
} catch (e) { /* bo qua */ }
return '';
}
function layVe(ep) {
var v = ep ? '' : veTuKho();
if (v) return Promise.resolve(v);
return fetch(WWW + '/?n9id=me', { credentials: 'include', cache: 'no-store' })
.then(function (r) { return r.json(); })
.then(function (d) { return d && d.vao && d.ve ? d.ve : ''; })
.catch(function () { return ''; });
}
function goi(duong, than, canVe, lai) {
return (canVe === false ? Promise.resolve('') : layVe(lai)).then(function (ve) {
var o = { method: than ? 'POST' : 'GET', cache: 'no-store', headers: {} };
if (ve) o.headers['X-N9'] = ve;
if (than) { o.headers['Content-Type'] = 'application/json'; o.body = JSON.stringify(than); }
return fetch(duong, o).then(function (r) {
if (r.status === 401 && !lai && canVe !== false) return goi(duong, than, canVe, true);
return r.json().then(function (j) { j._ma = r.status; return j; }, function () { return { ok: false, _ma: r.status }; });
});
});
}
var NHAN = { cho: 'Waiting for review', hien: 'Live', tu_choi: 'Not approved', an: 'Hidden for review', dong: 'Closed', het: 'Expired' };
function veCuaToi() {
goi('/api/nhom/cua-toi').then(function (d) {
if (!d || !d.ok || !d.ds || !d.ds.length) return;
$('nh-cua-toi').hidden = false;
var coMoi = d.ds.some(function (x) { return x.chua_xem; });
$('nh-ds-toi').innerHTML = d.ds.map(function (x) {
return '' + (x.url ? '' + esc(x.tieu_de) + '' : esc(x.tieu_de)) + ''
+ '
' + (x.chua_xem ? 'New: ' : '') + esc(NHAN[x.tt] || x.tt) + ' '
+ '
Sent ' + esc(x.tao) + (x.tt === 'hien' && x.het ? ' · listed until ' + esc(x.het) : '')
+ (x.ly_do ? ' · ' + esc(x.ly_do) : '') + '
'
+ (x.gh ? '
' : '')
+ (x.tt === 'cho' || x.tt === 'hien' ? '
' : '')
+ '
';
}).join('');
if (coMoi) goi('/api/nhom/da-xem', {}); /* da hien cho nguoi dang thay => danh dau da xem */
});
}
function trangMoi() {
var f = $('nh-form'), cho = $('nh-cho'), khach = $('nh-khach');
layVe(false).then(function (ve) {
cho.hidden = true;
if (!ve) { khach.hidden = false; return; }
f.hidden = false;
veCuaToi();
});
var mo = f.elements.mo_ta;
mo.addEventListener('input', function () { $('nh-so').textContent = mo.value.length; });
$('nh-ds-toi').addEventListener('click', function (e) {
var g = e.target.closest ? e.target.closest('.nh-gh') : null;
if (g) {
g.disabled = true;
goi('/api/nhom/gia-han', { id: parseInt(g.getAttribute('data-id'), 10) }).then(function (j) {
if (!(j && j.ok)) window.alert((j && j.loi) || 'Could not renew the listing. Try again.');
veCuaToi();
});
return;
}
var b = e.target.closest ? e.target.closest('.nh-dg') : null;
if (!b) return;
if (!window.confirm('Close this listing? It will be removed from the list.')) return;
b.disabled = true;
goi('/api/nhom/dong', { id: parseInt(b.getAttribute('data-id'), 10) }).then(veCuaToi);
});
f.addEventListener('submit', function (e) {
e.preventDefault();
var loi = $('nh-loi'), nut = f.querySelector('button[type=submit]');
loi.hidden = true;
var d = { nen: [] };
Array.prototype.forEach.call(f.elements, function (el) {
if (!el.name) return;
if (el.type === 'checkbox') {
if (el.name === 'nen') { if (el.checked) d.nen.push(el.value); }
else d[el.name] = el.checked;
} else d[el.name] = el.value;
});
nut.disabled = true;
goi('/api/nhom/dang', d).then(function (j) {
nut.disabled = false;
if (j && j.ok) {
f.hidden = true; $('nh-xong').hidden = false;
veCuaToi();
try { $('nh-xong').scrollIntoView({ block: 'center' }); } catch (e2) { /* bo qua */ }
return;
}
loi.textContent = (j && j.loi) || 'Could not send the listing. Check your connection and try again.';
loi.hidden = false;
try { loi.scrollIntoView({ block: 'center' }); } catch (e3) { /* bo qua */ }
});
});
}
function trangCT() {
var f = $('nh-bao-form');
if (!f) return;
f.addEventListener('submit', function (e) {
e.preventDefault();
var kq = $('nh-bao-kq'), nut = f.querySelector('button');
nut.disabled = true;
goi('/api/nhom/bao', { id: C.id, ly_do: f.elements.ly_do.value }).then(function (j) {
kq.textContent = j && j.ok ? 'Thanks. We will look at this listing.'
: (j && j._ma === 429 ? 'You have sent a lot of reports today. Try again tomorrow.' : 'Could not send the report. Try again.');
if (!(j && j.ok)) nut.disabled = false;
});
});
}
function chay() {
if (C.trang === 'moi') trangMoi();
if (C.trang === 'ct') trangCT();
}
if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', chay);
else chay();
})();