stat2025 commited on
Commit
e140fbd
·
verified ·
1 Parent(s): bd0bfef

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +1 -206
script.js CHANGED
@@ -1,206 +1 @@
1
- const DATA = [
2
- {
3
- "name": "أروى سعيد بن عبدالله القحطاني",
4
- "url": "https://stat2025-map.static.hf.space/BCS/37.html"
5
- },
6
- {
7
- "name": "أسماء درويش سالم الدوسري",
8
- "url": "https://stat2025-map.static.hf.space/BCS/15.html"
9
- },
10
- {
11
- "name": "أمل احمد محمد مجرشي",
12
- "url": "https://stat2025-map.static.hf.space/BCS/28.html"
13
- },
14
- {
15
- "name": "أمل بنت علي بن علي السماعيل",
16
- "url": "https://stat2025-map.static.hf.space/BCS/07.html"
17
- },
18
- {
19
- "name": "أمل جعفر بن علي آل حماد",
20
- "url": "https://stat2025-map.static.hf.space/BCS/30.html"
21
- },
22
- {
23
- "name": "أمل صالح بن احمد آل مزعل",
24
- "url": "https://stat2025-map.static.hf.space/BCS/47.html"
25
- },
26
- {
27
- "name": "ابرار بنت يوسف بن علي آل حماد",
28
- "url": "https://stat2025-map.static.hf.space/BCS/44.html"
29
- },
30
- {
31
- "name": "احلام صالح معيوض العصيمي",
32
- "url": "https://stat2025-map.static.hf.space/BCS/16.html"
33
- },
34
- {
35
- "name": "اسعد بن ماجد بن احمد الهاشم",
36
- "url": "https://stat2025-map.static.hf.space/BCS/46.html"
37
- },
38
- {
39
- "name": "اسماء بنت محمد بن حسين العدساني",
40
- "url": "https://stat2025-map.static.hf.space/BCS/09.html"
41
- },
42
- {
43
- "name": "ايمان عبدالعزيز بن صالح الصالح",
44
- "url": "https://stat2025-map.static.hf.space/BCS/40.html"
45
- },
46
- {
47
- "name": "باسمه احمد بن محمد القرني",
48
- "url": "https://stat2025-map.static.hf.space/BCS/21.html"
49
- },
50
- {
51
- "name": "باقر عبدالله بن هاشم الهاشم",
52
- "url": "https://stat2025-map.static.hf.space/BCS/11.html"
53
- },
54
- {
55
- "name": "تركي وحيد بن عيسى المحيفيظ",
56
- "url": "https://stat2025-map.static.hf.space/BCS/01.html"
57
- },
58
- {
59
- "name": "حسن عادل بن حسين الوصيبعي",
60
- "url": "https://stat2025-map.static.hf.space/BCS/03.html"
61
- },
62
- {
63
- "name": "زكي بن عيسى بن عبدالله القفاص",
64
- "url": "https://stat2025-map.static.hf.space/BCS/51.html"
65
- },
66
- {
67
- "name": "زهراء بنت عايش بن علي الصاهود",
68
- "url": "https://stat2025-map.static.hf.space/BCS/33.html"
69
- },
70
- {
71
- "name": "ساره خالد سليمان المحيسن",
72
- "url": "https://stat2025-map.static.hf.space/BCS/35.html"
73
- },
74
- {
75
- "name": "ساره راشد عبدالله المديني",
76
- "url": "https://stat2025-map.static.hf.space/BCS/34.html"
77
- },
78
- {
79
- "name": "ساره عبدالحميد بن حسين البوحمد",
80
- "url": "https://stat2025-map.static.hf.space/BCS/12.html"
81
- },
82
- {
83
- "name": "سميه رياض بن عبدالله البراك",
84
- "url": "https://stat2025-map.static.hf.space/BCS/39.html"
85
- },
86
- {
87
- "name": "سميه سامى بن احمد النعيم",
88
- "url": "https://stat2025-map.static.hf.space/BCS/05.html"
89
- },
90
- {
91
- "name": "شريفه ابراهيم بن عبدالله العقيل",
92
- "url": "https://stat2025-map.static.hf.space/BCS/41.html"
93
- },
94
- {
95
- "name": "شيماء عبدالرحمن بن دحباش سودي",
96
- "url": "https://stat2025-map.static.hf.space/BCS/19.html"
97
- },
98
- {
99
- "name": "صالح دلي الشمري",
100
- "url": "https://stat2025-map.static.hf.space/BCS/48.html"
101
- },
102
- {
103
- "name": "طيبه فالح بن عبدالله الرويشد",
104
- "url": "https://stat2025-map.static.hf.space/BCS/31.html"
105
- },
106
- {
107
- "name": "عائشه سليمان بن نايف الحربي",
108
- "url": "https://stat2025-map.static.hf.space/BCS/13.html"
109
- },
110
- {
111
- "name": "عبدالله خلف الجدعان",
112
- "url": "https://stat2025-map.static.hf.space/BCS/49.html"
113
- },
114
- {
115
- "name": "عقيله محمدحسين بن علي الجباره",
116
- "url": "https://stat2025-map.static.hf.space/BCS/06.html"
117
- },
118
- {
119
- "name": "علياء فيصل بن محمد الكثيري",
120
- "url": "https://stat2025-map.static.hf.space/BCS/36.html"
121
- },
122
- {
123
- "name": "غدير عبدالعزيز بن سعد القاسم",
124
- "url": "https://stat2025-map.static.hf.space/BCS/38.html"
125
- },
126
- {
127
- "name": "فارس ثاني الشمري",
128
- "url": "https://stat2025-map.static.hf.space/BCS/50.html"
129
- },
130
- {
131
- "name": "فاطمه حسين بن ابراهيم القرقوش",
132
- "url": "https://stat2025-map.static.hf.space/BCS/45.html"
133
- },
134
- {
135
- "name": "فايزه محمد مسعود الحازمي",
136
- "url": "https://stat2025-map.static.hf.space/BCS/32.html"
137
- },
138
- {
139
- "name": "فيصل تركي فيصل القحطاني",
140
- "url": "https://stat2025-map.static.hf.space/BCS/18.html"
141
- },
142
- {
143
- "name": "لطيفه صالح بن عبدالرحمن العبد القادر",
144
- "url": "https://stat2025-map.static.hf.space/BCS/25.html"
145
- },
146
- {
147
- "name": "لطيفه علي بن حسين النعيم",
148
- "url": "https://stat2025-map.static.hf.space/BCS/29.html"
149
- },
150
- {
151
- "name": "لين أحمد بن عبدالعزيز القصير",
152
- "url": "https://stat2025-map.static.hf.space/BCS/22.html"
153
- },
154
- {
155
- "name": "محمد دبيان بن مفرج الشمري",
156
- "url": "https://stat2025-map.static.hf.space/BCS/27.html"
157
- },
158
- {
159
- "name": "مرتضى عبدالجليل بن عيسى الحكيم",
160
- "url": "https://stat2025-map.static.hf.space/BCS/43.html"
161
- },
162
- {
163
- "name": "مصطفى احمد بن جمعه الرمضان",
164
- "url": "https://stat2025-map.static.hf.space/BCS/10.html"
165
- },
166
- {
167
- "name": "ممدوح مشعل ضيف الله الصخري",
168
- "url": "https://stat2025-map.static.hf.space/BCS/26.html"
169
- },
170
- {
171
- "name": "منيره سعد بن احمد الجديدي",
172
- "url": "https://stat2025-map.static.hf.space/BCS/04.html"
173
- },
174
- {
175
- "name": "منيره سعود بن عبدالعزيز القوز",
176
- "url": "https://stat2025-map.static.hf.space/BCS/42.html"
177
- },
178
- {
179
- "name": "نبأ عادل بن عبدالكريم آل رضوان",
180
- "url": "https://stat2025-map.static.hf.space/BCS/23.html"
181
- },
182
- {
183
- "name": "نجود عبدالعزيز بن عقيل العمري",
184
- "url": "https://stat2025-map.static.hf.space/BCS/20.html"
185
- },
186
- {
187
- "name": "نوره عبدالله بن زهير الرزقي",
188
- "url": "https://stat2025-map.static.hf.space/BCS/24.html"
189
- },
190
- {
191
- "name": "نوره عبدالله بن مانع الخالدي",
192
- "url": "https://stat2025-map.static.hf.space/BCS/02.html"
193
- },
194
- {
195
- "name": "نوف صالح بن محمد السميح",
196
- "url": "https://stat2025-map.static.hf.space/BCS/08.html"
197
- },
198
- {
199
- "name": "نيللي حسين عبدالله الجعص",
200
- "url": "https://stat2025-map.static.hf.space/BCS/17.html"
201
- },
202
- {
203
- "name": "وضحه خالد بن مشرف الخالدي",
204
- "url": "https://stat2025-map.static.hf.space/BCS/14.html"
205
- }
206
- ];
 
