Files
hothoney/README.md
2025-12-30 17:07:14 -07:00

37 lines
1.5 KiB
Markdown

# Honey's Extension Prettified
I ran the following to clean it up a bit:
```find . -type f -name "*.js" -exec js-beautify -r {} \;```
Which did require installing this npm package:
```pnpm -g install js-beautify```
## Analysis of h0.js (where all this nonsense is)
### **1. Decision Params**
- **`gca` (Affiliate Cookies):** Checks if the user has a cookie from any affiliate dashboard
- **`adb` (Adblock):** Checks if an ad blocker is currently active.
- **`uL` (User Login):** Is the user logged into the extension?
- **`uP` (User Points):** How many points does the user have?
- **`uA` (User Age):** How old is the user's account?
### **2. The Rules**
`ssd.json` contains the thresholds for all stores, affiliate networks, and then specific stores in that order.
### **3. Comparison**
It runs a comparison loop: **`Rule_Threshold < Current_Variable`**
- **IF** an Affiliate Link is detected (`gca`) → **STAND DOWN** (Don't steal credit).
- **IF** Adblock is active (`adb`) → **STAND DOWN** (Prevents broken tracking).
- **IF** User metrics (`uL`, `uA`) are below threshold (e.g., bot/new account) → **STAND DOWN**.
### **4. The Output**
- **Result:** A string stored in `ssd:lastState`.
- **If Match:** Returns the reason (e.g., `"uP:69420"`). The extension complies with stand down.
- **If No Match:** Returns `null`. The extension ignores stand down.
## To Honey
Wild that you made this client-side, given that your rules were already server-side. Nothing is truly private if it runs on the client.