The Dev Token Injector is a Chrome extension that automatically adds the query parameter dev_token=TRUE
to various types of web requests. This is particularly useful for development and testing environments where you need to consistently append this parameter to all requests.
- Automatically injects
dev_token=TRUE
to URLs - Works with multiple resource types:
- Web Pages (main frames)
- JavaScript files
- CSS files
- iFrames
- AJAX/XMLHttpRequests
- Simple, lightweight interface
- No configuration needed - works out of the box
- Clone or download this repository
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" using the toggle in the top right corner
- Click "Load unpacked"
- Select the directory containing the extension files
The extension consists of three files:
manifest.json
: Extension configurationbackground.js
: Core functionalitypopup.html
: User interface
The extension uses Chrome's declarativeNetRequest
API to intercept and modify web requests. When a request is made for any supported resource type, the extension automatically adds dev_token=TRUE
to the URL's query parameters before the request is completed.
main_frame
: Main page loadsscript
: JavaScript filesstylesheet
: CSS filessub_frame
: iFramesxmlhttprequest
: AJAX requests
- Install the extension
- The extension will automatically start working - no additional configuration required
- Click the extension icon in the Chrome toolbar to see its status
- All supported requests will automatically have
dev_token=TRUE
added to their URLs
Original URL:
https://example.com/script.js
Modified URL:
https://example.com/script.js?dev_token=TRUE
The extension requires the following permissions:
declarativeNetRequest
: For modifying web requestsstorage
: For potential future configuration storage<all_urls>
: To work across all websites
- Uses Manifest V3
- Implements modern Chrome extension best practices
- Uses the declarative network request API for better performance and security
-
Extension not working on certain sites
- Check if the site is accessible
- Verify the extension is enabled
- Check Chrome's console for any errors
-
Parameter not being added
- Ensure the resource type is supported
- Check if the URL already has the parameter
- Create a new directory for the extension
- Copy the three required files into the directory
- Load the extension in Chrome using Developer mode
- Modify the files as needed
- Return to
chrome://extensions/
- Click the refresh icon on the extension card
- Test your changes
Feel free to submit issues and enhancement requests!
This project is licensed under the MIT License - see the LICENSE file for details