From 77208d7f609505ed90db11726dbfe997313440cf Mon Sep 17 00:00:00 2001 From: Nick Moore Date: Fri, 27 Aug 2021 22:09:37 +0100 Subject: [PATCH] js extension fprmat work --- extensions/Lowercase.popclipextz | Bin 9171 -> 9206 bytes extensions/TestJavaScript.popclipextz | Bin 3534 -> 3502 bytes extensions/Uppercase.popclipextz | Bin 9982 -> 10012 bytes source/Lowercase/Config.js | 7 ++++--- source/TestJavaScript/Config.js | 8 ++++---- source/Uppercase/Config.js | 7 ++++--- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/extensions/Lowercase.popclipextz b/extensions/Lowercase.popclipextz index 446a012e5a65fe36eb32eb5ddac5183c9faf8d7e..88442d625f53c96a616183c9e974edf93a1398d1 100644 GIT binary patch delta 749 zcmccY{>_~yz?+$civa{UHcsTxVRH!4OmqmD{7^}FW8g6vPL7Sz!A_4B-SL{NAZuC= zk9*0WckX-z`!B`)EU};wy4QLpym80k(Sk}+=9K!0=!v;TTb)~G)fnSJBB&L zuzdOw`E|U$lteIUqlpfv~&ms1DO-cF3-+yY% z;~GPsv1)l{U)UgL`#`Z#ruMVX|90ol8E;Nbd3i!JYx(UbGhCNwP2_o}9h&H(WR>{m z>$Mfme=mGn_|jAKTlxA@i-<|D7Il1{n-t#sZ_iInzimG+&dF0&+*bQiV9H0UtATHH z1M8WXmp%TG#pS*_G4boiUD>U-wyoVYX=dG{j~AwV*sgf*P@0a#i^x_UahLjj19J})ei`{%zERV%$LdKuY}u|G#~o7CuEEHt(Hm6>Q;06n~W;1 z%r~kB#Rn)%IT((tl@5NdJ#)ckAdedu)N%}y&&#RS^ZRQi3IZ`&9K`lnb2B;ewEX@p zdhitU&DX5CN8H}%993EusJwf2s=1xRpZCWOvs*k(**CL9_DudvE_bgkMzM;6Q}ySF zehX51#qp}LT50_PrhgqT9oFqkVBDp-^wgvTrtfS%dp7gkGoEV5v&Ut+Wrv&B#3!3l zCr;$iVf!YdnfOg+quosz&hClQ!2(+6AGl9ekTtD`NN6UO zR&X;gvV3J^U|I(Hgo7dzZVRJe-U|sJzjjzicdm1`gnAongO1Fjvrkvc>@aaqJ z*DIHw%sz9*T>1R_>vPr%?o8b=gEMKp{)ZJF1+zqt&)mS<^Uh_4_MATpcSi|SdG9;3 zS^DYTwOQ*;<6bar&^Rr_xPaZN{{78t`v;M14BqY!T7{QBHD~a>{N>T|Rns554z6I9 zJE*GkC2{ixJ>xGyv$)=zwf-9~du&;xlju6-_zTV-Hzx~T?oyDn@jtfAuvhZd>6hZG zinD9PR?8dNz3Bd=k^3%pL41M9n$uF^$NYq^Dk?78*(0+iI^}J*&>Q#mivmtTjFanM zOK2NSy(Q-GWc8%yyH`CwuKdH4NpYb>py8e6JDp>7`({@pSg)R(@yG1y6*J$%hjQ=c znLn4k{_)NYkr&Rw1961yQCY+xzOSO_#YA^Bc?% z|M*P0M>b1b@q$_^uhxlscO%rBEbD&m|FiSw)j4uZArnsaJi93&8`HqDp5t}Gtpg`h zdvrQy#ypczN@I^d>ALT*R88Zy^+rEgR?Yoyz@~O|(IW%je@0s8e=B`h^mCmIyPCl%i! zrKkN$&JaOac}&kr0KLq>08C#DOBy#%c2HJh`U29gIJr|HvK_EJOeR diff --git a/extensions/TestJavaScript.popclipextz b/extensions/TestJavaScript.popclipextz index 5a397edebbb2bf7b583a658c138db1aca9955052..84a543e6139fdd086929e381359b4de7e761687e 100644 GIT binary patch delta 1645 zcmZ{k3pmqj9LN7_qh0BOgSoAxj9D(#3a6Vo4Y}=-CQdCBrp&06v1sC)_0Y^jCFLGg zF1Z}5bWqZ%gxr!_GRbkta%(PUdOD|`r{}!S^LyUs{r$er_xC>U?|DBj(6`Y@7Y8r| z4lJ#p0s+!|ZPGp*V<}FCA^;F%5(EGcHAQhrwzNY5{3W!2@$+(TZ5+c#8&{Nt1H*y} z(3F5q$CSOoHn0`4#817R`41=n?T(hln)&y=Vn29u~4PQ?@!nrMZ;=SPk&Lgoz0b;ee zD;!jr;eMxiPMxzaJ9JNujP4S3Y~D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mvi0K@aJnUns;peIAx9g z!iNfzWKN0&pXB!QWt8mYTDNrW`=nJ7AGUn?*kt1D>#MlD_Q3D6vt}LqYSE>>#n{xX7M2NDVSz({zQd0JvKFiN z9C=!PS9c{mZCtZ=!Gfe@?XY&&n8j{+=BM-gSU%qEZMT0gW%AE7Be}z`rfC!}SaIW! z)cPGCXHGs8SmYq<`0|_hCoZiA=Oz4~tkOK{oZl!)VsOrxKnc=zdKLLjc@1E^e^U^7F;s;tUBrs5_t$J_ zd->+?aqsyDTU=jGFIum({L*=y+_Z@6wx3tX`EP!}v{{jy^vrwr}2jf1S}ve;1v=!h@2sp0zvGJ3H7SJ6;y5?CiVvcY<27 zW96l5#_9Plll(rkc1~OERIKI|%do7{Pk^C**5XbvlU(;Fk_<1jJ*Olc`{d8CYSpB@ zv%UB>UG}YD44e3LMFQ`W#MrzE&SGAF&MNIWwr>utRafGliCunvp;XhY&g#aGyi}K|yKc_-d?@;CeDq_1$lp_T z)LNYNxmq7H&FQ%7xnDjJ*Uqi~^6KGsS>IWbOC6L8tIpjz@$u`j{O5if8@`;5Q{DgG z#dlfVpB~RVzAIIX=ld>bdT!AFn=7+t)2(m*(IqP;zu9dXXRzU$Lg$?li$`YswN+%+)6?}oceWpmmE)Q+;biH%NDFD1 zMv;6D@7JeJY!;srk)HPHkdV3vfBebyN*j($Sdg>HCz0*)x_Sxa$%&>L-~N7_sV(u% z^~uFgp-r5NZXG os&Y&Zn4qHUlO@&M8Rtz-R7+>-RR#;bXW^dwMoo*YT?J$c0I { - context.paste(selection.text.toLowerCase()) + code: (selection) => { + popclip.paste(selection.text.toLowerCase()) } } \ No newline at end of file diff --git a/source/TestJavaScript/Config.js b/source/TestJavaScript/Config.js index e1423fc85..e7e9d3867 100644 --- a/source/TestJavaScript/Config.js +++ b/source/TestJavaScript/Config.js @@ -3,7 +3,7 @@ const starIcon = `svg: ` -var Extension = { +var extension = { identifier: "com.pilotmoon.popclip.extension.test-js", name: "TestJS", icon: starIcon, @@ -22,12 +22,12 @@ var Extension = { // "public.rtf": rtf // }) console.log("Hello") - console.log(context.getBrowserUrl(), context.getBrowserTitle()) }, flags: { - captureHtml: true, + captureHtml: true, + captureRtf: true, + captureBrowserInfo: true, }, - captureTypes: ["public.rtf", "com.apple.webarchive"], options: [{identifier: "myoption", label: "My Option", type: "string"}, {identifier: "mybool",label: "Bool Option",type: "boolean"}], } diff --git a/source/Uppercase/Config.js b/source/Uppercase/Config.js index 0901e3d65..fdc8ee6a6 100644 --- a/source/Uppercase/Config.js +++ b/source/Uppercase/Config.js @@ -1,8 +1,9 @@ -var Extension = { +// Experimental JavaScript format, subject to change. +var extension = { identifier: "com.pilotmoon.popclip.extension.uppercase", name: "Uppercase", icon: "text:[[AB]]", - code: (selection, context) => { - context.paste(selection.text.toUpperCase()) + code: (selection) => { + popclip.paste(selection.text.toUpperCase()) } } \ No newline at end of file