没有什么关联的三则。
1. 火狐addon的PKGBUILD:
从CVS获取代码编译最新版插件的PKGBUILD,对喜欢用测试版Fx的用户可能有点用。
community里面有稳定版的adblock-plus、noscript,是下载XPI解压然后打包的。自己写的话,可以参考其中确定安装目录的部分。
adblock-plus
从hg获取的代码有个metadata,里面可以提取Fx版本支持信息,所以写成动态获取依赖版本了。
另外,第一次知道,用某些CVS的PKGBUILD中不用自己写clone代码的部分…… makepkg会自动完成。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | pkgname=firefox-adblock-plus-hg pkgver=3414 pkgrel=1 pkgdesc= "plugin for firefox which disables script (mercurial developing version)" arch=( 'any' ) url= "https://adblockplus.org/" license=( 'GPL' ) depends=( "firefox" ) conflicts=( "firefox-adblock-plus" ) provides=( "firefox-adblock-plus" ) makedepends=( 'unzip' 'python2-jinja' 'mercurial' ) _hgroot= "https://hg.adblockplus.org/" _hgrepo= "adblockplus" build() { rm -rf "$srcdir/$_hgrepo-build" cp -rf "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build" cd "$srcdir/$_hgrepo-build" # determine supported firefox versions _fxver=($( sed -n 's/firefox=\(.*\)/\1/p' metadata | sed "s/\//\ /" )) _abpver=$( sed -n 's/version=\(.*\)/\1/p' metadata) _emid=$( sed -n 's/id=\(.*\)/\1/p' metadata) depends=( "firefox>=${_fxver[0]}" "firefox<=${_fxver[1]}" ) provides=( "firefox-adblock-plus=$_abpver" ) python2 build.py build abp.xpi install -d "$pkgdir/usr/lib/firefox/extensions/$_emid" unzip -od "$pkgdir/usr/lib/firefox/extensions/$_emid" abp.xpi # unzip set filemode extracted from XPI file to 600 # I don't know why :3 chmod -R a+r "$pkgdir/usr/lib/firefox/extensions/$_emid" } |
https-everywhere
我sed功力太差,不会从XPI中提取版本信息(其实是土方法太繁琐),所以这个就不搞动态版本了……
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | pkgname=firefox-https-everywhere-git pkgver=20120303 pkgrel=1 pkgdesc= "an addon making firefox auto use HTTPS (git developing version)" arch=( 'any' ) license=( 'GPL2' ) depends=( "firefox>=3.0" ) provides=( "firefox-https-everywhere" ) makedepends=( 'unzip' 'git' ) _gitname= "https-everywhere" build() { cd $srcdir msg "Connecting to the GIT server...." if [ -d $_gitname ]; then cd $_gitname && git pull origin && cd .. msg "The local files are updated." else git clone $_gitroot $_gitname fi msg "GIT checkout done" rm -rf "$_gitname-build" cp -rf "$_gitname" "$_gitname-build" cd "$_gitname-build" sed -i '1 i#\!/usr/bin/python2' trivial-validate.py . /makexpi .sh install -d "$pkgdir/usr/lib/firefox/extensions/https-everywhere@eff.org" unzip -od "$pkgdir/usr/lib/firefox/extensions/https-everywhere@eff.org" pkg/*.xpi } |
2. FVD Speed Dial插件:
之前用Speed Dial,感觉界面很弱智……
今天发现了这个。自我感觉比Speed Dial强大多了,界面挺好看。
除了支持Speed Dial的分组之类的,Dial页还能显示最常访问、最近关闭等。
下载、截图自己看吧:https://addons.mozilla.org/en-US/firefox/addon/fvd-speed-dial/
3. profile-sync-daemon,同步浏览器配置到内存盘:
把用户profile(~/.mozilla)放到内存盘,可以提高Fx速度,并减少磁盘读写。考虑到这个比较麻烦,还要自己写脚本什么的,一直没搞过。
看Archwiki,发现了profile-sync-daemon这个daemon,挺很方便的。不仅支持Fx,还支持Chrome、Opera、Midori。graysky出品,必属精品。
从AUR安装,修改 /etc/psd.conf
,在USERS部分填上自己的用户名,rc.d start psd
启动就行了。