Delete script.js
Browse files
script.js
DELETED
|
@@ -1,67 +0,0 @@
|
|
| 1 |
-
const DATA = [{"name": "أروى سعيد بن عبدالله القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/37.html"}, {"name": "أسماء درويش سالم الدوسري", "url": "https://stat2025-map.static.hf.space/BCS/15.html"}, {"name": "أمل احمد محمد مجرشي", "url": "https://stat2025-map.static.hf.space/BCS/28.html"}, {"name": "أمل بنت علي بن علي السماعيل", "url": "https://stat2025-map.static.hf.space/BCS/07.html"}, {"name": "أمل جعفر بن علي آل حماد", "url": "https://stat2025-map.static.hf.space/BCS/30.html"}, {"name": "أمل صالح بن احمد آل مزعل", "url": "https://stat2025-map.static.hf.space/BCS/47.html"}, {"name": "ابرار بنت يوسف بن علي آل حماد", "url": "https://stat2025-map.static.hf.space/BCS/44.html"}, {"name": "احلام صالح معيوض العصيمي", "url": "https://stat2025-map.static.hf.space/BCS/16.html"}, {"name": "اسعد بن ماجد بن احمد الهاشم", "url": "https://stat2025-map.static.hf.space/BCS/46.html"}, {"name": "اسماء بنت محمد بن حسين العدساني", "url": "https://stat2025-map.static.hf.space/BCS/09.html"}, {"name": "ايمان عبدالعزيز بن صالح الصالح", "url": "https://stat2025-map.static.hf.space/BCS/40.html"}, {"name": "باسمه احمد بن محمد القرني", "url": "https://stat2025-map.static.hf.space/BCS/21.html"}, {"name": "باقر عبدالله بن هاشم الهاشم", "url": "https://stat2025-map.static.hf.space/BCS/11.html"}, {"name": "تركي وحيد بن عيسى المحيفيظ", "url": "https://stat2025-map.static.hf.space/BCS/01.html"}, {"name": "حسن عادل بن حسين الوصيبعي", "url": "https://stat2025-map.static.hf.space/BCS/03.html"}, {"name": "زكي بن عيسى بن عبدالله القفاص", "url": "https://stat2025-map.static.hf.space/BCS/51.html"}, {"name": "زهراء بنت عايش بن علي الصاهود", "url": "https://stat2025-map.static.hf.space/BCS/33.html"}, {"name": "ساره خالد سليمان المحيسن", "url": "https://stat2025-map.static.hf.space/BCS/35.html"}, {"name": "ساره راشد عبدالله المديني", "url": "https://stat2025-map.static.hf.space/BCS/34.html"}, {"name": "ساره عبدالحميد بن حسين البوحمد", "url": "https://stat2025-map.static.hf.space/BCS/12.html"}, {"name": "سميه رياض بن عبدالله البراك", "url": "https://stat2025-map.static.hf.space/BCS/39.html"}, {"name": "سميه سامى بن احمد النعيم", "url": "https://stat2025-map.static.hf.space/BCS/05.html"}, {"name": "شريفه ابراهيم بن عبدالله العقيل", "url": "https://stat2025-map.static.hf.space/BCS/41.html"}, {"name": "شيماء عبدالرحمن بن دحباش سودي", "url": "https://stat2025-map.static.hf.space/BCS/19.html"}, {"name": "صالح دلي الشمري", "url": "https://stat2025-map.static.hf.space/BCS/48.html"}, {"name": "طيبه فالح بن عبدالله الرويشد", "url": "https://stat2025-map.static.hf.space/BCS/31.html"}, {"name": "عائشه سليمان بن نايف الحربي", "url": "https://stat2025-map.static.hf.space/BCS/13.html"}, {"name": "عبدالله خلف الجدعان", "url": "https://stat2025-map.static.hf.space/BCS/49.html"}, {"name": "عقيله محمدحسين بن علي الجباره", "url": "https://stat2025-map.static.hf.space/BCS/06.html"}, {"name": "علياء فيصل بن محمد الكثيري", "url": "https://stat2025-map.static.hf.space/BCS/36.html"}, {"name": "غدير عبدالعزيز بن سعد القاسم", "url": "https://stat2025-map.static.hf.space/BCS/38.html"}, {"name": "فارس ثاني الشمري", "url": "https://stat2025-map.static.hf.space/BCS/50.html"}, {"name": "فاطمه حسين بن ابراهيم القرقوش", "url": "https://stat2025-map.static.hf.space/BCS/45.html"}, {"name": "فايزه محمد مسعود الحازمي", "url": "https://stat2025-map.static.hf.space/BCS/32.html"}, {"name": "فيصل تركي فيصل القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/18.html"}, {"name": "لطيفه صالح بن عبدالرحمن العبد القادر", "url": "https://stat2025-map.static.hf.space/BCS/25.html"}, {"name": "لطيفه علي بن حسين النعيم", "url": "https://stat2025-map.static.hf.space/BCS/29.html"}, {"name": "لين أحمد بن عبدالعزيز القصير", "url": "https://stat2025-map.static.hf.space/BCS/22.html"}, {"name": "محمد دبيان بن مفرج الشمري", "url": "https://stat2025-map.static.hf.space/BCS/27.html"}, {"name": "مرتضى عبدالجليل بن عيسى الحكيم", "url": "https://stat2025-map.static.hf.space/BCS/43.html"}, {"name": "مصطفى احمد بن جمعه الرمضان", "url": "https://stat2025-map.static.hf.space/BCS/10.html"}, {"name": "ممدوح مشعل ضيف الله الصخري", "url": "https://stat2025-map.static.hf.space/BCS/26.html"}, {"name": "منيره سعد بن احمد الجديدي", "url": "https://stat2025-map.static.hf.space/BCS/04.html"}, {"name": "منيره سعود بن عبدالعزيز القوز", "url": "https://stat2025-map.static.hf.space/BCS/42.html"}, {"name": "نبأ عادل بن عبدالكريم آل رضوان", "url": "https://stat2025-map.static.hf.space/BCS/23.html"}, {"name": "نجود عبدالعزيز بن عقيل العمري", "url": "https://stat2025-map.static.hf.space/BCS/20.html"}, {"name": "نوره عبدالله بن زهير الرزقي", "url": "https://stat2025-map.static.hf.space/BCS/24.html"}, {"name": "نوره عبدالله بن مانع الخالدي", "url": "https://stat2025-map.static.hf.space/BCS/02.html"}, {"name": "نوف صالح بن محمد السميح", "url": "https://stat2025-map.static.hf.space/BCS/08.html"}, {"name": "نيللي حسين عبدالله الجعص", "url": "https://stat2025-map.static.hf.space/BCS/17.html"}, {"name": "وضحه خالد بن مشرف الخالدي", "url": "https://stat2025-map.static.hf.space/BCS/14.html"}];
|
| 2 |
-
|
| 3 |
-
function normalizeArabic(s){
|
| 4 |
-
if(!s) return "";
|
| 5 |
-
return String(s).toLowerCase()
|
| 6 |
-
.replace(/[\u064B-\u065F\u0670]/g,"")
|
| 7 |
-
.replace(/\u0640/g,"")
|
| 8 |
-
.replace(/[إأآٱ]/g,"ا")
|
| 9 |
-
.replace(/ى/g,"ي")
|
| 10 |
-
.replace(/ة/g,"ه")
|
| 11 |
-
.replace(/\s+/g," ")
|
| 12 |
-
.trim();
|
| 13 |
-
}
|
| 14 |
-
|
| 15 |
-
const q = document.getElementById("q");
|
| 16 |
-
const results = document.getElementById("results");
|
| 17 |
-
const count = document.getElementById("count");
|
| 18 |
-
const totalPill = document.getElementById("totalPill");
|
| 19 |
-
const toast = document.getElementById("toast");
|
| 20 |
-
|
| 21 |
-
totalPill.textContent = `إجمالي الروابط: ${DATA.length}`;
|
| 22 |
-
|
| 23 |
-
function showToast(){
|
| 24 |
-
toast.classList.add("show");
|
| 25 |
-
setTimeout(()=>toast.classList.remove("show"), 1200);
|
| 26 |
-
}
|
| 27 |
-
|
| 28 |
-
function copyLink(url){
|
| 29 |
-
navigator.clipboard.writeText(url).then(showToast);
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
function render(list, raw){
|
| 33 |
-
results.innerHTML="";
|
| 34 |
-
count.textContent = `النتائج: ${list.length}`;
|
| 35 |
-
list.forEach(item=>{
|
| 36 |
-
const row = document.createElement("div");
|
| 37 |
-
row.className="item";
|
| 38 |
-
row.innerHTML = `
|
| 39 |
-
<div>
|
| 40 |
-
<div class="name">${item.name}</div>
|
| 41 |
-
<div class="hint">رابط خريطة الباحث</div>
|
| 42 |
-
</div>
|
| 43 |
-
<div class="actions">
|
| 44 |
-
<a class="open" href="${item.url}" target="_blank">فتح الخريطة</a>
|
| 45 |
-
<button class="copy" data-url="${item.url}">نسخ الرابط</button>
|
| 46 |
-
</div>
|
| 47 |
-
`;
|
| 48 |
-
row.querySelector(".copy").onclick=()=>copyLink(item.url);
|
| 49 |
-
results.appendChild(row);
|
| 50 |
-
});
|
| 51 |
-
}
|
| 52 |
-
|
| 53 |
-
function search(){
|
| 54 |
-
const raw = q.value;
|
| 55 |
-
const nq = normalizeArabic(raw);
|
| 56 |
-
if(!nq){ results.innerHTML=""; count.textContent="النتائج: 0"; return; }
|
| 57 |
-
const tokens = nq.split(" ");
|
| 58 |
-
const matched = DATA.filter(d=>{
|
| 59 |
-
const n = normalizeArabic(d.name);
|
| 60 |
-
return tokens.every(t=>n.includes(t));
|
| 61 |
-
});
|
| 62 |
-
render(matched, raw);
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
document.getElementById("btnSearch").onclick=search;
|
| 66 |
-
document.getElementById("btnClear").onclick=()=>{q.value=""; results.innerHTML=""; count.textContent="النتائج: 0"; q.focus();};
|
| 67 |
-
q.addEventListener("input", ()=>{ clearTimeout(window.t); window.t=setTimeout(search,150); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|