Skip to content

Instantly share code, notes, and snippets.

@easrng
Last active February 28, 2023 06:48
Show Gist options
  • Save easrng/93790b26f0456d030a617fdc4db80e5c to your computer and use it in GitHub Desktop.
Save easrng/93790b26f0456d030a617fdc4db80e5c to your computer and use it in GitHub Desktop.

search bars for prechoster

instructions

  1. download the json file below
  2. import it into prechoster
  3. make it say whatever you want
{"modules":[{"id":"87736d8caf60a3f5","data":{"contents":"<script>\n import DuckDuckGo from './DuckDuckGo.svelte';\n import Google from './Google.svelte';\n</script>\nHere, have some search bars:\n<DuckDuckGo>DuckDuckGo</DuckDuckGo>\n<Google>Google</Google>"},"pluginId":"source.svelte","sends":["a13ec312d06590d7"],"namedSends":{},"graphPos":null},{"id":"ad3f73042d552d84","data":{"name":"DuckDuckGo","contents":"<script>let data</script><div class=\"search--adv search--header\"><div class=\"search__input--adv\" bind:this={data}><slot></slot></div><a class=\"search__button\" href={\"https://duckduckgo.com/?q=\"+encodeURIComponent(data?.textContent.trim())} target=\"_blank\">Search</a></div><style>.search__input--adv,input{font-family:\"Proxima Nova\",\"Helvetica Neue\",Helvetica,\"Segoe UI\",\"Nimbus Sans L\",\"Liberation Sans\",\"Open Sans\",FreeSans,Arial,sans-serif;color:#222}a{font-family:inherit;text-decoration:none;color:#4495d4}.search--adv{box-sizing:border-box;border-radius:8px;display:block;position:relative;border:1px solid rgba(0,0,0,.15);box-shadow:0 2px 3px rgba(0,0,0,.06)}.search--adv{padding-right:3.5em}.search--header{background-color:#fff;height:44px;padding-left:11px}.search--header .search__input--adv{height:44px}.search--header .search__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEzIj48cGF0aCBkPSJNNTAyIDQ0MnE5IDkgOSAyMSAwIDEyLTkgMjBsLTIwIDIwcS04IDktMjAgOS0xMiAwLTIxLTlsLTkzLTkzcS02MyA0Mi0xNDAuNSAzNC41LTc3LjUtNy41LTEzMi41LTYyLjUtNjQtNjQtNjQtMTUzLjUgMC04OS41IDY0LTE1MyA2NC02My41IDE1NC02My41IDkwIDAgMTUzIDY0IDU2IDU1IDYzIDEzMyA3IDc4LTM2IDE0MGw5MyA5M3ogbS00NDUtMjEzcTAgNzEgNTAuNSAxMjEgNTAuNSA1MCAxMjEuNSA1MCA3MSAwIDEyMS01MCA1MC01MCA1MC0xMjEgMC03MS01MC0xMjEtNTAtNTAtMTIxLTUwLTcxIDAtMTIxLjUgNTAtNTAuNSA1MC01MC41IDEyMXoiIGZpbGw9IiM5OTkiLz48L3N2Zz4=);background-size:18px;font-size:0;color:#0000}.search__input--adv{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;font-size:1.1em;font-weight:400;display:block;width:100%;background:0 0;outline:0;border:none;padding:0;height:2.545455em;z-index:1;position:relative;top:-1px}.search--header .search__input--adv{font-size:16px}.search__input--adv:focus{outline:0}.search__button{appearance:none;width:41.04px;display:block;cursor:pointer;background:0 0;text-align:center;border:none;position:absolute;top:0;bottom:0;right:2px;left:auto;margin:auto;z-index:2;outline:0}.search__button:active{-webkit-transition:none .3s ease-in-out;-webkit-transition-delay:0s;-moz-transition:none .3s ease-in-out 0s;-o-transition:none .3s ease-in-out 0s;transition:none .3s ease-in-out 0s}.search__button{min-width:26px;padding:0 11.52px;height:100%;margin-right:-1px;line-height:1.5;background-color:transparent;background-position:center;background-repeat:no-repeat}.header{min-height:58px}.header__search{position:relative}div.search__input--adv{display:flex;align-items:center}*{box-sizing:border-box}.search__input--adv,input{font-family:\"Proxima Nova\",\"Helvetica Neue\",Helvetica,\"Segoe UI\",\"Nimbus Sans L\",\"Liberation Sans\",\"Open Sans\",FreeSans,Arial,sans-serif;color:#222}.search--adv{box-sizing:border-box;border-radius:8px;display:block;position:relative;border:1px solid rgba(0,0,0,.15);box-shadow:0 2px 3px rgba(0,0,0,.06)}.search--adv{padding-right:3.5em}.search--header{background-color:#fff;height:44px;padding-left:11px}.search--header .search__input--adv{height:44px}.search--header .search__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1MTIgNTEzIj48cGF0aCBkPSJNNTAyIDQ0MnE5IDkgOSAyMSAwIDEyLTkgMjBsLTIwIDIwcS04IDktMjAgOS0xMiAwLTIxLTlsLTkzLTkzcS02MyA0Mi0xNDAuNSAzNC41LTc3LjUtNy41LTEzMi41LTYyLjUtNjQtNjQtNjQtMTUzLjUgMC04OS41IDY0LTE1MyA2NC02My41IDE1NC02My41IDkwIDAgMTUzIDY0IDU2IDU1IDYzIDEzMyA3IDc4LTM2IDE0MGw5MyA5M3ogbS00NDUtMjEzcTAgNzEgNTAuNSAxMjEgNTAuNSA1MCAxMjEuNSA1MCA3MSAwIDEyMS01MCA1MC01MCA1MC0xMjEgMC03MS01MC0xMjEtNTAtNTAtMTIxLTUwLTcxIDAtMTIxLjUgNTAtNTAuNSA1MC01MC41IDEyMXoiIGZpbGw9IiM5OTkiLz48L3N2Zz4=);background-size:18px;font-size:0;color:#0000}.search__input--adv{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;-o-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;font-size:1.1em;font-weight:400;display:block;width:100%;background:0 0;outline:0;border:none;padding:0;height:2.545455em;z-index:1;position:relative;top:-1px}.search--header .search__input--adv{font-size:16px}.search__button{appearance:none;width:41.04px;display:block;cursor:pointer;background:0 0;text-align:center;border:none;position:absolute;top:0;bottom:0;right:2px;left:auto;margin:auto;z-index:2;outline:0}.search__button:active{-webkit-transition:none .3s ease-in-out;-webkit-transition-delay:0s;-moz-transition:none .3s ease-in-out 0s;-o-transition:none .3s ease-in-out 0s;transition:none .3s ease-in-out 0s}.search__button{padding:0 11.52px;height:100%;margin-right:-1px;line-height:1.5;background-color:transparent;background-position:center;background-repeat:no-repeat}.header{min-height:58px}.header__search{position:relative}div.search__input--adv{display:flex;align-items:center}.search--adv{margin-bottom:0.5rem}</style>"},"pluginId":"source.svelte-component","sends":["87736d8caf60a3f5"],"namedSends":{},"graphPos":null},{"id":"79522d007a8b53de","data":{"name":"Google","contents":"<script>let data</script><div class=\"RNNXgb\"><div class=\"SDkEP\"><div class=\"a4bIc\"><div class=\"YacQv\"></div><div class=\"gLFyf\" bind:this={data}><slot></slot></div></div><a class=\"dRYYxd\" href=\"https://www.google.com/imghp\" target=\"_blank\">Images<div class=\"nDcEnd\"><div class=\"Gdd5U\"><svg data-background focusable=\"false\" viewBox=\"0 0 192 192\" xmlns=\"http://www.w3.org/2000/svg\"><rect fill=\"none\" height=\"192\" width=\"192\"></rect><g><circle fill=\"#4285f4\" cx=\"96\" cy=\"104.15\" r=\"28\"></circle><path fill=\"#ea4335\" d=\"M160,72v40.15V136c0,1.69-0.34,3.29-0.82,4.82v0v0c-1.57,4.92-5.43,8.78-10.35,10.35h0v0 c-1.53,0.49-3.13,0.82-4.82,0.82H66l16,16h50h12c4.42,0,8.63-0.9,12.46-2.51c3.83-1.62,7.28-3.96,10.17-6.86 c1.45-1.45,2.76-3.03,3.91-4.74c2.3-3.4,3.96-7.28,4.81-11.44c0.43-2.08,0.65-4.24,0.65-6.45v-12V96.15V84l-6-19l-10.82,2.18 C159.66,68.71,160,70.31,160,72z\"></path><path fill=\"#4285f4\" d=\"M32,72c0-1.69,0.34-3.29,0.82-4.82c1.57-4.92,5.43-8.78,10.35-10.35C44.71,56.34,46.31,56,48,56 h96c1.69,0,3.29,0.34,4.82,0.82c0,0,0,0,0,0L149,45l-17-5l-16-16h-13.44H96h-6.56H76L60,40H48c-17.67,0-32,14.33-32,32v12v20l16,16 V72z\"></path><path fill=\"#34a853\" d=\"M144,40h-12l16.83,16.83c1.23,0.39,2.39,0.93,3.47,1.59c2.16,1.32,3.97,3.13,5.29,5.29 c0.66,1.08,1.2,2.24,1.59,3.47v0L176,84V72C176,54.33,161.67,40,144,40z\"></path><path fill=\"#fbbc05\" d=\"M48,168h39.89l-16-16H48c-8.82,0-16-7.18-16-16v-23.89l-16-16V136C16,153.67,30.33,168,48,168z\"></path></g></svg></div></div></a></div> <a class=\"Tg7LZd\" href={\"https://google.com/search?q=\"+encodeURIComponent(data?.textContent.trim())} target=\"_blank\">Search<div class=\"zgAlFc\"><span class=\"z1asCe MZy1Rb\"><svg data-background focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z\" fill=\"#4285f4\"></path></svg></span></div></a></div>\n<style>a{color:#1a0dab;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,.1)}html:not(.zAoYTe) [tabindex]{outline:0}html:not(.zAoYTe) [href]{outline:0}.z1asCe{display:inline-block;fill:currentColor;height:24px;line-height:24px;position:relative;width:24px}.z1asCe svg{display:block;height:100%;width:100%}.RNNXgb{display:flex;z-index:3;height:44px;background:#fff;border:1px solid transparent;box-shadow:0 2px 5px 1px rgba(64,60,67,.16);border-radius:24px}.SDkEP{flex:1;display:flex;padding:5px 4px 0 20px}.YacQv,.gLFyf{font:16px arial,sans-serif;line-height:34px;height:34px!important;font-size:16px;flex:100%;line-height:39px;height:39px!important}.gLFyf{background-color:transparent;border:none;margin:0;padding:0 0 3px;color:rgba(0,0,0,.87);word-wrap:break-word;outline:0;display:flex;-webkit-tap-highlight-color:transparent;margin-top:-42px}.a4bIc{display:flex;flex:1;flex-wrap:wrap}.YacQv{color:transparent;white-space:pre}.dRYYxd{display:flex;flex:0 0 auto;margin-top:-5px;align-items:stretch;flex-direction:row;font-size:0;color:#0000}.nDcEnd{flex:1 0 auto;display:flex;cursor:pointer;align-items:center;border:0;background:0 0;outline:0;padding:0 8px;width:40px;line-height:44px}.Gdd5U{height:24px;width:24px;vertical-align:middle;flex-shrink: 0;background-repeat: no-repeat;background-position: center;}.Tg7LZd{height:44px;width:44px;background:0 0;border:none;cursor:pointer;flex:0 0 auto;padding:0}.Tg7LZd{flex:0 0 auto;padding-right:13px;display:flex;font-size:0;color:#0000}.zgAlFc{background:0 0;color:#4285f4;height:24px;width:24px;margin:auto}.RNNXgb{margin-bottom:0.5rem}</style>"},"pluginId":"source.svelte-component","sends":["87736d8caf60a3f5"],"namedSends":{},"graphPos":null},{"id":"a13ec312d06590d7","data":{"mode":"attr"},"pluginId":"transform.style-inliner","sends":["ad69e453a0401a2f"],"namedSends":{},"graphPos":null},{"id":"ad69e453a0401a2f","data":{"useSvgo":false},"pluginId":"transform.svg-to-background","sends":["output"],"namedSends":{},"graphPos":null}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment