Remove Wunderground settlement reference from extension charts

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