This commit is contained in:
Raymond Hill 2014-12-12 21:00:00 -02:00
commit e90affd11f
7 changed files with 129 additions and 91 deletions

View File

@ -1,55 +1,55 @@
2d0a4786a7175bf73b788436cf65bc5a assets/ublock/filter-lists.json
6572a7bce5f1747fee597cb170bd3b98 assets/ublock/privacy.txt
9aefd6606f4a044922ab2b1485c5aa2b assets/ublock/filters.txt
f9eaccce49aa67242acda2146844e967 assets/ublock/filters.txt
4d9e52dd0f2fa7b4ff3c80043096e542 assets/ublock/mirror-candidates.txt
36a285b3ef9aadad4529d40153364013 assets/thirdparties/adblock-chinalist.googlecode.com/svn/trunk/adblock.txt
d8c58f5bb8072907ae361bc14dbbd28f assets/thirdparties/cjxlist1.googlecode.com/svn/cjxlist.txt
2d0a4786a7175bf73b788436cf65bc5a assets/ublock/filter-lists.json
132b3ecc9da8a68c3faf740c00af734b assets/thirdparties/adblock-plus-japanese-filter.googlecode.com/hg/abp_jp.txt
92c58e409ec83e8ced7585926107a6e9 assets/thirdparties/margevicius.lt/easylistlithuania.txt
060652e904fcea82c4e580ee00bed289 assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat
a4a6263c8de2d83ae1a421a9078bbbf4 assets/thirdparties/gitorious.org/adblock-latvian/adblock-latvian/raw/master_lists/latvian-list.txt
3d27fcdde8227d412f83cff632dbf84b assets/thirdparties/winhelp2002.mvps.org/hosts.txt
84d7713e35caa1e50fcc20b1e59d8a14 assets/thirdparties/dl.dropboxusercontent.com/u/1289327/abpxfiles/filtri.txt
8cddc3670f943c29e9ad414c6c824586 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt
9f9ef259383fd6c7b9512510e09520e0 assets/thirdparties/easylist-downloads.adblockplus.org/fanboy-social.txt
e19a6f2e740cc2dafad755570947235f assets/thirdparties/easylist-downloads.adblockplus.org/easylistdutch.txt
aa09cfb2545ef53466b25f3d48e23d39 assets/thirdparties/easylist-downloads.adblockplus.org/liste_fr.txt
744973ebc9f09ae95ba54e904720df64 assets/thirdparties/easylist-downloads.adblockplus.org/bitblock.txt
265664d04412d8d92ea8f35d5031b508 assets/thirdparties/easylist-downloads.adblockplus.org/advblock.txt
97787d8bdf0934e62346eaa88397b1f4 assets/thirdparties/easylist-downloads.adblockplus.org/easylistitaly.txt
f3f2c736ad0657615ecc0469e2e963ef assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
eb1f011e1bc07d1622e692ce36883b59 assets/thirdparties/easylist-downloads.adblockplus.org/easylistgermany.txt
91ddec5690cf768aae78991bc2720783 assets/thirdparties/easylist-downloads.adblockplus.org/fanboy-annoyance.txt
c7bae0ca55889531a7df03d8ddd5e61e assets/thirdparties/easylist-downloads.adblockplus.org/easylist_noelemhide.txt
afcb9920d8b0dc976e29d3808213442f assets/thirdparties/easylist-downloads.adblockplus.org/easylistchina.txt
81fb33375814d8fb1653ba721ffd6a01 assets/thirdparties/adblock.schack.dk/block.txt
b402abedcda3677c556b2d744ece09b2 assets/thirdparties/spam404bl.com/spam404scamlist.txt
75bf0496156a400d8a1b6774a268fa35 assets/thirdparties/mirror1.malwaredomains.com/files/justdomains
0e3236a770da854c9a5794a62c04f86f assets/thirdparties/mirror1.malwaredomains.com/files/immortal_domains.txt
7f0443f3dcc9abfd47cfbc95ce824ddb assets/thirdparties/mirror1.malwaredomains.com/files/README.md
94c0a3eab74c42783855f07b22a429cf assets/thirdparties/home.fredfiber.no/langsholt/adblock.txt
e7b1cef35f53b978f4dc00c575a7f384 assets/thirdparties/adblock.gardar.net/is.abp.txt
01a64a1ed377bd4341fb2879dabc4154 assets/thirdparties/www.hufilter.hu/hufilter.txt
2f4221b9d446dccc99c0004161bdb24a assets/thirdparties/liste-ar-adblock.googlecode.com/hg/Liste_AR.txt
28a6a3c255a051f7d6c5a026e500ee51 assets/thirdparties/someonewhocares.org/hosts/hosts
e00124880337378ec2f7c730498ce336 assets/thirdparties/raw.githubusercontent.com/k2jp/abp-japanese-filters/master/abp_jp.txt
a9f5ec5226364a4ea816c73b469bc1d0 assets/thirdparties/raw.githubusercontent.com/tomasko126/easylistczechandslovak/master/filters.txt
5f2cce7f872225e138b6359b8623abc5 assets/thirdparties/raw.githubusercontent.com/AdBlockPlusIsrael/EasyListHebrew/master/EasyListHebrew.txt
d2bef93434001f54c5399a2c3fbffda2 assets/thirdparties/raw.githubusercontent.com/reek/anti-adblock-killer/master/anti-adblock-killer-filters.txt
54f7032c0e7ef73feb32d3c5437b8694 assets/thirdparties/raw.githubusercontent.com/wiltteri/wiltteri.txt/master/wiltteri.txt
5f2cce7f872225e138b6359b8623abc5 assets/thirdparties/raw.githubusercontent.com/AdBlockPlusIsrael/EasyListHebrew/master/EasyListHebrew.txt
a9f5ec5226364a4ea816c73b469bc1d0 assets/thirdparties/raw.githubusercontent.com/tomasko126/easylistczechandslovak/master/filters.txt
cbde6559e6100aca9690fd01f2a93ad3 assets/thirdparties/raw.githubusercontent.com/adblockpolska/Adblock_PL_List/master/adblock_polska.txt
54bd6f14a803d053c854c4056056093e assets/thirdparties/hosts-file.net/ad-servers
d8c58f5bb8072907ae361bc14dbbd28f assets/thirdparties/cjxlist1.googlecode.com/svn/cjxlist.txt
01a64a1ed377bd4341fb2879dabc4154 assets/thirdparties/www.hufilter.hu/hufilter.txt
b402abedcda3677c556b2d744ece09b2 assets/thirdparties/spam404bl.com/spam404scamlist.txt
afcb9920d8b0dc976e29d3808213442f assets/thirdparties/easylist-downloads.adblockplus.org/easylistchina.txt
91ddec5690cf768aae78991bc2720783 assets/thirdparties/easylist-downloads.adblockplus.org/fanboy-annoyance.txt
744973ebc9f09ae95ba54e904720df64 assets/thirdparties/easylist-downloads.adblockplus.org/bitblock.txt
e19a6f2e740cc2dafad755570947235f assets/thirdparties/easylist-downloads.adblockplus.org/easylistdutch.txt
f3f2c736ad0657615ecc0469e2e963ef assets/thirdparties/easylist-downloads.adblockplus.org/easyprivacy.txt
c7bae0ca55889531a7df03d8ddd5e61e assets/thirdparties/easylist-downloads.adblockplus.org/easylist_noelemhide.txt
265664d04412d8d92ea8f35d5031b508 assets/thirdparties/easylist-downloads.adblockplus.org/advblock.txt
9f9ef259383fd6c7b9512510e09520e0 assets/thirdparties/easylist-downloads.adblockplus.org/fanboy-social.txt
aa09cfb2545ef53466b25f3d48e23d39 assets/thirdparties/easylist-downloads.adblockplus.org/liste_fr.txt
97787d8bdf0934e62346eaa88397b1f4 assets/thirdparties/easylist-downloads.adblockplus.org/easylistitaly.txt
eb1f011e1bc07d1622e692ce36883b59 assets/thirdparties/easylist-downloads.adblockplus.org/easylistgermany.txt
8cddc3670f943c29e9ad414c6c824586 assets/thirdparties/easylist-downloads.adblockplus.org/easylist.txt
36a285b3ef9aadad4529d40153364013 assets/thirdparties/adblock-chinalist.googlecode.com/svn/trunk/adblock.txt
84d7713e35caa1e50fcc20b1e59d8a14 assets/thirdparties/dl.dropboxusercontent.com/u/1289327/abpxfiles/filtri.txt
0e3236a770da854c9a5794a62c04f86f assets/thirdparties/mirror1.malwaredomains.com/files/immortal_domains.txt
7f0443f3dcc9abfd47cfbc95ce824ddb assets/thirdparties/mirror1.malwaredomains.com/files/README.md
75bf0496156a400d8a1b6774a268fa35 assets/thirdparties/mirror1.malwaredomains.com/files/justdomains
060652e904fcea82c4e580ee00bed289 assets/thirdparties/publicsuffix.org/list/effective_tld_names.dat
0d707b2cee4a38988662107971137d13 assets/thirdparties/abp.mozilla-hispano.org/nauscopio/filtros.txt
92c58e409ec83e8ced7585926107a6e9 assets/thirdparties/margevicius.lt/easylistlithuania.txt
28a6a3c255a051f7d6c5a026e500ee51 assets/thirdparties/someonewhocares.org/hosts/hosts
3d27fcdde8227d412f83cff632dbf84b assets/thirdparties/winhelp2002.mvps.org/hosts.txt
81fb33375814d8fb1653ba721ffd6a01 assets/thirdparties/adblock.schack.dk/block.txt
7c0d09fbccd87b5252d3bab3e822f2e4 assets/thirdparties/adblock-czechoslovaklist.googlecode.com/svn/filters.txt
72ae2048c0201c940978d27cda361891 assets/thirdparties/stanev.org/abp/adblock_bg.txt
417e6a196b8d52e4f0de99bbfbb219e1 assets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt
042419405031f0fcfac3735bf4f05e21 assets/thirdparties/www.malwaredomainlist.com/hostslist/README.md
94c0a3eab74c42783855f07b22a429cf assets/thirdparties/home.fredfiber.no/langsholt/adblock.txt
f3e922f5a1ed51d727ad048ba734f4cf assets/thirdparties/indonesianadblockrules.googlecode.com/hg/subscriptions/abpindo.txt
56c849d5af130b803d54177dbe6aac47 assets/thirdparties/www.fanboy.co.nz/fanboy-swedish.txt
faf479000090920441f1f01a664e0aca assets/thirdparties/www.fanboy.co.nz/fanboy-vietnam.txt
2f4221b9d446dccc99c0004161bdb24a assets/thirdparties/liste-ar-adblock.googlecode.com/hg/Liste_AR.txt
bb03b49386970aa67bbbb18d6cfc88b6 assets/thirdparties/www.fanboy.co.nz/enhancedstats.txt
3a3096a818f14b56ea4c926d82f70375 assets/thirdparties/www.fanboy.co.nz/fanboy-antifacebook.txt
faf479000090920441f1f01a664e0aca assets/thirdparties/www.fanboy.co.nz/fanboy-vietnam.txt
14e2ca6df4c9aaf92c04ecd4b3784a44 assets/thirdparties/www.fanboy.co.nz/fanboy-ultimate.txt
fefaa98de47d47d2ad1100e4ff0cb85f assets/thirdparties/www.void.gr/kargig/void-gr-filters.txt
56c849d5af130b803d54177dbe6aac47 assets/thirdparties/www.fanboy.co.nz/fanboy-swedish.txt
042419405031f0fcfac3735bf4f05e21 assets/thirdparties/www.malwaredomainlist.com/hostslist/README.md
417e6a196b8d52e4f0de99bbfbb219e1 assets/thirdparties/www.malwaredomainlist.com/hostslist/hosts.txt
a4a6263c8de2d83ae1a421a9078bbbf4 assets/thirdparties/gitorious.org/adblock-latvian/adblock-latvian/raw/master_lists/latvian-list.txt
f3e922f5a1ed51d727ad048ba734f4cf assets/thirdparties/indonesianadblockrules.googlecode.com/hg/subscriptions/abpindo.txt
72ae2048c0201c940978d27cda361891 assets/thirdparties/stanev.org/abp/adblock_bg.txt
54bd6f14a803d053c854c4056056093e assets/thirdparties/hosts-file.net/ad-servers
d95a0ee49a2ca59a39ad55fa6c45a386 assets/thirdparties/pgl.yoyo.org/as/serverlist
5b8e13b618c68293430913029118781a assets/thirdparties/pgl.yoyo.org/as/README.md
fefaa98de47d47d2ad1100e4ff0cb85f assets/thirdparties/www.void.gr/kargig/void-gr-filters.txt

