Skip to content

Commit

Permalink
A new start
Browse files Browse the repository at this point in the history
In which I tried a new technique of blocking Apple’s online store
preview pages, changed the name and stuff.
  • Loading branch information
ttepasse committed Apr 27, 2015
1 parent c43d74e commit 22bd663
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
14 changes: 7 additions & 7 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@
<plist version="1.0">
<dict>
<key>Author</key>
<string>Tobias Tom</string>
<string>Tim Tepaße, Tobias Tom</string>
<key>Builder Version</key>
<string>10600.5.17</string>
<key>CFBundleDisplayName</key>
<string>iTunes Online</string>
<string>Fuck iTunes Previews</string>
<key>CFBundleIdentifier</key>
<string>com.github.tobiastom.iTunesOnline</string>
<string>org.tepasse.fuck-itunes</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>1.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>Chrome</key>
Expand Down Expand Up @@ -44,9 +46,7 @@
<string>Some</string>
</dict>
</dict>
<key>Update Manifest URL</key>
<string>http://tobiastom.github.com/iTunesOnline.safariextension/Updates.plist</string>
<key>Website</key>
<string>http://tobiastom.github.com/iTunesOnline.safariextension/</string>
<string>https://github.com/ttepasse/iTunesOnline.safariextension</string>
</dict>
</plist>
9 changes: 8 additions & 1 deletion Main.js
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.")
}
8 changes: 3 additions & 5 deletions README.markdown
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.

0 comments on commit 22bd663

Please sign in to comment.