Skip to content

Commit 219edda

Browse files
committed
Ports cleanup
- Remove duplicate platform specific (from src/) and other unnecessary files - Fix and update vapi-*.js files for Safari - Add tools/make-safari.sh - Move js/vapi-appinfo.js to meta/ (so, every vendor specific file will be at the same location)
1 parent dffe9c7 commit 219edda

23 files changed

+505
-2332
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
*.bak
22
*.pem
3-
*.safariextension/
43
/meta/safariextz/certs/
5-
/dist/build/
6-
/tmp/
4+
/dist/build/

meta/config.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

meta/crx/update_crx.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

meta/crx/vapi-background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ vAPI.tabs.open = function(details) {
158158

159159
if ( details.select ) {
160160
chrome.tabs.query({ currentWindow: true }, function(tabs) {
161-
var url = targetURL.replace(rgxHash, '');
162-
// this is questionable
163161
var rgxHash = /#.*/;
162+
// this is questionable
163+
var url = targetURL.replace(rgxHash, '');
164164
var selected = tabs.some(function(tab) {
165165
if ( tab.url.replace(rgxHash, '') === url ) {
166166
chrome.tabs.update(tab.id, { active: true });

meta/safariextz/Info.plist

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
<plist version="1.0">
44
<dict>
55
<key>Author</key>
6-
<string>{author}</string>
6+
<string>Raymond Hill</string>
77
<key>Builder Version</key>
88
<string>534.57.2</string>
99
<key>CFBundleDisplayName</key>
10-
<string>{name}</string>
10+
<string>µBlock</string>
1111
<key>CFBundleIdentifier</key>
12-
<string>{app_id}</string>
12+
<string>net.gorhill.uBlock</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleShortVersionString</key>
16-
<string>{version}</string>
16+
<string>0.7.0.10</string>
1717
<key>CFBundleVersion</key>
18-
<string>{build_number}</string>
18+
<string>1456132</string>
1919
<key>Chrome</key>
2020
<dict>
2121
<key>Database Quota</key>
@@ -43,7 +43,7 @@
4343
<key>Image</key>
4444
<string>img/icon16.png</string>
4545
<key>Label</key>
46-
<string>{name}</string>
46+
<string>µBlock</string>
4747
<key>Popover</key>
4848
<string>popover</string>
4949
</dict>
@@ -70,7 +70,7 @@
7070
</array>
7171
</dict>
7272
<key>Description</key>
73-
<string>{description}</string>
73+
<string>Finally, an efficient blocker. Easy on CPU and memory.</string>
7474
<key>ExtensionInfoDictionaryVersion</key>
7575
<string>1.0</string>
7676
<key>Permissions</key>
@@ -84,8 +84,8 @@
8484
</dict>
8585
</dict>
8686
<!-- <key>Update Manifest URL</key>
87-
<string>{url}update_safariextz.plist</string> -->
87+
<string>https://github.com/gorhill/uBlockupdate_safariextz.plist</string> -->
8888
<key>Website</key>
89-
<string>{url}</string>
89+
<string>https://github.com/gorhill/uBlock</string>
9090
</dict>
9191
</plist>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// Only for Safari
21
// Adding new URL requires to whitelist it in the background script too (addContentScriptFromURL)
32
// Note that the sitePach function will be converted to a string, and injected
43
// into the web-page in order to run in that scope. Because of this, variables

meta/safariextz/update_safariextz.plist

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<array>
77
<dict>
88
<key>CFBundleIdentifier</key>
9-
<string>{app_id}</string>
9+
<string>net.gorhill.uBlock</string>
1010
<key>Developer Identifier</key>
11-
<string>{developer_identifier}</string>
11+
<string></string>
1212
<key>CFBundleShortVersionString</key>
13-
<string>{version}</string>
13+
<string>0.7.0.10</string>
1414
<key>CFBundleVersion</key>
15-
<string>{build_number}</string>
15+
<string>1456132</string>
1616
<key>URL</key>
17-
<string>{url}/{name}.safariextz</string>
17+
<string>https://.../uBlock.safariextz</string>
1818
</dict>
1919
</array>
2020
</dict>

0 commit comments

Comments
 (0)