From 396b6e8f5de478001aefb76fc4b8a6706bc5e9e2 Mon Sep 17 00:00:00 2001 From: grizzlyuser Date: Wed, 30 Dec 2020 21:36:08 +0200 Subject: libre/iceweasel: process icons for top sites Remove bundled icons of all websites except Wikipedia. Generate icons and thumbnails for top sites configured by Parabola from SVG sources from the branding package. They need to be displayed on new tab. If not added, thumbnails will be automatically generated for each website by completely loading it in background and making a screenshot at start of each browser session. This network communication can be unwanted for those on pay-per-byte data plans. --- libre/iceweasel/PKGBUILD | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'libre') diff --git a/libre/iceweasel/PKGBUILD b/libre/iceweasel/PKGBUILD index 1f0960d57..84542ba6f 100644 --- a/libre/iceweasel/PKGBUILD +++ b/libre/iceweasel/PKGBUILD @@ -286,6 +286,27 @@ END -o "${brandingdestdir}/default$i.png" done + # process default Top Sites and their icons + local tippytopdir=browser/components/newtab/data/content/tippytop + find "${tippytopdir}" -type f \ + -not -name 'wikipedia-org*' \ + -not -name 'top_sites.json' \ + -exec rm -v {} \; + for image in "${brandingsrcdir}"/tippytop/*.svg; do + local outname=$(basename -s .svg "${image}") + + local size=$(identify -format '%wx%h' "${tippytopdir}"/images/wikipedia-org@2x.png) + magick -density 300 $image -gravity center -resize $size -extent $size \ + "${tippytopdir}/images/${outname}@2x.png" + + local background='none' + if [[ $outname == 'gnu' ]]; then background='white'; fi + size=256x256 + magick -density 300 -background $background $image -gravity center \ + -resize $size -extent $size -define icon:auto-resize=64,48,32,16 \ + "${tippytopdir}/favicons/${outname}.ico" + done + # apply branding patches export QUILT_PATCHES="${brandingsrcdir}"/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' -- cgit v1.2.3