View File

@ -190,4 +190,7 @@ google.*###center_col > #tads
# Videos broken on weather.com
# To counter `www.googletagservices.com` in MVPS, hpHosts, Dan Pollock's
@@||www.googletagservices.com/tag/js/gpt.js^$script,domain=weather.com
@@||www.googletagservices.com/tag/js/gpt.js^$script,domain=weather.com
# https://github.com/gorhill/uBlock/issues/409
@@||c.speedtest.net^$~third-party

View File

@ -3,19 +3,19 @@
<plist version="1.0">
<dict>
<key>Author</key>
<string>Raymond Hill</string>
<string>{author}</string>
<key>Builder Version</key>
<string>534.57.2</string>
<key>CFBundleDisplayName</key>
<string>µBlock</string>
<string>{name}</string>
<key>CFBundleIdentifier</key>
<string>net.gorhill.uBlock</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleShortVersionString</key>
<string>0.8.1.2</string>
<string>{version}</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>{buildNumber}</string>
<key>Chrome</key>
<dict>
<key>Database Quota</key>
@ -43,7 +43,7 @@
<key>Image</key>
<string>img/icon16.png</string>
<key>Label</key>
<string>µBlock</string>
<string>{name}</string>
<key>Popover</key>
<string>popover</string>
</dict>
@ -70,7 +70,7 @@
</array>
</dict>
<key>Description</key>
<string>Finally, an efficient blocker. Easy on CPU and memory.</string>
<string>{description}</string>
<key>ExtensionInfoDictionaryVersion</key>
<string>1.0</string>
<key>Permissions</key>
@ -84,7 +84,7 @@
</dict>
</dict>
<!-- <key>Update Manifest URL</key>
<string>https://github.com/gorhill/uBlockupdate_safariextz.plist</string> -->
<string>https://github.com/gorhill/uBlock/Safari/Update.plist</string> -->
<key>Website</key>
<string>https://github.com/gorhill/uBlock</string>
</dict>

