From 29af05eb53de72f58c3d7252eb99c3d2de35c264 Mon Sep 17 00:00:00 2001 From: Edgar Lopez Date: Wed, 25 Jun 2025 08:17:05 -0700 Subject: [PATCH 1/3] Update sensorsUtil.js Json NaN values replace to zero --- freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js | 1 + 1 file changed, 1 insertion(+) diff --git a/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js b/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js index 90c6ca9..dbe689a 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js +++ b/freon@UshakovVasilii_Github.yahoo.com/sensorsUtil.js @@ -24,6 +24,7 @@ export default class SensorsUtil extends CommandLineUtil { let lineRemoved = this._output.filter(l => l.trim() !== ',').join('\n'); let errorRemoved = lineRemoved.replace(/ERROR.*Can't read/, ""); errorRemoved = errorRemoved.replace(/ERROR.*I\/O error/, ""); + errorRemoved = errorRemoved.replace(/NaN/, "0"); data = JSON.parse(errorRemoved); } catch (e) { logError(e); From ae19d55a2099cc3ccb4daa8039b3cdc88d97c570 Mon Sep 17 00:00:00 2001 From: hirishh Date: Wed, 12 Nov 2025 17:06:36 +0100 Subject: [PATCH 2/3] Remote timeout on destroy for _positionInPanelChanged() --- freon@UshakovVasilii_Github.yahoo.com/extension.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freon@UshakovVasilii_Github.yahoo.com/extension.js b/freon@UshakovVasilii_Github.yahoo.com/extension.js index cdaaa92..ce71aa1 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/extension.js +++ b/freon@UshakovVasilii_Github.yahoo.com/extension.js @@ -175,8 +175,7 @@ class FreonMenuButton extends PanelMenu.Button { // readd to update queue return true; }); - - GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { + this._positionInPanelChangedTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { this._positionInPanelChanged(); return false; // 只执行一次 }); @@ -534,6 +533,7 @@ class FreonMenuButton extends PanelMenu.Button { GLib.Source.remove(this._timeoutId); GLib.Source.remove(this._updateUITimeoutId); + GLib.Source.remove(this._positionInPanelChangedTimeoutId); for (let signal of this._settingChangedSignals){ this._settings.disconnect(signal); From 1eb84c2c014d747a0bd2800255623e45f455504a Mon Sep 17 00:00:00 2001 From: BombFoolGranny <32615723+BombFoolGranny@users.noreply.github.com> Date: Wed, 24 Dec 2025 21:07:25 +0200 Subject: [PATCH 3/3] Update extension.js Fix typos and translate comment written in Chinese --- freon@UshakovVasilii_Github.yahoo.com/extension.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freon@UshakovVasilii_Github.yahoo.com/extension.js b/freon@UshakovVasilii_Github.yahoo.com/extension.js index ce71aa1..1c78525 100644 --- a/freon@UshakovVasilii_Github.yahoo.com/extension.js +++ b/freon@UshakovVasilii_Github.yahoo.com/extension.js @@ -165,19 +165,19 @@ class FreonMenuButton extends PanelMenu.Button { this.connect('destroy', this._onButtonDestroy.bind(this)); - // don't postprone the first call by update-time. + // don't postpone the first call by update-time. this._querySensors(); this._addTimer(); this._updateUI(true); this._updateUITimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 250, () => { this._updateUI(); - // readd to update queue + // read to update queue return true; }); this._positionInPanelChangedTimeoutId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, 500, () => { this._positionInPanelChanged(); - return false; // 只执行一次 + return false; // execute only once }); }