1
+ // بيانات الروابط (تم توليدها من ملف Excel) const DATA = [{"name": "أحمد حمود محمد الحربي", "url": "https://stat2025-map.static.hf.space/BCS/59.html"}, {"name": "أروى سعيد بن عبدالله القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/29.html"}, {"name": "أماني مصطفى بن عبدالله الطيب", "url": "https://stat2025-map.static.hf.space/BCS/42.html"}, {"name": "أمل احمد محمد مجرشي", "url": "https://stat2025-map.static.hf.space/BCS/01.html"}, {"name": "أمل بنت علي بن علي السماعيل", "url": "https://stat2025-map.static.hf.space/BCS/50.html"}, {"name": "أمل جعفر بن علي آل حماد", "url": "https://stat2025-map.static.hf.space/BCS/40.html"}, {"name": "أمل صالح بن احمد آل مزعل", "url": "https://stat2025-map.static.hf.space/BCS/06.html"}, {"name": "احلام صالح معيوض العصيمي", "url": "https://stat2025-map.static.hf.space/BCS/43.html"}, {"name": "احمد متعب بن عوض الحربي", "url": "https://stat2025-map.static.hf.space/BCS/56.html"}, {"name": "اسراء محمد بن علي الاصيل", "url": "https://stat2025-map.static.hf.space/BCS/39.html"}, {"name": "اسعد بن ماجد بن احمد الهاشم", "url": "https://stat2025-map.static.hf.space/BCS/37.html"}, {"name": "اسماء بنت محمد بن حسين العدساني", "url": "https://stat2025-map.static.hf.space/BCS/52.html"}, {"name": "الجازي معيض هادي ال دعلان", "url": "https://stat2025-map.static.hf.space/BCS/36.html"}, {"name": "ايمان عبدالعزيز بن صالح الصالح", "url": "https://stat2025-map.static.hf.space/BCS/09.html"}, {"name": "ايمان عبدالعزيز بن صالح الصالح", "url": "https://stat2025-map.static.hf.space/BCS/23.html"}, {"name": "باسمه احمد بن محمد القرني", "url": "https://stat2025-map.static.hf.space/BCS/31.html"}, {"name": "باقر عبدالله بن هاشم الهاشم", "url": "https://stat2025-map.static.hf.space/BCS/47.html"}, {"name": "بخيته عادل احمد الدوسري", "url": "https://stat2025-map.static.hf.space/BCS/12.html"}, {"name": "حسن عادل بن حسين الوصيبعي", "url": "https://stat2025-map.static.hf.space/BCS/48.html"}, {"name": "حسين علي بن صالح الربيعه", "url": "https://stat2025-map.static.hf.space/BCS/19.html"}, {"name": "حنين محمد مبارك آل مبارك", "url": "https://stat2025-map.static.hf.space/BCS/28.html"}, {"name": "روان سعود بن مرشد الرحيلي", "url": "https://stat2025-map.static.hf.space/BCS/45.html"}, {"name": "ريم بنت محمد بن عبدالعزيز الملحم", "url": "https://stat2025-map.static.hf.space/BCS/04.html"}, {"name": "زهراء بنت عايش بن علي الصاهود", "url": "https://stat2025-map.static.hf.space/BCS/13.html"}, {"name": "ساره حسين بن عبدالهادي بوخمسين", "url": "https://stat2025-map.static.hf.space/BCS/18.html"}, {"name": "ساره خالد سليمان المحيسن", "url": "https://stat2025-map.static.hf.space/BCS/20.html"}, {"name": "سراب حميد عبدالمجيد السليمان", "url": "https://stat2025-map.static.hf.space/BCS/25.html"}, {"name": "سلافه عباس محمد العلوي", "url": "https://stat2025-map.static.hf.space/BCS/30.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/26.html"}, {"name": "صالح دلي بن عقلاء الشمري", "url": "https://stat2025-map.static.hf.space/BCS/46.html"}, {"name": "طيبه فالح بن عبدالله الرويشد", "url": "https://stat2025-map.static.hf.space/BCS/11.html"}, {"name": "عائشه سليمان بن نايف الحربي", "url": "https://stat2025-map.static.hf.space/BCS/44.html"}, {"name": "عبدالمجيد مشعل محمد الحربي", "url": "https://stat2025-map.static.hf.space/BCS/58.html"}, {"name": "عبدالهادي عون بن سعييد القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/05.html"}, {"name": "عقيله محمدحسين بن علي الجباره", "url": "https://stat2025-map.static.hf.space/BCS/53.html"}, {"name": "غاده سعد بن عبدالرحمن القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/08.html"}, {"name": "غشمه محمد بن سعد الشهراني", "url": "https://stat2025-map.static.hf.space/BCS/14.html"}, {"name": "فايزه محمد مسعود الحازمي", "url": "https://stat2025-map.static.hf.space/BCS/22.html"}, {"name": "فوز عائد نومان المطيري", "url": "https://stat2025-map.static.hf.space/BCS/61.html"}, {"name": "فيصل تركي فيصل القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/34.html"}, {"name": "قنوت محمد بن عبدالله آل حماد", "url": "https://stat2025-map.static.hf.space/BCS/03.html"}, {"name": "لطيفه صالح بن عبدالرحمن العبد القادر", "url": "https://stat2025-map.static.hf.space/BCS/32.html"}, {"name": "لطيفه علي بن حسين النعيم", "url": "https://stat2025-map.static.hf.space/BCS/16.html"}, {"name": "لولوه بدر بن حمد الصياح", "url": "https://stat2025-map.static.hf.space/BCS/21.html"}, {"name": "لين أحمد بن عبدالعزيز القصير", "url": "https://stat2025-map.static.hf.space/BCS/35.html"}, {"name": "محمد فهد محمد الحربي", "url": "https://stat2025-map.static.hf.space/BCS/60.html"}, {"name": "مرتضى عبدالجليل بن عيسى الحكيم", "url": "https://stat2025-map.static.hf.space/BCS/38.html"}, {"name": "مصطفى احمد بن جمعه الرمضان", "url": "https://stat2025-map.static.hf.space/BCS/49.html"}, {"name": "منيره سعد بن احمد الجديدي", "url": "https://stat2025-map.static.hf.space/BCS/54.html"}, {"name": "ناصر عبدالله بن ناصر القحطاني", "url": "https://stat2025-map.static.hf.space/BCS/57.html"}, {"name": "نبأ عادل بن عبدالكريم آل رضوان", "url": "https://stat2025-map.static.hf.space/BCS/15.html"}, {"name": "نجود عبدالعزيز بن عقيل العمري", "url": "https://stat2025-map.static.hf.space/BCS/24.html"}, {"name": "ندى ابراهيم بن علي المنصور", "url": "https://stat2025-map.static.hf.space/BCS/17.html"}, {"name": "نوره عبدالله بن زهير الرزقي", "url": "https://stat2025-map.static.hf.space/BCS/10.html"}, {"name": "نوف سعود بن سالم الخثعمي", "url": "https://stat2025-map.static.hf.space/BCS/02.html"}, {"name": "نوف صالح بن محمد السميح", "url": "https://stat2025-map.static.hf.space/BCS/55.html"}, {"name": "نيللي حسين عبدالله الجعص", "url": "https://stat2025-map.static.hf.space/BCS/27.html"}, {"name": "وضحاء نائف سعد الشريف", "url": "https://stat2025-map.static.hf.space/BCS/07.html"}, {"name": "يحي علي بن يحي المسين", "url": "https://stat2025-map.static.hf.space/BCS/41.html"}]; function normalizeArabic(s) { if (!s) return ""; return String(s) .trim() .toLowerCase() .replace(/[\u064B-\u065F\u0670\u06D6-\u06ED]/g, "") .replace(/\u0640/g, "") .replace(/[إأآٱ]/g, "ا") .replace(/ى/g, "ي") .replace(/ة/g, "ه") .replace(/^ال\s+/g, "") .replace(/\s+/g, " "); } function escapeHtml(str) { return String(str) .replaceAll("&", "&amp;") .replaceAll("<", "&lt;") .replaceAll(">", "&gt;") .replaceAll('"', "&quot;") .replaceAll("'", "&#039;"); } function highlightMatch(name, rawQuery) { if (!rawQuery) return escapeHtml(name); const tokens = rawQuery.trim().split(/\s+/).filter(Boolean); if (!tokens.length) return escapeHtml(name); const t = tokens[0]; const idx = name.indexOf(t); if (idx === -1) return escapeHtml(name); const before = escapeHtml(name.slice(0, idx)); const mid = escapeHtml(name.slice(idx, idx + t.length)); const after = escapeHtml(name.slice(idx + t.length)); return ${before}<mark>${mid}</mark>${after}; } const elQ = document.getElementById("q"); const elResults = document.getElementById("results"); const elCount = document.getElementById("countPill"); const elTotal = document.getElementById("totalChip"); const toast = document.getElementById("toast"); const toastText = document.getElementById("toastText"); elTotal.innerHTML = إجمالي: <b>${DATA.length}</b>; function showToast(msg = "تم نسخ الرابط") { toastText.textContent = msg; toast.classList.add("show"); clearTimeout(window.__toastT); window.__toastT = setTimeout(() => toast.classList.remove("show"), 1200); } async function copyLink(url) { try { await navigator.clipboard.writeText(url); showToast(); } catch (e) { const ta = document.createElement("textarea"); ta.value = url; document.body.appendChild(ta); ta.select(); document.execCommand("copy"); document.body.removeChild(ta); showToast(); } } function renderResults(list, rawQuery) { elResults.innerHTML = ""; if (!list.length) { elCount.textContent = "النتائج: 0"; elResults.innerHTML = <div class="empty">لا توجد نتائج</div>; return; } elCount.textContent = النتائج: ${list.length}; const frag = document.createDocumentFragment(); list.forEach(item => { const row = document.createElement("div"); row.className = "result"; const nm = document.createElement("div"); nm.className = "name"; nm.innerHTML = highlightMatch(item.name, rawQuery); const actions = document.createElement("div"); actions.className = "actions"; const open = document.createElement("a"); open.className = "openBtn"; open.href = item.url; open.target = "_blank"; open.rel = "noopener"; open.innerHTML = فتح <span aria-hidden="true">↗</span>; const copy = document.createElement("button"); copy.className = "copyBtn"; copy.type = "button"; copy.innerHTML = نسخ <span aria-hidden="true">⧉</span>; copy.addEventListener("click", () => copyLink(item.url)); actions.appendChild(open); actions.appendChild(copy); row.appendChild(nm); row.appendChild(actions); frag.appendChild(row); }); elResults.appendChild(frag); } function doSearch() { const raw = (elQ.value || "").trim(); const q = normalizeArabic(raw); if (!q) { elCount.textContent = "النتائج: 0"; elResults.innerHTML = ""; return; } const tokens = q.split(" ").filter(Boolean); const matched = DATA.filter(d => { const nameNorm = normalizeArabic(d.name); return tokens.every(t => nameNorm.includes(t)); }); matched.sort((a, b) => { const al = (a.name || "").length; const bl = (b.name || "").length; if (al !== bl) return al - bl; return (a.name || "").localeCompare(b.name || "", "ar"); }); renderResults(matched, raw); } document.getElementById("btnSearch").addEventListener("click", doSearch); document.getElementById("btnClear").addEventListener("click", () => { elQ.value = ""; elQ.focus(); elResults.innerHTML = ""; elCount.textContent = "النتائج: 0"; }); let t = null; elQ.addEventListener("input", () => { clearTimeout(t); t = setTimeout(doSearch, 140); }); elQ.addEventListener("keydown", (e) => { if (e.key === "Enter") doSearch(); }); // Persist last query (invisible) try { const last = localStorage.getItem("maps_last_query"); if (last) { elQ.value = last; doSearch(); } elQ.addEventListener("input", () => { localStorage.setItem("maps_last_query", elQ.value || ""); }); } catch(_){} elCount.textContent = "النتائج: 0"; هذا الكود القديم فقط عدل السطر الاول الروابط بما يتوافق مع هذا الملف