View File

@ -8,11 +8,11 @@
<key>CFBundleIdentifier</key>
<string>net.gorhill.uBlock</string>
<key>Developer Identifier</key>
<string></string>
<string>...</string>
<key>CFBundleShortVersionString</key>
<string>0.8.1.2</string>
<string>{version}</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>{buildNumber}</string>
<key>URL</key>
<string>https://.../uBlock.safariextz</string>
</dict>

View File

@ -1,39 +0,0 @@
#!/usr/bin/env python3
import os
import json
import sys
from shutil import rmtree
from collections import OrderedDict
if not sys.argv[1]:
raise SystemExit('Build dir missing.')
def mkdirs(path):
try:
os.makedirs(path)
finally:
return os.path.exists(path)
build_dir = os.path.abspath(sys.argv[1])
locale_dir = os.path.join(build_dir, '_locales')
for alpha2 in os.listdir(locale_dir):
locale_path = os.path.join(locale_dir, alpha2, 'messages.json')
with open(locale_path, encoding='utf-8') as f:
string_data = json.load(f, object_pairs_hook=OrderedDict)
for string_name in string_data:
string_data[string_name] = string_data[string_name]['message']
rmtree(os.path.join(locale_dir, alpha2))
alpha2 = alpha2.replace('_', '-')
locale_path = os.path.join(locale_dir, alpha2 + '.json')
mkdirs(os.path.join(locale_dir))
with open(locale_path, 'wt', encoding='utf-8', newline='\n') as f:
json.dump(string_data, f, ensure_ascii=False)

