IdeaCredIdeaCred

Eliastik/page-shadow

69

A Chrome, Firefox, Opera and Edge extension to increase contrast, decrase brightness and invert color of websites

What's novel

A Chrome, Firefox, Opera and Edge extension to increase contrast, decrase brightness and invert color of websites

Code Analysis

5 files read · 3 rounds

A JavaScript class that analyzes image data to detect if an image or canvas element is 'dark' based on HSL luminance and transparency thresholds, with caching support.

Strengths

The implementation demonstrates solid separation of concerns by isolating pixel-level analysis (`isPixelDark`) from block-level context checks (`hasTransparentSurroundingPixels`). The use of SHA256 hashing for cache keys is a practical and efficient approach to memoization. Error handling via `debugLogger` provides a structured way to report issues without crashing.

Weaknesses

There are no visible tests, which makes it impossible to verify correctness or edge case coverage. Input validation is minimal (e.g., no checks for invalid image formats or corrupted data). The reliance on external config (`websiteSpecialFiltersConfig`) without inline defaults could lead to runtime errors if the config is missing.

Score Breakdown

Innovation
2 (25%)
Craft
66 (35%)
Traction
29 (15%)
Scope
75 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+1
Concept Novelty+0

Craft

Ci+5
Tests-5
Polish+1
Releases+5
Has License+5
Code Quality+18
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+5
Has Dependency Mgmt+5

Traction

Forks+6
Stars+20
Hn Points+0
Watchers+3
Early Traction+0
Devto Reactions+0
Community Contribs+0

Scope

Commits+8
Languages+8
Subsystems+5
Bloat Penalty+0
Completeness+7
Contributors+5
Authored Files+15
Readme Code Match+3
Architecture Depth+7
Implementation Depth+8

Evidence

Commits

69

Contributors

1

Files

182

Active weeks

14

TestsCI/CDREADMELicenseContributing

Repository

Language

JavaScript

Stars

20

Forks

1

License

GPL-3.0