A Chrome extension that reveals the "Account based in" and "Connected via" information for Twitter/X users directly on their posts.
- Region Detection: Displays the country where the account is based (e.g., "United States 🇺🇸").
- Connection Info: Shows the platform used to connect (e.g., "Android 🤖", "iPhone 🍎", "Web 🌐").
- Verification Status: Displays a green circle 🟢 if the account has a specific verified status icon (excluding generic info icons).
- Hover Details: Hover over the region info to see a detailed tooltip with the full text (e.g., "USERNAME account based in COUNTRY (With VPN) Connecting via PLATFORM").
- Data Refresh: Includes a refresh button (🔄) to re-fetch and update the region data if it has changed.
- Rate Limit Protection: Uses a "Click-to-Load" (🌍) mechanism to prevent Twitter from blocking your browser due to excessive requests.
- Caching: Saves fetched data locally so you don't have to reload it for the same user twice.
This extension does not reveal private information or provide any data that is not already publicly available on X (Twitter). It simply fetches and displays the "Account based in" and "Connected via" information that Twitter itself displays on the user's /about page (e.g. x.com/username/about).
- Activation: The extension runs on
twitter.comandx.com. - UI Injection: It injects a small globe icon (🌍) next to user names on your feed.
- Data Fetching: When you click the icon, the extension loads the user's
/aboutpage in a hidden, sandboxed iframe. - Bypassing Restrictions: It uses
declarativeNetRequestrules to stripX-Frame-OptionsandContent-Security-Policyheaders, allowing the iframe to load successfully. - Parsing: It parses the DOM of the hidden iframe to extract specific region and connection data.
- Display: The extracted data is formatted with emojis and displayed next to the user's name.
Install from Chrome Web Store:
-
Clone this repository:
git clone https://github.com/masooddalman/Twitter-Region-Viewer.git
-
Open Chrome and go to
chrome://extensions/. -
Enable Developer mode in the top right corner.
-
Click Load unpacked.
-
Select the directory where you cloned the repository.
This is a public project and contributions are welcome!
If you have ideas for improvements, bug fixes, or new features (like expanding the country flag map), please feel free to open a Pull Request.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a Pull Request.
This extension is for educational and research purposes. It relies on the current HTML structure of X.com, which may change at any time. Use it responsibly to avoid being rate-limited by the platform.


