when are the numbers updated
Private research annotation
Sign in to add a private research label or note.
- User
when are the numbers updated
Assistant
The numbers displayed in the Dumb Stats popup are updated in two ways:
-
Scroll Distance: This value is updated every 350 milliseconds via a
setIntervalcall within theuseEffecthook inApp.js. This means the displayed scroll distance will refresh roughly three times per second. -
Clicks, Keystrokes, and Pages Viewed: These values are updated immediately after the corresponding event occurs (click, keyup, load). The event listeners in
content/index.jsincrement the counts in local storage, and the popup retrieves and displays the updated values using thegetData()function inApp.jswhich is called directly after initial render and after a "reset". While not continuously updated like the scroll distance, these values should reflect the latest counts shortly after the actions are performed. There's a minor delay involved in retrieving the values from storage.
-
- User
do the stats always get tracked or do they not work on some websites
Assistant
The stats should be tracked on most websites. The
manifest.jsonfile specifies that the content script (content/index.js, which contains the event listeners for tracking user actions) should be injected into pages matching the patternhttps://*/*andhttp://*/*. This covers virtually all websites.However, there's one explicit exception: websites containing "webstore" in their URL are skipped. This is likely to prevent the extension from interfering with the Chrome Web Store itself. It's possible there could also be implicit exceptions. For example, certain websites might employ security measures that prevent content scripts from running correctly, or interfere with the extension's access to storage. If a website uses a very strict Content Security Policy (CSP), it could block the execution of inline Javascript, which might affect the extension. It's also possible that some browser-specific quirks or compatibility issues could prevent proper tracking on certain websites.
Barring these unlikely scenarios, Dumb Stats should generally function as expected across the web.
- User
on google docs I scroll and I also type and the stats don't seem to update
Assistant
You're right to notice that. Google Docs (and other similar web apps like Sheets and Slides) utilizes iframes and dynamic content loading that can interfere with extensions like Dumb Stats. Here's why:
-
Iframes: Google Docs edits happen within an iframe, essentially a web page embedded within another. The content script injected by Dumb Stats runs in the context of the top-level frame, not within each iframe. So, events like scrolling and typing within the Google Docs iframe might not be directly captured.
-
Dynamic Content Loading: Google Docs heavily relies on JavaScript to dynamically update the page content. This can cause issues where the content script is either not properly attached to the dynamically created elements or gets detached during updates, preventing events from being captured reliably.
-
Specific Event Handling: Google Docs may have its own internal event listeners and handling mechanisms that could override or interfere with the standard event listeners used by Dumb Stats.
Therefore, while Dumb Stats is designed to work on most websites, the complex nature of web applications like Google Docs presents challenges that prevent consistent tracking. The extension would need to employ more sophisticated techniques (e.g., injecting scripts into iframes, handling dynamic content updates) to work correctly in these environments.
-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.