74
tools/make-safari-meta.py Normal file
View File

@ -0,0 +1,74 @@
#!/usr/bin/env python3
import os
import json
import sys
from time import time
from shutil import rmtree
from collections import OrderedDict
if not sys.argv[1]:
raise SystemExit('Build dir missing.')
def mkdirs(path):
try:
os.makedirs(path)
finally:
return os.path.exists(path)
pj = os.path.join
build_dir = os.path.abspath(sys.argv[1])
description = ''
# locales
locale_dir = pj(build_dir, '_locales')
for alpha2 in os.listdir(locale_dir):
locale_path = pj(locale_dir, alpha2, 'messages.json')
with open(locale_path, encoding='utf-8') as f:
string_data = json.load(f, object_pairs_hook=OrderedDict)
if alpha2 == 'en':
description = string_data['extShortDesc']['message']
for string_name in string_data:
string_data[string_name] = string_data[string_name]['message']
rmtree(pj(locale_dir, alpha2))
alpha2 = alpha2.replace('_', '-')
locale_path = pj(locale_dir, alpha2 + '.json')
mkdirs(pj(locale_dir))
with open(locale_path, 'wt', encoding='utf-8', newline='\n') as f:
json.dump(string_data, f, ensure_ascii=False)
# update Info.plist
proj_dir = pj(os.path.split(os.path.abspath(__file__))[0], '..')
chromium_manifest = pj(proj_dir, 'platform', 'chromium', 'manifest.json')
with open(chromium_manifest, encoding='utf-8') as m:
manifest = json.load(m)
manifest['buildNumber'] = int(time())
manifest['description'] = description
with open(pj(build_dir, 'Info.plist'), 'r+t', encoding='utf-8', newline='\n') as f:
info_plist = f.read()
f.seek(0)
f.write(info_plist.format(**manifest))
# update Update.plist
update_plist = pj(proj_dir, 'platform', 'safari', 'Update.plist')
update_plist_build = pj(build_dir, '..', os.path.basename(update_plist))
with open(update_plist_build, 'wt', encoding='utf-8', newline='\n') as f:
with open(update_plist, encoding='utf-8') as u:
update_plist = u.read()
f.write(update_plist.format(**manifest))

View File

@ -20,6 +20,6 @@ cp platform/safari/Info.plist $DES/
cp platform/safari/Settings.plist $DES/
echo "*** uBlock_xpi: Generating locales"
python tools/make-locale-safari.py $DES/
python tools/make-safari-meta.py $DES/
echo "*** uBlock.safariextension: Package done."