By "inject code in your browser" I assume you mean "inject js into non-https sites you visit", and making this impossible is arguably the main point of TLS ("SSL").
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
By "inject code in your browser" I assume you mean "inject js into non-https sites you visit", and making this impossible is arguably the main point of TLS ("SSL").