Skip to content

Commit

Permalink
Initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
vernondegoede committed Jan 16, 2019
1 parent a1a5b7a commit 085ea60
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
Binary file added assets/icon-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions manifest.json
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"
}
}
17 changes: 17 additions & 0 deletions processes/background.js
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"],
);
15 changes: 15 additions & 0 deletions readme.md
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).

0 comments on commit 085ea60

Please sign in to comment.