-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In which I tried a new technique of blocking Apple’s online store preview pages, changed the name and stuff.
- Loading branch information
Showing
3 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
@@ -1 +1,8 @@ | ||
document.cookie='disableAutoLaunch=2; path=/; domain=itunes.apple.com' | ||
|
||
var old_uri = window.location.href; | ||
var new_uri = old_uri.replace(/\?.+$/, "?ls=0"); | ||
|
||
if (new_uri != old_uri) { | ||
window.location.href = new_uri; | ||
console.log("iTunesOnline: Redirected to sane URI.") | ||
} |
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 |
---|---|---|
@@ -1,7 +1,5 @@ | ||
# iTunesOnline | ||
# Fuck iTunes Previews | ||
|
||
This Safari 5 extension will stop the iTunes Preview pages from opening in iTunes. | ||
All the other features will work, and you still can open iTunes on demand. | ||
Once upon a time Tobias Tom made a [Safari Extension](http://tobiastom.github.com/iTunesOnline.safariextension) which blocks the automatic opening of iTunes when visiting iTunes Store preview web pages. Sadly it stopped working. | ||
|
||
A little bit more information is available on it's website: | ||
http://tobiastom.github.com/iTunesOnline.safariextension | ||
So I salvaged it and tried with cursory reading of Apple’s JS to find another way. The query parameter `ls=1` seems to do the trick. Also I gave it a better name. |