-
Notifications
You must be signed in to change notification settings - Fork 15
New Billion Graves design update #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update from master
Merge from master
|
The dates didn't parse correctly for me in the Thomas Krysinski example. The normal JS date parse will assume dates and it works off a 0-11 month calculation if I recall. In any case, when I parse Thomas, it gives me these dates. Birth: I'd suggest maybe trying to use the parseDate function in the popup.js and if you wanted to format it.. maybe something like this? function displayDate(vardate) {
let formattedDate = ""
if ("day" in vardate && "month" in vardate && "year" in vardate) {
let date = moment({ year: vardate["year"], month: vardate["month"] - 1 , day: vardate["day"] });
formattedDate = date.format("MMMM D, YYYY");
} else if ("month" in vardate && "year" in vardate) {
let date = moment({ year: vardate["year"], month: vardate["month"] - 1 })
formattedDate = date.format("MMMM YYYY");
} else if ("year" in vardate){
let date = moment({ year: vardate["year"]});
formattedDate = date.format("YYYY");
}
return formattedDate;
}``` |
|
Perhaps it takes into account some locale of the browser |
|
@eljeffeg see changes |
|
By the way, Worth taking a look when thinking about other problems too |
|
@eljeffeg i think it's ready |
| } | ||
|
|
||
| function getData(htmlstring) { | ||
| return JSON.parse(htmlstring.split('<script type="application/ld+json">')[1].split('</script>')[0]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eljeffeg this is the part I really dislike. I couldn't fetch <script> content via jQuery, so try to take a look if it's possible.
No. #112 is also blocked, some work needs to be done there on a deeper level |
|
@eljeffeg - requesting your attention :) |
TL;DR
for every profile - (e.g. Thomas F Krysinski)
there's a part of the HTML with a json with the details.
Load this and use it instead of HTML parsing - this way -- add support to new BillionGraves
Solves #116 , Solves #106