Skip to content

Commit 085ea60

Browse files
committed
Initial commit.
1 parent a1a5b7a commit 085ea60

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

assets/icon-128.png

5.05 KB
Loading

manifest.json

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"name": "Adfree Soundcloud",
3+
"version": "1.0",
4+
"description": "Enjoy Soundcloud without the need for a Pro account.",
5+
"manifest_version": 2,
6+
"background": {
7+
"scripts": ["processes/background.js"],
8+
"persistent": true
9+
},
10+
"permissions": ["webRequest", "webRequestBlocking", "tabs", "<all_urls>"],
11+
"icons": {
12+
"128": "assets/icon-128.png"
13+
}
14+
}

processes/background.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Every time you select a track (or automatically load the next track),
3+
* Soundcloud will request whether it should load an ad by making a request to
4+
* https://api-v2.soundcloud.com/audio-ad.
5+
*
6+
* By intercepting these requests it will never load an ad.
7+
*/
8+
chrome.webRequest.onBeforeRequest.addListener(
9+
({ url }) => {
10+
const isAdvertisementRequest = url.includes(
11+
"https://api-v2.soundcloud.com/audio-ad",
12+
);
13+
return isAdvertisementRequest ? { cancel: true } : {};
14+
},
15+
{ urls: ["*://api-v2.soundcloud.com/*"] },
16+
["blocking"],
17+
);

readme.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Adfree Soundcloud 🔥
2+
3+
This extension will intercept certain Soundcloud requests and allows you to enjoy soundcloud without having to listen to ads.
4+
5+
## Installation ⌨️
6+
7+
1. Clone this repository: `git clone [email protected]:vernondegoede/adfree-soundcloud.git`
8+
2. Open [`chrome://extensions`](chrome://extensions)
9+
3. Toggle the "Developer mode" checkbox in the top-right corner.
10+
4. Press the "Load unpacked" button in the top-left corner.
11+
5. Open the folder from the location where you just cloned this repository.
12+
13+
## Legal 👩‍💼
14+
15+
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).

0 commit comments

Comments
 (0)