- Download the extension, but don't install it, from http://junecloud.com/software/mac/demobilizer.html
- xar -xf Demobilizer.safariextz
- cd Demobilizer.safariextension
- patch -p1 < demobilizer-vancouver-sun-cbc-links.patch
- In Safari, make sure the Develop menu is enabled. Safari menu, Preferences, Advanced, bottom checkbox.
- You might need to be in the Safari Extension Developer program. It's free. https://developer.apple.com/programs/safari/
- In Safari, click Develop, then Show Extension Builder.
- Click the + button in the bottom left corner, then "Add Extension".
- Find the Demobilizer.safariextension directory you created in step 2.
- You might need to increase the version number.
- Click "Install".
Created
April 8, 2015 20:24
-
-
Save sillygwailo/c7a55e82623df6e9f467 to your computer and use it in GitHub Desktop.
Add CBC and Vancouver Sun links to the Demobilizer Safari Extension
This file contains hidden or 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
diff --git a/Info.plist b/Info.plist | |
index 367b165..7f18dd3 100644 | |
--- a/Info.plist | |
+++ b/Info.plist | |
@@ -96,6 +96,8 @@ | |
<string>www.amazon.fr</string> | |
<string>www.amazon.it</string> | |
<string>www.huffingtonpost.com</string> | |
+ <string>www.vancouversun.com</string> | |
+ <string>www.cbc.ca</string> | |
<string>*.blogspot.com</string> | |
<string>*.m.wikipedia.org</string> | |
</array> | |
diff --git a/global.html b/global.html | |
index 35816b9..f5f829e 100644 | |
--- a/global.html | |
+++ b/global.html | |
@@ -165,6 +165,14 @@ function demobilizeURL (domain,url,query,html) { | |
} | |
break; | |
+ case 'www.vancouversun.com': | |
+ var newurl = url.replace(/^(https?):\/\/www\.vancouversun\.com\/touch\//,'$1://www.vancouversun.com/'); | |
+ break; | |
+ | |
+ case 'www.cbc.ca': | |
+ var newurl = url.replace(/^(https?):\/\/www\.cbc\.ca\/m\//,'$1://www.cbc.ca/'); | |
+ break; | |
+ | |
} | |
return newurl; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment