aprzn123 / TheThirdCan

A browser extension designed to improve https://twocansandstring.com
MIT License
7 stars 4 forks source link

implement getUserIDFromAnswerPage #34

Closed HumanoidSandvichDispenser closed 1 year ago

HumanoidSandvichDispenser commented 1 year ago

The GetUserID method is a hacky way to get the user ID since it calls TC.Legacy.getPage("/answer") to fetch the answer page and scrape the user ID from there. It should be used when the user ID is not stored anywhere in the page (e.g. "/savedquestions").

This adds a new method GetUserIDFromAnswerPage which should be used in the answer page.

aprzn123 commented 1 year ago

Not a fan of the API, bus we can fix that later (I realized there's a better way to use utilities in injected scripts)