Skip to content

Commit

Permalink
v.1.6.5: remove @ from all handles in db
Browse files Browse the repository at this point in the history
  • Loading branch information
r002 committed Nov 17, 2024
1 parent 176a805 commit 82496de
Show file tree
Hide file tree
Showing 6 changed files with 415 additions and 414 deletions.
3 changes: 2 additions & 1 deletion changelog.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
[
{
"dt": "2024-11-17",
"version": "1.6.4",
"version": "1.6.5",
"notes": [
"remove `@` from all handles in db",
"support bsky posts"
]
},
Expand Down
6 changes: 3 additions & 3 deletions data/books.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[
"@AnnieBot",
"@InnerGameTennis",
"@tomorrow3"
"AnnieBot",
"InnerGameTennis",
"tomorrow3"
]
30 changes: 15 additions & 15 deletions data/media.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
[
"@Sololv_ARISE_GL",
"@KaijuNo8_O_EN",
"@shogunfx",
"@The_Other_Zoey",
"@pastlivesmovie",
"@TheFallGuyMovie",
"@arcaneshow",
"@herthemovie",
"@ImitationGame",
"@UpInTheAir",
"@WestWingShow",
"@Foundation_",
"@IndianaJones",
"@AvatarNetflix",
"@Armageddon"
"Sololv_ARISE_GL",
"KaijuNo8_O_EN",
"shogunfx",
"The_Other_Zoey",
"pastlivesmovie",
"TheFallGuyMovie",
"arcaneshow",
"herthemovie",
"ImitationGame",
"UpInTheAir",
"WestWingShow",
"Foundation_",
"IndianaJones",
"AvatarNetflix",
"Armageddon"
]
86 changes: 43 additions & 43 deletions data/orgs.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[
"@flipboard.com",
"@FortuneMagazine",
"@nytimes",
"@GQMagazine",
"@nbcsnl",
"@TheCut",
"@NEOM",
"@canva",
"@tiktok_us",
"@UberEats",
"@TEDTalks",
"@a16z",
"@TheAtlantic",
"@clearcodehq",
"@farnamstreet",
"@Apple",
"@verge",
"@PalantirTech",
"@GreyhoundBus",
"@PirateWires",
"@CAForever",
"@resend",
"@JoinEdgeCity",
"@Reddit",
"@getriver_io",
"@britishmuseum",
"@Cambridge_Uni",
"@compactmag_",
"@culdesac",
"@Waymo",
"@GrandCanyonNPS",
"@ArchesNPS",
"@thesfcommons",
"@Google",
"@mcsweeneys",
"@uaustinorg",
"@dunkindonuts",
"@ClassicTetris",
"@CodeNewbies",
"@planetmoney",
"@github",
"@37signals",
"@X"
"flipboard.com",
"FortuneMagazine",
"nytimes",
"GQMagazine",
"nbcsnl",
"TheCut",
"NEOM",
"canva",
"tiktok_us",
"UberEats",
"TEDTalks",
"a16z",
"TheAtlantic",
"clearcodehq",
"farnamstreet",
"Apple",
"verge",
"PalantirTech",
"GreyhoundBus",
"PirateWires",
"CAForever",
"resend",
"JoinEdgeCity",
"Reddit",
"getriver_io",
"britishmuseum",
"Cambridge_Uni",
"compactmag_",
"culdesac",
"Waymo",
"GrandCanyonNPS",
"ArchesNPS",
"thesfcommons",
"Google",
"mcsweeneys",
"uaustinorg",
"dunkindonuts",
"ClassicTetris",
"CodeNewbies",
"planetmoney",
"github",
"37signals",
"X"
]
16 changes: 8 additions & 8 deletions js/xna.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ function indexDB(dbArr, orgsArr, mediaArr, booksArr) {
dbPPL = new Map();
mapDATE = new Map();
mapTIDS = new Map();
setORGS = new Set(orgsArr.map(o=>o.substr(1).toLowerCase()));
setMEDIA = new Set(mediaArr.map(o=>o.substr(1).toLowerCase()));
setBOOKS = new Set(booksArr.map(o=>o.substr(1).toLowerCase()));
setORGS = new Set(orgsArr.map(o=>o.toLowerCase()));
setMEDIA = new Set(mediaArr.map(o=>o.toLowerCase()));
setBOOKS = new Set(booksArr.map(o=>o.toLowerCase()));

for (let t of dbArr) {
// Index tweets by tid
Expand All @@ -70,7 +70,7 @@ function indexDB(dbArr, orgsArr, mediaArr, booksArr) {
// Index people
if (t.people) {
for (const person of t.people.reverse()) {
const handle = person.handle.substr(1).toLowerCase();
const handle = person.handle.toLowerCase();
dbPPL.set(handle, person);
if(!mapPPL.has(handle)){
mapPPL.set(handle, [t.id]);
Expand Down Expand Up @@ -208,11 +208,11 @@ function rendermeta(mode) {

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

function toggle(el) {
Expand Down Expand Up @@ -345,7 +345,7 @@ function highltppl(tidArr) {
const t = mapTIDS.get(tid);
if (t.people) {
// console.log(t.people.map(p=>p.handle));
t.people.forEach(p=>document.getElementById(p.handle.substr(1).toLowerCase()).classList.remove("dim"));
t.people.forEach(p=>document.getElementById(p.handle.toLowerCase()).classList.remove("dim"));
}
}
}
Expand Down Expand Up @@ -465,7 +465,7 @@ function renderstream() {
const t = mapTIDS.get(tid);
document.getElementById(`${t.dt}`).classList.add("selected");
if (t.people) {
t.people.forEach(p=>document.getElementById(p.handle.substr(1).toLowerCase()).classList.remove("dim"));
t.people.forEach(p=>document.getElementById(p.handle.toLowerCase()).classList.remove("dim"));
}
}
}
Expand Down
Loading

0 comments on commit 82496de

Please sign in to comment.