-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1a5b7a
commit 085ea60
Showing
4 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"name": "Adfree Soundcloud", | ||
"version": "1.0", | ||
"description": "Enjoy Soundcloud without the need for a Pro account.", | ||
"manifest_version": 2, | ||
"background": { | ||
"scripts": ["processes/background.js"], | ||
"persistent": true | ||
}, | ||
"permissions": ["webRequest", "webRequestBlocking", "tabs", "<all_urls>"], | ||
"icons": { | ||
"128": "assets/icon-128.png" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Every time you select a track (or automatically load the next track), | ||
* Soundcloud will request whether it should load an ad by making a request to | ||
* https://api-v2.soundcloud.com/audio-ad. | ||
* | ||
* By intercepting these requests it will never load an ad. | ||
*/ | ||
chrome.webRequest.onBeforeRequest.addListener( | ||
({ url }) => { | ||
const isAdvertisementRequest = url.includes( | ||
"https://api-v2.soundcloud.com/audio-ad", | ||
); | ||
return isAdvertisementRequest ? { cancel: true } : {}; | ||
}, | ||
{ urls: ["*://api-v2.soundcloud.com/*"] }, | ||
["blocking"], | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Adfree Soundcloud 🔥 | ||
|
||
This extension will intercept certain Soundcloud requests and allows you to enjoy soundcloud without having to listen to ads. | ||
|
||
## Installation ⌨️ | ||
|
||
1. Clone this repository: `git clone [email protected]:vernondegoede/adfree-soundcloud.git` | ||
2. Open [`chrome://extensions`](chrome://extensions) | ||
3. Toggle the "Developer mode" checkbox in the top-right corner. | ||
4. Press the "Load unpacked" button in the top-left corner. | ||
5. Open the folder from the location where you just cloned this repository. | ||
|
||
## Legal 👩💼 | ||
|
||
This repository was created for educational purposed. Soundcloud needs advertisements to run its business. If you want to enjoy Soundcloud without ads, you should subscribe for [SoundCloud Go](https://soundcloud.com/go). |