A browser extension that redirects Reddit to random verses from the Quran. Each time you try to visit Reddit, you'll be redirected to a different verse on Quran.com.
-
Clone or download this repository
-
Create a new directory and add these two files:
manifest.json
background.js
(includes the Surahs data and redirect logic)
-
Load the extension in your browser:
- Open Brave browser
- Go to
brave://extensions/
- Enable "Developer mode" in the top right
- Click "Load unpacked"
- Select the directory containing your extension files
When you try to visit Reddit, the extension:
- Generates a random verse selection from the Quran
- Creates a redirect URL to that specific verse on Quran.com
- Automatically redirects your browser to that verse
Each visit to Reddit will take you to a different random verse.
If the extension isn't working:
- Make sure it's enabled in
brave://extensions/
- Clear your browser cache
- Make sure Reddit isn't open in any other tabs
- Disable other extensions that might interfere with redirects
To see debug logs:
- Go to
brave://extensions/
- Find this extension
- Click "service worker" to open DevTools
- Check the Console tab for logs
{
"manifest_version": 3,
"name": "Reddit to Quran Redirector",
"version": "1.0",
"description": "Redirects reddit.com to random Quran verses",
"permissions": [
"declarativeNetRequest",
"declarativeNetRequestFeedback",
"webNavigation"
],
"host_permissions": [
"*://*.reddit.com/*"
],
"background": {
"service_worker": "background.js"
}
}
Contains:
- Full Surahs data array
- Random verse selection logic
- Redirect rule management
- Navigation event handling
To add more websites to redirect from:
- Add the domain to the
host_permissions
array inmanifest.json
- Modify the URL matching condition in the redirect rule in
background.js
To remove the extension:
- Go to
brave://extensions/
- Find the extension
- Click "Remove"
Or click the "Remove" button in the extension card.