A Chrome extension that automatically redirects broken BSE (Bombay Stock Exchange) corporate announcement links by switching between "AttachHis" and "AttachLive" when directly navigating to broken URLs.
BSE's corporate announcement links have two variants:
AttachHis/- Historical attachmentsAttachLive/- Live attachments
Sometimes a working link stops working and returns a 404 error. Switching between these two variants often resolves the issue.
Example:
- Not working:
https://www.bseindia.com/xml-data/corpfiling/AttachHis/0DF3C1F8-F43D-4D00-85E7-D4F9B9148F16-123617.pdf - Working:
https://www.bseindia.com/xml-data/corpfiling/AttachLive/0DF3C1F8-F43D-4D00-85E7-D4F9B9148F16-123617.pdf
This Chrome extension automatically:
- Detects when you directly navigate to a BSE corporate announcement link
- Tests if the current URL is accessible
- If the current URL returns a 404, tries the alternative variant (AttachHis ↔ AttachLive)
- Automatically redirects to the working URL if found
- Shows a notification to inform you about the redirect
- Download the extension zip file (scroll to "Assets" section)
- In Chrome, go to
chrome://extensions/ - Enable "Developer mode"
- Drag and drop the zip file onto the extensions page
- Download or clone this repository to your local machine
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right corner
- Click "Load unpacked" and select the folder containing the extension files
- The extension should now appear in your extensions list
- Install the extension following the installation instructions above
- When you directly navigate to a broken BSE link (e.g., by typing the URL in the address bar or clicking a direct link), the extension will:
- Automatically detect that the current page URL is a broken BSE link
- Test the alternative variant (AttachHis ↔ AttachLive)
- Show a notification if a working alternative is found
- Automatically redirect to the working link
- Show an error notification if both variants are broken
- Broken URL:
https://www.bseindia.com/xml-data/corpfiling/AttachHis/0DF3C1F8-F43D-4D00-85E7-D4F9B9148F16-123617.pdf - Extension will try:
https://www.bseindia.com/xml-data/corpfiling/AttachLive/0DF3C1F8-F43D-4D00-85E7-D4F9B9148F16-123617.pdf - Result: Automatic redirect to the working URL
- Direct Navigation Support: Automatically handles broken BSE links when directly navigating to them
- Smart URL Testing: Tests both AttachHis and AttachLive variants
- User Notifications: Shows notifications when redirecting or when both variants are broken
- Console Logging: Detailed logs in browser console for debugging
- Performance Optimized: Uses HEAD requests to minimize bandwidth usage
- Manifest V3 Compatible: Works with the latest Chrome extension manifest version
bse-link-fixer/
├── manifest.json # Extension manifest
├── content.js # Content script for page interaction
├── README.md # This file
- Content Script (
content.js):- Runs only on BSE corporate filing URLs
- Checks if the current page URL is a broken BSE link
- Tests both AttachHis and AttachLive variants
- Automatically redirects to the working URL
- Shows user notifications
- Check if the extension is enabled in
chrome://extensions/ - Open browser console (F12) and look for "BSE Link Fixer" messages
- Ensure you're on a BSE page with corporate announcement links
- Try refreshing the page
- The extension only fixes links that return 404 errors
- If a link returns a different error (403, 500, etc.), it won't be fixed
- Check the browser console for detailed logs
- The extension uses HEAD requests to minimize bandwidth
- Links are tested asynchronously to avoid blocking the page
- If you experience slowdowns, check the console for error messages
To modify the extension:
- Edit the source files (
content.js,manifest.json) - Go to
chrome://extensions/ - Click the refresh icon on the extension card
- Test on a BSE page
Feel free to submit issues and enhancement requests!