Remove Wunderground settlement reference from extension charts
This commit is contained in:
+3
-3
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
1. 自动识别当前 Polymarket 页面中的城市,也支持手动切换。
|
1. 自动识别当前 Polymarket 页面中的城市,也支持手动切换。
|
||||||
2. 展示城市档案:结算站点、站点距离、观测更新时间、周边站点数量。
|
2. 展示城市档案:结算站点、站点距离、观测更新时间、周边站点数量。
|
||||||
3. 展示今日日内走势(简版):`DEB` 走势与官方观测(`METAR / HKO / CWA / Wunderground`)对照,可悬停查看时间与温度。
|
3. 展示今日日内走势(简版):`DEB` 走势与官方观测(`METAR / HKO / CWA / NOAA`)对照,可悬停查看时间与温度。
|
||||||
4. 展示多日最高温预报(简版),当前以 `DEB` 优先。
|
4. 展示多日最高温预报(简版),当前以 `DEB` 优先。
|
||||||
5. 支持一键刷新,强制拉取最新温度数据。
|
5. 支持一键刷新,强制拉取最新温度数据。
|
||||||
6. 支持本地缓存,提升打开速度;刷新时自动更新缓存。
|
6. 支持本地缓存,提升打开速度;刷新时自动更新缓存。
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
## 数据说明
|
## 数据说明
|
||||||
|
|
||||||
- 香港使用 `HKO`(香港天文台)结算源。
|
- 香港使用 `HKO`(香港天文台)结算源。
|
||||||
- 其他城市按配置使用 `METAR / NOAA / Wunderground / 官方数据源`。
|
- 其他城市按配置使用 `METAR / NOAA / 官方数据源`。
|
||||||
- 城市展示名以主站返回值为准,例如 `aurora` 市场在插件中会显示为 `Denver`。
|
- 城市展示名以主站返回值为准,例如 `aurora` 市场在插件中会显示为 `Denver`。
|
||||||
|
|
||||||
## 权限说明
|
## 权限说明
|
||||||
@@ -50,6 +50,6 @@
|
|||||||
|
|
||||||
- 当前版本仍是轻量产品,重点是“监控 + 基础判断 + 导流回站”,未接入支付链路。
|
- 当前版本仍是轻量产品,重点是“监控 + 基础判断 + 导流回站”,未接入支付链路。
|
||||||
- 若你的 API 做了严格鉴权,请先在设置页填写 token 再使用。
|
- 若你的 API 做了严格鉴权,请先在设置页填写 token 再使用。
|
||||||
- 插件会按主站返回的结算源展示参考口径,例如 `Taipei / Shenzhen` 当前走 `Wunderground`,`Hong Kong / Lau Fau Shan` 走 `HKO`。
|
- 插件走势图与主站保持一致:`Wunderground` 结算城市不再单独绘制结算参考线,统一显示机场 `METAR` / 官方观测点位。
|
||||||
- 点击“打开网站查看更多”会回到主站继续查看完整分析。
|
- 点击“打开网站查看更多”会回到主站继续查看完整分析。
|
||||||
- 插件不会承载完整分析;完整结构判断、历史对账和更多信号仍以主站为准。
|
- 插件不会承载完整分析;完整结构判断、历史对账和更多信号仍以主站为准。
|
||||||
|
|||||||
+4
-16
@@ -42,9 +42,6 @@ const I18N = {
|
|||||||
noaaSettlementRef: "NOAA 结算参考",
|
noaaSettlementRef: "NOAA 结算参考",
|
||||||
noaaSettlementLegend:
|
noaaSettlementLegend:
|
||||||
"该城市按 NOAA 最终完成质控后的最高整度读数结算;图中曲线仅作结算参考。",
|
"该城市按 NOAA 最终完成质控后的最高整度读数结算;图中曲线仅作结算参考。",
|
||||||
wundergroundSettlementRef: "Wunderground 结算参考",
|
|
||||||
wundergroundSettlementLegend:
|
|
||||||
"该城市按配置的 Wunderground 站点结算;图中曲线仅作结算参考。",
|
|
||||||
loadCityDetailFailed: "加载城市详情失败",
|
loadCityDetailFailed: "加载城市详情失败",
|
||||||
refreshFailed: "刷新温度数据失败",
|
refreshFailed: "刷新温度数据失败",
|
||||||
initFailed: "初始化失败",
|
initFailed: "初始化失败",
|
||||||
@@ -107,9 +104,6 @@ const I18N = {
|
|||||||
noaaSettlementRef: "NOAA Settlement Reference",
|
noaaSettlementRef: "NOAA Settlement Reference",
|
||||||
noaaSettlementLegend:
|
noaaSettlementLegend:
|
||||||
"This city settles on NOAA using the finalized highest rounded reading; the plotted line is only a settlement reference.",
|
"This city settles on NOAA using the finalized highest rounded reading; the plotted line is only a settlement reference.",
|
||||||
wundergroundSettlementRef: "Wunderground Settlement Reference",
|
|
||||||
wundergroundSettlementLegend:
|
|
||||||
"This city settles on the configured Wunderground station; the plotted line is only a settlement reference.",
|
|
||||||
loadCityDetailFailed: "Failed to load city detail",
|
loadCityDetailFailed: "Failed to load city detail",
|
||||||
refreshFailed: "Failed to refresh weather data",
|
refreshFailed: "Failed to refresh weather data",
|
||||||
initFailed: "Initialization failed",
|
initFailed: "Initialization failed",
|
||||||
@@ -578,7 +572,9 @@ function parseTimeToMinute(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getObservationRows(detail) {
|
function getObservationRows(detail) {
|
||||||
const obsSource = Array.isArray(detail?.settlement_today_obs) && detail.settlement_today_obs.length
|
const sourceCode = String(detail?.current?.settlement_source || "").toLowerCase();
|
||||||
|
const useSettlementSource = sourceCode && sourceCode !== "wunderground";
|
||||||
|
const obsSource = useSettlementSource && Array.isArray(detail?.settlement_today_obs) && detail.settlement_today_obs.length
|
||||||
? detail.settlement_today_obs
|
? detail.settlement_today_obs
|
||||||
: Array.isArray(detail?.metar_today_obs)
|
: Array.isArray(detail?.metar_today_obs)
|
||||||
? detail.metar_today_obs
|
? detail.metar_today_obs
|
||||||
@@ -744,9 +740,7 @@ function drawTrendChart(detail) {
|
|||||||
const sourceCode = String(detail?.current?.settlement_source || "").toLowerCase();
|
const sourceCode = String(detail?.current?.settlement_source || "").toLowerCase();
|
||||||
const obsSeriesLabel = sourceCode === "noaa"
|
const obsSeriesLabel = sourceCode === "noaa"
|
||||||
? t("noaaSettlementRef")
|
? t("noaaSettlementRef")
|
||||||
: sourceCode === "wunderground"
|
: String(detail?.current?.settlement_source_label || "OBS").toUpperCase();
|
||||||
? t("wundergroundSettlementRef")
|
|
||||||
: String(detail?.current?.settlement_source_label || "OBS").toUpperCase();
|
|
||||||
if (!points.length) {
|
if (!points.length) {
|
||||||
setChartHover([], tempSymbol);
|
setChartHover([], tempSymbol);
|
||||||
ctx.fillStyle = "#8ba0be";
|
ctx.fillStyle = "#8ba0be";
|
||||||
@@ -1027,8 +1021,6 @@ function renderDetail(detail) {
|
|||||||
const sourceCode = String(detail?.current?.settlement_source || "").toLowerCase();
|
const sourceCode = String(detail?.current?.settlement_source || "").toLowerCase();
|
||||||
const sourceTag = sourceCode === "noaa"
|
const sourceTag = sourceCode === "noaa"
|
||||||
? t("noaaSettlementRef")
|
? t("noaaSettlementRef")
|
||||||
: sourceCode === "wunderground"
|
|
||||||
? t("wundergroundSettlementRef")
|
|
||||||
: String(detail?.current?.settlement_source_label || "").toUpperCase() || "OBS";
|
: String(detail?.current?.settlement_source_label || "").toUpperCase() || "OBS";
|
||||||
const obs = getObservationRows(detail);
|
const obs = getObservationRows(detail);
|
||||||
if (obs.length >= 2) {
|
if (obs.length >= 2) {
|
||||||
@@ -1037,15 +1029,11 @@ function renderDetail(detail) {
|
|||||||
els.chartLegend.textContent =
|
els.chartLegend.textContent =
|
||||||
sourceCode === "noaa"
|
sourceCode === "noaa"
|
||||||
? `${sourceTag}: ${first.temp}${tempSymbol}@${first.time} -> ${last.temp}${tempSymbol}@${last.time} | ${t("noaaSettlementLegend")}`
|
? `${sourceTag}: ${first.temp}${tempSymbol}@${first.time} -> ${last.temp}${tempSymbol}@${last.time} | ${t("noaaSettlementLegend")}`
|
||||||
: sourceCode === "wunderground"
|
|
||||||
? `${sourceTag}: ${first.temp}${tempSymbol}@${first.time} -> ${last.temp}${tempSymbol}@${last.time} | ${t("wundergroundSettlementLegend")}`
|
|
||||||
: `${sourceTag}: ${first.temp}${tempSymbol}@${first.time} -> ${last.temp}${tempSymbol}@${last.time}`;
|
: `${sourceTag}: ${first.temp}${tempSymbol}@${first.time} -> ${last.temp}${tempSymbol}@${last.time}`;
|
||||||
} else {
|
} else {
|
||||||
els.chartLegend.textContent =
|
els.chartLegend.textContent =
|
||||||
sourceCode === "noaa"
|
sourceCode === "noaa"
|
||||||
? `${sourceTag}: ${t("noContinuousObs")} | ${t("noaaSettlementLegend")}`
|
? `${sourceTag}: ${t("noContinuousObs")} | ${t("noaaSettlementLegend")}`
|
||||||
: sourceCode === "wunderground"
|
|
||||||
? `${sourceTag}: ${t("noContinuousObs")} | ${t("wundergroundSettlementLegend")}`
|
|
||||||
: `${sourceTag}: ${t("noContinuousObs")}`;
|
: `${sourceTag}: ${t("noContinuousObs")}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user