diff --git a/README.md b/README.md index 3b41cf7..07c03f3 100644 --- a/README.md +++ b/README.md @@ -7,3 +7,26 @@ I ran the following to clean it up a bit: 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.