Review of "ThinkPad Thermal" version 32

Details Page Preview

ThinkPad thermal monitor, display ThinkPad thermal and fan status using /proc/acpi/ibm/thermal and /proc/acpi/ibm/fan.

Extension Homepage
https://github.com/fmujakitz/thinkpad-thermal

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Previous Reviews on this Version

JustPerfection rejected
1. Don't call functions in global scope (line 86-87, 204-211 `extension.js`). 2. `lookupByURL()` is a bad practice (line 658 `extension.js`). You can send `this` from the entry point to the class needing it when it's possible (dependency injection).
faris.mujakic posted a review
1. What would be the preferred way of handling constants? 2. Is there any other way to resolve the path? I'd gladly remove that call if possible otherwise
JustPerfection posted a review
1. If you are using `new` keyword you can move it to the function using it and create it there. If you don't like that approach, create a static class with init and uninit. Call `uninit` in disable to clean up everything you've do in `init`. Just remember to don't create any instance before init (like static property with initial value using `new`). 2. The other way would be using a global. For example: ```js enable() { ME = this; } disable() { ME = null; } ```