This extension allows you to override the behavior of window.open and remove target="_blank" from links on specified domains. It can be configured to work on any Chromium-based browser (such as Chrome, Edge, Brave) as well as Firefox.
- Override
window.open: Ensures that links that would normally open in a new tab or window open in the current tab instead. - Remove
target="_blank": Removestarget="_blank"attributes from links, ensuring they open in the same tab. - Customizable Domains: Specify which domains you want these behaviors to apply to.
- Flexible Control: Enable or disable both behaviors for individual domains.
- Download the repository:
- Clone the repository using Git:
https://github.com/BhashkarGupta/Same-Tab.git - Or download the ZIP file and extract it.
- Clone the repository using Git:
- Open the Extension Page:
- Navigate to
chrome://extensions/(for Chrome) oredge://extensions/(for Edge). - Toggle Developer Mode in the top-right corner.
- Navigate to
- Load the Extension:
- Click on Load Unpacked .
- Select the folder where you extracted the extension files.
- Configure the Extension:
- Click on the extension icon in the toolbar.
- Add the domain of the website you want to apply the
window.openandtarget="_blank"overrides to. - Visit the Options page to manage your list of domains.
- Download the repository:
- Clone the repository using Git:
https://github.com/BhashkarGupta/Same-Tab.git - Or download the ZIP file and extract it.
- Clone the repository using Git:
- Open the Extension Page:
- Go to
about:debugging#/runtime/this-firefoxin Firefox.
- Go to
- Load the Extension:
- Click on Load Temporary Add-on .
- Select the
manifest.jsonfile from the extracted folder.
- Configure the Extension:
- Click on the extension icon in the toolbar.
- Add the domain of the website where you want the overrides to be applied.
- Visit the Options page to manage your list of domains.
- Add a Domain:
- Click on the extension icon in the toolbar, and then click "Add Current Domain" to quickly add the domain of the currently active tab.
- Alternatively, you can manually enter domains in the Options page.
- Manage Domains:
- Go to the Options page (right-click the extension icon and click Options ).
- You can enable or disable
window.openoverride andtarget="_blank"removal for each domain by toggling the checkboxes. - You can remove any domain from the list by clicking the Remove button.
- Check/Uncheck All:
- On the Options page, you can check or uncheck all domains for both
window.openoverride andtarget="_blank"removal.
- On the Options page, you can check or uncheck all domains for both
- Open a Supported Browser:
- Make sure the browser supports extensions (Chrome, Firefox, Edge, Brave, etc.).
- Install the Extension:
- Follow the steps above to install the extension.
- Add a Domain:
- Use the extension popup to add domains for which you want to override
window.openand removetarget="_blank".
- Use the extension popup to add domains for which you want to override
- Verify Behavior:
- Test the domain you've added by clicking links that would normally open in a new tab. These should now open in the same tab (if the
window.openoverride is enabled). - Links with
target="_blank"should no longer open in a new tab.
- Test the domain you've added by clicking links that would normally open in a new tab. These should now open in the same tab (if the
