From ab947640b0b71773e6b6389819186d9a7ec5eec6 Mon Sep 17 00:00:00 2001 From: Takayuki Ueno Date: Wed, 24 Jul 2019 22:41:01 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E3=83=AC=E3=83=BC=E3=83=88=203600=20?= =?UTF-8?q?=E4=BB=A5=E4=B8=8A=E3=81=A7=E3=82=82=E4=B8=8D=E5=85=B7=E5=90=88?= =?UTF-8?q?=E3=81=8C=E5=87=BA=E3=81=AA=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AtCoderColorNEWS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AtCoderColorNEWS.js b/AtCoderColorNEWS.js index e3571c0..f092750 100644 --- a/AtCoderColorNEWS.js +++ b/AtCoderColorNEWS.js @@ -32,8 +32,8 @@ if (!joinFlag) continue; //Rateを色に変換する - preRate = Math.floor(preRate / 400); - nowRate = Math.floor(nowRate / 400); + preRate = Math.max(8, Math.floor(preRate / 400)); + nowRate = Math.max(8, Math.floor(nowRate / 400)); //前の色よりも今の色のほうが高い場合通知。 if (preRate < nowRate) { From 70b7792ea34fa1f913a9e62a969b812844892589 Mon Sep 17 00:00:00 2001 From: Takayuki Ueno Date: Wed, 24 Jul 2019 22:48:02 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AtCoderColorNEWS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AtCoderColorNEWS.js b/AtCoderColorNEWS.js index f092750..c8472d7 100644 --- a/AtCoderColorNEWS.js +++ b/AtCoderColorNEWS.js @@ -32,8 +32,8 @@ if (!joinFlag) continue; //Rateを色に変換する - preRate = Math.max(8, Math.floor(preRate / 400)); - nowRate = Math.max(8, Math.floor(nowRate / 400)); + preRate = Math.min(8, Math.floor(preRate / 400)); + nowRate = Math.min(8, Math.floor(nowRate / 400)); //前の色よりも今の色のほうが高い場合通知。 if (preRate < nowRate) { From fc41233d9e619c0cce83a37897fc05bb911d26fb Mon Sep 17 00:00:00 2001 From: Takayuki Ueno Date: Wed, 24 Jul 2019 22:49:25 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fav=E4=B8=80=E8=A6=A7=E3=82=92JSON.parse?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E7=94=A8=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AtCoderColorNEWS.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/AtCoderColorNEWS.js b/AtCoderColorNEWS.js index c8472d7..c8a8196 100644 --- a/AtCoderColorNEWS.js +++ b/AtCoderColorNEWS.js @@ -9,14 +9,13 @@ (function () { //お気に入りリストを取得 - let favList = localStorage.fav; - favList = favList.split('"'); + let favList = JSON.parse(localStorage.fav); //レートを色に変換するリスト let color = ['灰', '茶', '緑', '水', '青', '黄', '橙', '赤', '自由']; let string = ""; //通知用string - for (let i = 1; i < favList.length; i += 2) { + for (let i = 0; i < favList.length; i++) { //favList[i]:=お気に入りの人のusername let preRate = 1000;