Skip to content

Commit 82496de

Browse files
committed
v.1.6.5: remove @ from all handles in db
1 parent 176a805 commit 82496de

File tree

6 files changed

+415
-414
lines changed

6 files changed

+415
-414
lines changed

changelog.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[
22
{
33
"dt": "2024-11-17",
4-
"version": "1.6.4",
4+
"version": "1.6.5",
55
"notes": [
6+
"remove `@` from all handles in db",
67
"support bsky posts"
78
]
89
},

data/books.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
"@AnnieBot",
3-
"@InnerGameTennis",
4-
"@tomorrow3"
2+
"AnnieBot",
3+
"InnerGameTennis",
4+
"tomorrow3"
55
]

data/media.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
[
2-
"@Sololv_ARISE_GL",
3-
"@KaijuNo8_O_EN",
4-
"@shogunfx",
5-
"@The_Other_Zoey",
6-
"@pastlivesmovie",
7-
"@TheFallGuyMovie",
8-
"@arcaneshow",
9-
"@herthemovie",
10-
"@ImitationGame",
11-
"@UpInTheAir",
12-
"@WestWingShow",
13-
"@Foundation_",
14-
"@IndianaJones",
15-
"@AvatarNetflix",
16-
"@Armageddon"
2+
"Sololv_ARISE_GL",
3+
"KaijuNo8_O_EN",
4+
"shogunfx",
5+
"The_Other_Zoey",
6+
"pastlivesmovie",
7+
"TheFallGuyMovie",
8+
"arcaneshow",
9+
"herthemovie",
10+
"ImitationGame",
11+
"UpInTheAir",
12+
"WestWingShow",
13+
"Foundation_",
14+
"IndianaJones",
15+
"AvatarNetflix",
16+
"Armageddon"
1717
]

data/orgs.json

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,45 @@
11
[
2-
"@flipboard.com",
3-
"@FortuneMagazine",
4-
"@nytimes",
5-
"@GQMagazine",
6-
"@nbcsnl",
7-
"@TheCut",
8-
"@NEOM",
9-
"@canva",
10-
"@tiktok_us",
11-
"@UberEats",
12-
"@TEDTalks",
13-
"@a16z",
14-
"@TheAtlantic",
15-
"@clearcodehq",
16-
"@farnamstreet",
17-
"@Apple",
18-
"@verge",
19-
"@PalantirTech",
20-
"@GreyhoundBus",
21-
"@PirateWires",
22-
"@CAForever",
23-
"@resend",
24-
"@JoinEdgeCity",
25-
"@Reddit",
26-
"@getriver_io",
27-
"@britishmuseum",
28-
"@Cambridge_Uni",
29-
"@compactmag_",
30-
"@culdesac",
31-
"@Waymo",
32-
"@GrandCanyonNPS",
33-
"@ArchesNPS",
34-
"@thesfcommons",
35-
"@Google",
36-
"@mcsweeneys",
37-
"@uaustinorg",
38-
"@dunkindonuts",
39-
"@ClassicTetris",
40-
"@CodeNewbies",
41-
"@planetmoney",
42-
"@github",
43-
"@37signals",
44-
"@X"
2+
"flipboard.com",
3+
"FortuneMagazine",
4+
"nytimes",
5+
"GQMagazine",
6+
"nbcsnl",
7+
"TheCut",
8+
"NEOM",
9+
"canva",
10+
"tiktok_us",
11+
"UberEats",
12+
"TEDTalks",
13+
"a16z",
14+
"TheAtlantic",
15+
"clearcodehq",
16+
"farnamstreet",
17+
"Apple",
18+
"verge",
19+
"PalantirTech",
20+
"GreyhoundBus",
21+
"PirateWires",
22+
"CAForever",
23+
"resend",
24+
"JoinEdgeCity",
25+
"Reddit",
26+
"getriver_io",
27+
"britishmuseum",
28+
"Cambridge_Uni",
29+
"compactmag_",
30+
"culdesac",
31+
"Waymo",
32+
"GrandCanyonNPS",
33+
"ArchesNPS",
34+
"thesfcommons",
35+
"Google",
36+
"mcsweeneys",
37+
"uaustinorg",
38+
"dunkindonuts",
39+
"ClassicTetris",
40+
"CodeNewbies",
41+
"planetmoney",
42+
"github",
43+
"37signals",
44+
"X"
4545
]

js/xna.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ function indexDB(dbArr, orgsArr, mediaArr, booksArr) {
5252
dbPPL = new Map();
5353
mapDATE = new Map();
5454
mapTIDS = new Map();
55-
setORGS = new Set(orgsArr.map(o=>o.substr(1).toLowerCase()));
56-
setMEDIA = new Set(mediaArr.map(o=>o.substr(1).toLowerCase()));
57-
setBOOKS = new Set(booksArr.map(o=>o.substr(1).toLowerCase()));
55+
setORGS = new Set(orgsArr.map(o=>o.toLowerCase()));
56+
setMEDIA = new Set(mediaArr.map(o=>o.toLowerCase()));
57+
setBOOKS = new Set(booksArr.map(o=>o.toLowerCase()));
5858

5959
for (let t of dbArr) {
6060
// Index tweets by tid
@@ -70,7 +70,7 @@ function indexDB(dbArr, orgsArr, mediaArr, booksArr) {
7070
// Index people
7171
if (t.people) {
7272
for (const person of t.people.reverse()) {
73-
const handle = person.handle.substr(1).toLowerCase();
73+
const handle = person.handle.toLowerCase();
7474
dbPPL.set(handle, person);
7575
if(!mapPPL.has(handle)){
7676
mapPPL.set(handle, [t.id]);
@@ -208,11 +208,11 @@ function rendermeta(mode) {
208208

209209
function genavatar(pid) { // pid is a person's handle, but just lowercase
210210
return `<div class="person" id="${pid}"
211-
title="${dbPPL.get(pid).handle}"
211+
title="@${dbPPL.get(pid).handle}"
212212
onmouseover="highltperson('${pid}')"
213213
onmouseout="unhighltperson()"
214214
onclick="selectperson('${pid}')"
215-
style='background-image: url("../img/pfp/${dbPPL.get(pid).handle.substr(1)}.jpg")'></div>`;
215+
style='background-image: url("../img/pfp/${dbPPL.get(pid).handle}.jpg")'></div>`;
216216
}
217217

218218
function toggle(el) {
@@ -345,7 +345,7 @@ function highltppl(tidArr) {
345345
const t = mapTIDS.get(tid);
346346
if (t.people) {
347347
// console.log(t.people.map(p=>p.handle));
348-
t.people.forEach(p=>document.getElementById(p.handle.substr(1).toLowerCase()).classList.remove("dim"));
348+
t.people.forEach(p=>document.getElementById(p.handle.toLowerCase()).classList.remove("dim"));
349349
}
350350
}
351351
}
@@ -465,7 +465,7 @@ function renderstream() {
465465
const t = mapTIDS.get(tid);
466466
document.getElementById(`${t.dt}`).classList.add("selected");
467467
if (t.people) {
468-
t.people.forEach(p=>document.getElementById(p.handle.substr(1).toLowerCase()).classList.remove("dim"));
468+
t.people.forEach(p=>document.getElementById(p.handle.toLowerCase()).classList.remove("dim"));
469469
}
470470
}
471471
}

0 commit comments

Comments
 (0)