diff --git a/index.html b/index.html index 7ef62bf..a93a14c 100644 --- a/index.html +++ b/index.html @@ -213,7 +213,6 @@ -
diff --git a/js/scripts.js b/js/scripts.js index ddcfe3c..5339a4c 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -285,7 +285,8 @@ const calculateOutput = function (data, first_buy, previous_pattern) { let buy_price = parseInt(buy_input.val()); previous_pattern_number = "" for (let poss of analyzed_possibilities) { - var out_line = "" + poss.pattern_description + "" + var out_line = "" + poss.pattern_description + ""; + const style_price = buy_price || poss.prices[0].min; if (previous_pattern_number != poss.pattern_number) { previous_pattern_number = poss.pattern_number pattern_count = analyzed_possibilities @@ -294,8 +295,8 @@ const calculateOutput = function (data, first_buy, previous_pattern) { out_line += `${displayPercentage(poss.category_total_probability)}`; } out_line += `${displayPercentage(poss.probability)}`; - for (let day of poss.prices.slice(1)) { - let price_class = getPriceClass(buy_price, day.max); + for (let day of poss.prices.slice(2)) { + let price_class = getPriceClass(style_price, day.max); if (day.min !== day.max) { out_line += `${day.min} ${i18next.t("output.to")} ${day.max}`; } else { @@ -303,8 +304,8 @@ const calculateOutput = function (data, first_buy, previous_pattern) { } } - var min_class = getPriceClass(buy_price, poss.weekGuaranteedMinimum); - var max_class = getPriceClass(buy_price, poss.weekMax); + var min_class = getPriceClass(style_price, poss.weekGuaranteedMinimum); + var max_class = getPriceClass(style_price, poss.weekMax); out_line += `${poss.weekGuaranteedMinimum}${poss.weekMax}`; output_possibilities += out_line } @@ -367,9 +368,6 @@ const update = function () { const first_buy = getCheckedRadio(first_buy_radios) == 'true'; const previous_pattern = parseInt(getCheckedRadio(previous_pattern_radios)); - buy_input[0].disabled = first_buy; - buy_input[0].placeholder = first_buy ? '—' : '...' - const permalink = generatePermalink(buy_price, sell_prices, first_buy, previous_pattern); if (permalink) { permalink_button.show(); diff --git a/locales/ca.json b/locales/ca.json index 6f504d4..0f36555 100644 --- a/locales/ca.json +++ b/locales/ca.json @@ -25,7 +25,7 @@ "small-spike": "Pic petit" }, "prices": { - "description": "Quin ha sigut el preu de compra de naps a la teva illa aquesta setmana?(Si no has comprat naps abans, aquest camp estarà desactivat)", + "description": "Quin ha sigut el preu de compra de naps a la teva illa aquesta setmana?", "open": { "am": "AM - De les 8:00 am a les 11:59 am", "pm": "PM - De les 12:00 pm a les 10:00 pm" diff --git a/locales/de.json b/locales/de.json index f1f113b..2e9831a 100644 --- a/locales/de.json +++ b/locales/de.json @@ -25,7 +25,7 @@ "small-spike": "Leicht Ansteigend" }, "prices": { - "description": "Wie hoch war der Preis für Rüben diese Woche auf deiner Insel? (Wenn du zum ersten Mal Rüben kaufst, wird dieses Feld deaktiviert)", + "description": "Wie hoch war der Preis für Rüben diese Woche auf deiner Insel?", "open": { "am": "Vorm. (Vormittag) - 8:00 Uhr bis 11:59 Uhr", "pm": "Nachm. (Nachmittag) - 12:00 Uhr bis 22:00 Uhr" diff --git a/locales/en.json b/locales/en.json index b057390..b1bfcfa 100644 --- a/locales/en.json +++ b/locales/en.json @@ -25,7 +25,7 @@ "small-spike": "Small Spike" }, "prices": { - "description": "What was the price of turnips this week on your island? (If this is your first time buying turnips, this field will be disabled)", + "description": "What was the price of turnips this week on your island?", "open": { "am": "AM - 8:00 am to 11:59 am", "pm": "PM - 12:00 pm to 10:00 pm" diff --git a/locales/es.json b/locales/es.json index 3fa5b15..fef9941 100644 --- a/locales/es.json +++ b/locales/es.json @@ -25,7 +25,7 @@ "small-spike": "Pico moderado" }, "prices": { - "description": "¿Cuál fue el precio de los nabos en su isla esta semana? (Si esta ha sido tu primera vez comprando nabos, este campo se desactivará)", + "description": "¿Cuál fue el precio de los nabos en su isla esta semana?", "open": { "am": "AM - De 8:00 a 11:59", "pm": "PM - De 12:00 a 22:00" diff --git a/locales/fr.json b/locales/fr.json index 487dd21..5f6892d 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -25,7 +25,7 @@ "small-spike": "Petit Pic" }, "prices": { - "description": "À quel prix Porcelette vendait ses navets sur ton île cette semaine ?(Si c'est la première fois que t'en achètes, ce champ sera desactivé)", + "description": "À quel prix Porcelette vendait ses navets sur ton île cette semaine ?", "open": { "am": "Matin (AM) - de 8:00 à 11:59", "pm": "Après-midi (PM) - de 12:00 à 22:00" diff --git a/locales/hu.json b/locales/hu.json index 0a9a7dc..a30fee0 100644 --- a/locales/hu.json +++ b/locales/hu.json @@ -25,7 +25,7 @@ "small-spike": "Kis kiugrás" }, "prices": { - "description": "Mennyiért vettél ezen a héten retket? (Ha most vásárolsz először, ez a mező le lesz tiltva)", + "description": "Mennyiért vettél ezen a héten retket?", "open": { "am": "Délelőtt - 08:00-tól 11:59-ig", "pm": "Délután - 12:00-től 22:00-ig" diff --git a/locales/it.json b/locales/it.json index 12f7906..86de440 100644 --- a/locales/it.json +++ b/locales/it.json @@ -26,7 +26,7 @@ "small-spike": "Piccolo picco" }, "prices": { - "description": "Qual era il prezzo di acquisto delle rape sulla tua isola questa settimana? (Se è la prima volta che le compri questo campo è disabilitato)", + "description": "Qual era il prezzo di acquisto delle rape sulla tua isola questa settimana?", "open": { "am": "Mattina - dalle 8:00 alle 11:59", "pm": "Pomeriggio - dalle 12:00 alle 22:00" diff --git a/locales/ja.json b/locales/ja.json index 074f78b..fdb59ec 100644 --- a/locales/ja.json +++ b/locales/ja.json @@ -25,7 +25,7 @@ "small-spike": "跳ね小型(4期型)" }, "prices": { - "description": "今週のカブ価は? (初めてカブを購入した場合は、この入力欄は無効にされています)", + "description": "今週のカブ価は?", "open": { "am": "午前 - AM 8:00 ~ AM 11:59", "pm": "午後 - PM 12:00 ~ PM 10:00" diff --git a/locales/ko.json b/locales/ko.json index 72b8465..40f6365 100644 --- a/locales/ko.json +++ b/locales/ko.json @@ -25,7 +25,7 @@ "small-spike": "작은 급등" }, "prices": { - "description": "이번 주에 당신의 섬에서 무를 샀을 때의 가격이 어떻게 됩니까? (첫 구매인 경우에는 입력란이 비활성화됩니다)", + "description": "이번 주에 당신의 섬에서 무를 샀을 때의 가격이 어떻게 됩니까?", "open": { "am": "오전 - 오전 8:00 ~ 오전 11:59", "pm": "오후 - 오후 12:00 ~ 오후 10:00" diff --git a/locales/nl.json b/locales/nl.json index 6376bbd..22d0771 100644 --- a/locales/nl.json +++ b/locales/nl.json @@ -25,7 +25,7 @@ "small-spike": "Kleine Piek" }, "prices": { - "description": "Wat was de prijs van knollen op je eiland deze week? (Als dit de eerste keer is dat je knollen koopt is dit veld uitgeschakeld)", + "description": "Wat was de prijs van knollen op je eiland deze week?", "open": { "am": "Voormiddag - 8:00 tot 11:59", "pm": "Namiddag - 12:00 tot 22:00" diff --git a/locales/pt-BR.json b/locales/pt-BR.json index 6b81af8..6dd7c11 100644 --- a/locales/pt-BR.json +++ b/locales/pt-BR.json @@ -25,7 +25,7 @@ "small-spike": "Pequeno Pico" }, "prices": { - "description": "Qual foi o preço dos nabos esta semana em sua ilha? (Se esta é a primeira vez que compra nabos, este campo ficará desativado)", + "description": "Qual foi o preço dos nabos esta semana em sua ilha?", "open": { "am": "AM - 8:00 am até 11:59 am", "pm": "PM - 12:00 pm até 10:00 pm" diff --git a/locales/ru.json b/locales/ru.json index f0cdc19..d670a4d 100644 --- a/locales/ru.json +++ b/locales/ru.json @@ -25,7 +25,7 @@ "small-spike": "Малый скачок" }, "prices": { - "description": "Какова была стоимость репы у Дейзи Мэй на Вашем острове на этой неделе? (Если Вы новичок рынка репы, данное поле будет недоступно)", + "description": "Какова была стоимость репы у Дейзи Мэй на Вашем острове на этой неделе?", "open": { "am": "Утро - 8:00 - 11:59", "pm": "День - 12:00 - 22:00" diff --git a/locales/zh-CN.json b/locales/zh-CN.json index d0d85ba..3031c39 100644 --- a/locales/zh-CN.json +++ b/locales/zh-CN.json @@ -25,7 +25,7 @@ "small-spike": "小幅上涨(四期型)" }, "prices": { - "description": "本周你的岛上大头菜的购买价格是多少?(如果你是第一次购买大头菜,这个字段不可用)", + "description": "本周你的岛上大头菜的购买价格是多少?", "open": { "am": "上午 - 8:00 ~ 11:59", "pm": "下午 - 12:00 ~ 22:00" diff --git a/locales/zh-TW.json b/locales/zh-TW.json index aeb2dfe..518eaf3 100644 --- a/locales/zh-TW.json +++ b/locales/zh-TW.json @@ -25,7 +25,7 @@ "small-spike": "四期型" }, "prices": { - "description": "本週自己島上的大頭菜買價?(若這是你第一次購買大頭菜,則此欄位會被停用)", + "description": "本週自己島上的大頭菜買價?", "open": { "am": "上午 - 08:00 到 11:59", "pm": "下午 - 12:00 到 22:00"