Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
mkdir socialswitch-v1.0-chrome
cp chrome/background.js chrome/manifest.json chrome/popup.js chrome/popup.html chrome/support.html chrome/style.css socialswitch-v1.0-chrome/
cp -r chrome/icons/ socialswitch-v1.0-chrome/
mkdir socialswitch-v1.1-firefox
cp firefox/background.js firefox/manifest.json firefox/popup.js firefox/style.css chrome/popup.html chrome/support.html socialswitch-v1.1-firefox/
cp -r chrome/icons/ socialswitch-v1.1-firefox/
mkdir socialswitch-v1.2-firefox
cp firefox/background.js firefox/manifest.json firefox/popup.js firefox/style.css chrome/popup.html chrome/support.html socialswitch-v1.2-firefox/
cp -r chrome/icons/ socialswitch-v1.2-firefox/

- name: Upload Chrome Artifact
uses: actions/upload-artifact@v4
Expand All @@ -29,5 +29,5 @@ jobs:
- name: Upload Firefox Artifact
uses: actions/upload-artifact@v4
with:
name: socialswitch-v1.1-firefox
path: socialswitch-v1.1-firefox
name: socialswitch-v1.2-firefox
path: socialswitch-v1.2-firefox
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ This extension is not affiliated with Instagram, TikTok, Picuki, Imginn, UrleBir

- **Firefox for Desktop**

- Download the [socialswitch-v1.0-firefox.zip](https://github.com/claromes/socialswitch/releases/tag/v1.0) file
- Download the [socialswitch-firefox.xpi](https://github.com/claromes/socialswitch/releases) file
- Open Firefox and navigate to `about:addons`
- From the settings cog, press "Install Add-on From File..." (located at the top-right corner)
- Select the extension file

- **Chrome**

- Download the [socialswitch-v1.0-chrome.zip](https://github.com/claromes/socialswitch/releases/tag/v1.0) file
- Download the [socialswitch-chrome.zip](https://github.com/claromes/socialswitch/releases) file
- Extract the ZIP file
- Open Google Chrome and navigate to `chrome://extensions`
- Enable "Developer Mode" (located at the top-right corner)
Expand Down
10 changes: 5 additions & 5 deletions firefox/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ browser.runtime.onMessage.addListener(function (request, sender, sendResponse) {

browser.webRequest.onBeforeRequest.addListener(
function (details) {
if(details.method === 'POST') {
// let the request go through unchanged
return {};
}
// -- Instagram --
// Get storage option
browser.storage.local.get(
Expand Down Expand Up @@ -83,6 +79,7 @@ browser.webRequest.onBeforeRequest.addListener(
}

const handleProfile = details.url.split('/')[3];
const pathSegment = details.url.split('/')[4];
const handleProfileWithPost = details.url.split('/')[4];

// Ignore post, stories, reel, TV and explore URLs
Expand All @@ -94,7 +91,10 @@ browser.webRequest.onBeforeRequest.addListener(
handleProfile !== 's' &&
handleProfile !== 'reel' &&
handleProfile !== 'tv' &&
handleProfile !== 'explore'
handleProfile !== 'explore' &&
// Firefox redirection issue
handleProfile !== 'ajax' &&
!pathSegment.includes('bz?')
) {
// https://instagram.com/<handle>
// https://instagram.com/<handle>/
Expand Down
2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Social Switch: Anonymous Instagram and TikTok",
"version": "1.1",
"version": "1.2",
"description": "Redirect Instagram and TikTok URLs to anonymous viewers",
"homepage_url": "https://github.com/claromes/socialswitch",
"author": "Claromes",
Expand Down
Loading