From c0de0ddc42e8eacb44977f3aaaafeb3ca702fd96 Mon Sep 17 00:00:00 2001 From: Ivan Yurchenko Date: Sat, 7 Dec 2024 18:32:59 +0200 Subject: [PATCH] Support Chromium-based browsers --- .gitignore | 7 ++++--- Makefile | 27 ++++++++++++++++++++----- icon.svg => icons/icon.svg | 0 icons/icon128.png | Bin 0 -> 7688 bytes icons/icon150.png | Bin 0 -> 3127 bytes icons/icon16.png | Bin 0 -> 4510 bytes icons/icon32.png | Bin 0 -> 4872 bytes icons/icon48.png | Bin 0 -> 5271 bytes icons/icon96.png | Bin 0 -> 6477 bytes manifest.json => manifest-firefox.json | 7 +++++-- src/background.js | 12 +++++++++++ webpack.config.js | 6 +++--- 12 files changed, 46 insertions(+), 13 deletions(-) rename icon.svg => icons/icon.svg (100%) create mode 100644 icons/icon128.png create mode 100644 icons/icon150.png create mode 100644 icons/icon16.png create mode 100644 icons/icon32.png create mode 100644 icons/icon48.png create mode 100644 icons/icon96.png rename manifest.json => manifest-firefox.json (86%) diff --git a/.gitignore b/.gitignore index 83f098d..dcf032b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /node_modules -web-ext-artifacts -/dist -/dist-dev +/web-ext-artifacts-firefox +/web-ext-artifacts-chrome +/dist-firefox +/dist-chrome diff --git a/Makefile b/Makefile index ce4ac1d..cb4aaf7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .PHONY: clean clean: - rm -rf dist web-ext-artifacts + rm -rf dist-firefox dist-chrome web-ext-artifacts-firefox web-ext-artifacts-chrome .PHONY: dev-prepare dev-prepare: @@ -12,9 +12,26 @@ dev-build: .PHONY: dev-run dev-run: - npx web-ext run --source-dir dist + npx web-ext run --source-dir dist-firefox -.PHONY: build -build: + +dist-firefox: npm run build - npx web-ext build --source-dir dist + +.PHONY: build-firefox +build-firefox: dist-firefox + npx web-ext build --source-dir dist-firefox --artifacts-dir web-ext-artifacts-firefox --overwrite-dest + + +dist-chrome: dist-firefox + cp -r dist-firefox dist-chrome + jq '.background = {"service_worker": .background.scripts[1]}' < dist-chrome/manifest.json > dist-chrome/manifest-tmp.json + mv dist-chrome/manifest-tmp.json dist-chrome/manifest.json + +.PHONY: build-chrome +build-chrome: dist-chrome + npx web-ext build --source-dir dist-chrome --artifacts-dir web-ext-artifacts-chrome --overwrite-dest + + +.PHONY: build +build: build-firefox build-chrome diff --git a/icon.svg b/icons/icon.svg similarity index 100% rename from icon.svg rename to icons/icon.svg diff --git a/icons/icon128.png b/icons/icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..1e04d1a0032f37cbd88d1116f9243def861b0150 GIT binary patch literal 7688 zcmeHKcT`i$);|foBTYa`44|l_2MGZ}kQ%AdRRls3AV5eU0U`(lq*wt9iamHmy(oeR zBB&UeSP=_0RDy^oqTp32(%uP{>;2wa>#e)i_x`&%YtHQ1v*)+V?AbZ9*~iOOMNwZ7 z000$=o0Bit3nWcm7JRpms5il`lMzgbq)?Uu^56iJgh&Gri452vztB*K6d(oi^1!A6 z(h?a-(}&2+_1i#t!FPH$NSl9`k*vW$pnwY49|Ri~q_x1l9Bj<|Z@L;mTJn>hd#08E zz*=zhqj#lv`oOSA3>t|efa}p%JQ0H>qOD*U0ugHk5}=E`cWtT_i`yf*n%Y(e$pty6PXP(Z9ADlJjoH0gYg+l7XN4(aMk&KU=_=~}E=#58 z2G;Ri3YY_HwH+(vO>!Vkm_@joCA*GkZD@aF2inDp@Ze{_=l8u4EH11$qYBpPK zI$_1y_=%K|Q%o-&KgfS}Oi9B&aoxx9?cBSJtSFaT9;t^3D=c(ug5QP*Vl7`Td0A5a zb~lP{7ii5+c(~N^VZ-7~DxtE{f_vySdS`H}hUq3BA4fgy$D8h#?}}LHIjLZr`QVHD zE8lAYvL@}&@=n;rj1l|s=M@1Z2S;``D+njs5=btBPGsk4n~t%weRywy7{@8Ao9>cD zf1;#bu4pR|%&^2S8!DEhiTYL1pXt|*53O|AzoHblbmXp8zo2QYFy;2UirT{aaxlkr zW$}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ccDAGbbh0Dh- z=&u>LqS@-6E;oY$&IWv)7bl~-V^oTZr|BvYa>BQs+%;ng0X88nWr-=`qvwOXh#5Va zYY94;=z1eq!~>IY+0-58d*47CogecXXERL|$Wu2IH;!wLBq6d5m>ZfR)w^3OD@KZ- zK7LuBH;$`}mrschrxc>R}Lb>No0i>7<*Uo)#{ew_dQggWMc)dbS zT+|H3qi_93rC8B5WZ61if7HH0XGE3J$p@o`lL;iB#e*7#jWsd=EH+o}Rm@uHcY^Cr zAJVpL6>&wX$M}@E;w7wN>!I|Tep-aaiig0mILxgszZOpuWdo^XXc`$m${6=GtJwaa z-^3Yu?u7b6_acuLv5{$=)VcRdj_QsS1$Y-3+;@BMx{l=EFeAOwM0d#fUbYs=f-MSt dq^C10Ri7|FboxTo6nKXND9&C^XI6w~{|hAq;w1n8 literal 0 HcmV?d00001 diff --git a/icons/icon150.png b/icons/icon150.png new file mode 100644 index 0000000000000000000000000000000000000000..3ada34e9dd3563f30059f15428f39769b0f9ec48 GIT binary patch literal 3127 zcmb_ec{~%0|96bpT;(h`9Y~=h=UR?>hRT>U%`p_2V}#LcNU508cue;!NijANxzAXR zIdZn*krY#oY>th5_5A+%{r~;GUZ4ATzdrxHKWXr@f60Q?z#<|dvQ98Z_ia!4qf(OF z)>bs?%eDhW!n~qIM2z?RQPKDUC~mvBJLV)Z27wKViSxg5NhB^V&Nw6@G&;~f@{%$3 zO7Nq3TQw08={6@vJCFFsKR;i+r!>90V+p&e#nh zTG3o1{Q@Q=EB$iXUWGepv>no8{M-Fm4v2n(bOX55OE)FQjO52D$vdr5eJG!=E_a|1 zHfE4*`Mj{A(OZZqro`1wBx2UXS8YCH<513q1T!|*S+q4d5$TaPBUu5wAl9?Vxwn`n zX(>j?eCLUVqz^T@2Ng3mKi;0ULMqZfTvKPhm7AIT%T3SJPc+)C4p#7SrXZhpJ+|09 z13%vy@H|({vHil00JR*9m$gx?{P3aS2L?f6tslnnSk|O#oChVtwO)pNG~}Z4Ym#9T z_L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Q1G z*sPl~=-H_$>LaEOS^dRf)X925x0QCWBBE?@@vb>JcsxHlnh^0S-lRwa8{7VEPhK4e ztT;BO&fUc_!<_#i|D{)_#NDQ>8Ze5jIYNFT_w22$?@OKj!LMEz%|*n;21=xLa?d4? zBJ(?kc5K0Sg`^CrlTuFvQ%Q?vlOobsj41@R}3=D`?(UfqTWAhY{_?2Xm9rrWKGY_Uspah zUUN@ufBxH}^>U7qh$c=`D>*mh6AX&sV@!PWca~RO2@Q literal 0 HcmV?d00001 diff --git a/icons/icon16.png b/icons/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..5f0f242a3857e364476db5eacdf8822b1747c104 GIT binary patch literal 4510 zcmeHKe^3hCBvsKZh+AjwOuL<|(Gh{dPEhDm>l=#|y(4X$`5Eg3N+_ z18fu=$HBe@HokgjuhVcWeWuIbhl>y-4?Yd|OKf%rN~uUfr8dCz1f`)#iYD|ZX`m?s zO&Z|-ipEioB&Kcmu4F;~w(u5AxGtS(U%Mu9O=`?Tq`1_VE$)aN z+!OcXb0ObnuLbWt9lV1ytz_yiX=fCi^t@FUMZTUl+j4k%;ueLKoUcB=x9&h(MaReH zDHW$``WFudDql_33M7igUZC2JZqsi)sP}B{PcGiFo7+9m5c=%EjMx_oWD;-&TIAwf)tqN1kgvCtDZ2_`4h5BmTj4 zzV+qO)cUk0)@#LM_%8s=b#&vlAU`*NBUJSv70TtF4__@o0vOerBB!xjP&b%A`|YgXQQ=eJ6f z=gi7AT03F)SwI1wS?&ipDAy1JvK!?mqnU{uR$&4#e z86p;%l}?yP7QqitjY^{;u=EgLN-2}0QInr@)7jRHFa>-vD+@%?N8@-f7*qw-D#4$R zlSZQvCn%hvFo?hcWnPg9VctNZL@~r+1p(I2`$S&wq7oKk;5752;6Rje;j%^ zb{Py&b~|kq*b-?|o7Jq8{G~a8N@zD6;%K%u1$c ztXC2h2dQ+Vh9k5DgSlJ=7pBp3I?Q0y0*qtTY8Dva537@@q;sHC9X7L)QW2vTM-d~s z1;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bS=u&dVqOR3vS=vm`B4qsfw+Ek{thY28K6`R60(s)TFM8!= zv@N1+@|V78nAeMt=Me>X(CF!1lm9vH+I;%*#%pog-9z8o_p0&8gonZFF59YBG#)=! za(%C-c5eIk+SyODYS-N{9r#?8^m^2do52$vezd3SRo3_X%{9RpsN2`##>YW#=DLxi z9^9)5+Va(k1t|w>=HKy4baiiObiZ&uK>0^+{>@lNhHU3!(GR*s)n~e0>b!S*Jh?(d i^|)llZfzD6LvjB&`IL6%ZUl&7NS-i9x-UL!#eV_u*ULEo literal 0 HcmV?d00001 diff --git a/icons/icon48.png b/icons/icon48.png new file mode 100644 index 0000000000000000000000000000000000000000..36233c5d0f656ccd9dc5709d5e05802d5609fed5 GIT binary patch literal 5271 zcmeHKc~nzZ8h;_|iba8npcn&ERFb@xg)9&j14`5=1zMn0%1iPB8MBcD5)c7d#I0CG zks?qScPgS*&b&qs;pAK-G#x3uQv#OvoB^0Fq!15pWDBgi&oX z0udsDv6Y}q0BszD7Z-wssa^-#u0!ojpzSq;!Pg)JGsq6qC7{qj+Y!{2pvdzE_i6xb z{9|o;24+Cem!LOX&lQToNOUR!QyCnv9;P#S2%QJBNeG8WXY-gGus@;vtwlIf*+VZB z*q0+02*QK{0ZF4(%j60Sf{Z20H}FFn11C3q6|sZtWZ@f{*b=tn(AqVezd5Z5n|8&v zidVGwcMFlrM#qVBPu8@zH;da&HpN6)MFrUpK#9qkaQ%h}Z?-soaoVW4wcgO@X6S}0 zK1GY$SYr~7Dt8vxAX~q55>#8e=MaJsPsUG01=}6dny>NA(vGd|^?swv$oFTd5fW*_ z1$yJ5)$CQf*vjl)|HPcl(#n>s|;^&-OkXpu>?ftQD^uxH% z>8y?!9YvK7H_@d0&$;Tvt20?wkA9MYa;mGnb)^sBjnStkc&rKw6HIctzUp#ifq0te zmCe+QD=+5X3vc<%(!JTNvXxYq-V^Zhm#WW-N_sY)vMGPnl;}Svvz6Mq*Z1eX19zE= zGTRxN9f$vDvxIwvsmH3C@-ts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1wYZ$o#`ta@tEVOs$8kN z^K^sAVn^7l49Zx literal 0 HcmV?d00001 diff --git a/manifest.json b/manifest-firefox.json similarity index 86% rename from manifest.json rename to manifest-firefox.json index 3bee5f0..99f24f8 100644 --- a/manifest.json +++ b/manifest-firefox.json @@ -4,8 +4,11 @@ "version": "0.1.0", "description": "A bring-your-own-key extension for summarizing Hacker News articles with LLMs.", "icons": { - "48": "icon.svg", - "96": "icon.svg" + "16": "icon16.png", + "32": "icon32.png", + "48": "icon48.png", + "96": "icon96.png", + "128": "icon128.png" }, "browser_specific_settings": { "gecko": { diff --git a/src/background.js b/src/background.js index eefb5f3..f18446f 100644 --- a/src/background.js +++ b/src/background.js @@ -1,3 +1,15 @@ +try { + // Load `browser-polyfill.js` for Chrome. + importScripts("browser-polyfill.js"); +} catch (e) { + if (e instanceof ReferenceError) { + // It's probably Firefox, where `browser-polyfill.js` is provided through `background.scripts`. + // Do nothing. + } else { + throw e; + } +} + async function onInstalled() { const settings = await browser.storage.sync.get('internal.intro_shown'); if (!settings['internal.intro_shown']) { diff --git a/webpack.config.js b/webpack.config.js index 10db9e9..75d30ff 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -7,7 +7,7 @@ module.exports = (env, argv) => { }, output: { // filename: '[name].bundle.js', - path: path.resolve(__dirname, 'dist') + path: path.resolve(__dirname, 'dist-firefox') }, devtool: argv.mode === 'production' ? "source-map" : "inline-cheap-source-map", optimization: { @@ -25,8 +25,8 @@ module.exports = (env, argv) => { { from: 'src/content.js', to: 'content.js' }, { from: 'src/options.html', to: 'options.html' }, { from: 'src/options.js', to: 'options.js' }, - { from: 'manifest.json', to: 'manifest.json' }, - { from: 'icon.svg', to: 'icon.svg' } + { from: 'manifest-firefox.json', to: 'manifest.json' }, + { from: 'icons/*.png', to: '[name][ext]' } ] }) ]