Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
futahei committed Nov 19, 2020
1 parent 5e4578b commit 8747b07
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const BASE = NOW.getTime() - OLDEST.getTime();
const ONEMINUSCOLOR = [255-205, 255-170, 255-85];

$(function() {
// $("body").css("background-color", "#CCC6B8");
$(".g").each(function(index: number, element: HTMLElement) {
const span = $(element).find("span.f");
console.log(index, span.length);
Expand All @@ -17,7 +16,6 @@ $(function() {
const date = new Date(dataString);
const elapsed = NOW.getTime() - date.getTime();
const density = 1 - Math.max(Math.min(elapsed / BASE, 1), 0);
// element.style.backgroundColor = `rgba(${205+ONEMINUSCOLOR[0]*density}, ${170+ONEMINUSCOLOR[1]*density}, ${85+ONEMINUSCOLOR[2]*density}, 0.5)`;
element.style.opacity = (Math.max(density, 0.1)).toString();
return;
}
Expand Down

0 comments on commit 8747b07

Please sign in to comment.