├── assets ├── index.2333e62f.css ├── index.63ecadae.css ├── getHashFromItem.1a4f9c1b.css ├── options.e9b09b52.js └── newTab.db48dff6.js ├── manifest.json └── src └── modules ├── newTab └── index.html └── options └── index.html /assets/index.2333e62f.css: -------------------------------------------------------------------------------- 1 | ._text_1o66s_1{margin-left:.5em}._container_z7p80_1{justify-content:flex-start;align-items:flex-start;display:flex;align-content:flex-start}._container_z7p80_1 h2{color:var(--primary-color)}._termsContainer_z7p80_11{height:10rem;overflow-y:scroll;scrollbar-color:dark} 2 | -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Loading screen", 3 | "description": "Learn stuff while browsing!", 4 | "version": "1.0", 5 | "manifest_version": 3, 6 | "background": {}, 7 | "chrome_url_overrides": { 8 | "newtab": "src/modules/newTab/index.html" 9 | }, 10 | "options_page": "src/modules/options/index.html", 11 | "permissions": ["storage", "scripting", "tabs"], 12 | "action": { 13 | "default_icon": {} 14 | }, 15 | "icons": {} 16 | } 17 | -------------------------------------------------------------------------------- /assets/index.63ecadae.css: -------------------------------------------------------------------------------- 1 | ._container_179bl_1{width:auto;height:auto;position:absolute;left:0;bottom:0;display:block;opacity:0;padding:.5em 2em;color:#000;background-color:#fff;border-top-right-radius:5px;font-size:1.5rem}._container_179bl_1:hover{opacity:1}._table_258v5_1{border-collapse:collapse}._table_258v5_1 caption{font-size:1.25em}._table_258v5_1 tr td{border-top:1px solid;padding:.25rem 0}._table_258v5_1 tr:last-child td{border-bottom:1px solid}._table_258v5_1 tr:first-child th{padding-top:1rem}._table_258v5_1 tr:last-child th{padding-bottom:1rem}._table_258v5_1 tr td,._table_258v5_1 tr th{padding:0 1rem}._container_hyud8_1{background-color:#000;color:#fff;justify-content:space-around;align-items:center;font-size:2rem;position:relative} 2 | -------------------------------------------------------------------------------- /src/modules/newTab/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Tabs 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/modules/options/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Options 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /assets/getHashFromItem.1a4f9c1b.css: -------------------------------------------------------------------------------- 1 | :root{--primary-color: #f9ba00;--primary-bg: #000}body{margin:0;overflow:hidden}*,*:before,*:after{box-sizing:border-box}html,body{height:100%}dl,dd{margin:0}#app{width:100%;height:100%}section{width:100%;padding-left:1rem}main{width:100%;height:100%;display:flex}ul{padding:0;margin:0}ul,li{list-style-type:none}input[type=checkbox]{margin:0;margin-right:.5rem}[data-tooltip]{position:relative;border-bottom:1px dashed #000;cursor:help;pointer-events:none}[data-tooltip]:after{position:absolute;pointer-events:none;content:attr(data-tooltip);left:0;top:0;border-radius:3px;box-shadow:0 0 5px 2px #64646499;background-color:wheat;z-index:10;width:auto;min-width:5rem;transition:all .15s cubic-bezier(.25,.8,.25,1);opacity:0;width:fit-content;block-size:fit-content}[data-tooltip]:hover:after{opacity:1;transform:translateY(-100%) translate(-50%);transition-duration:.3s}label:hover,input:hover{cursor:pointer}._iconButton_k4blz_1{background:none;border:0;color:inherit;font-size:inherit;padding:0}._iconButton_k4blz_1:hover{cursor:pointer}._iconButton_k4blz_1:disabled{opacity:.5}._iconButton_k4blz_1:disabled:hover{cursor:not-allowed}._iconButton_k4blz_1:disabled [data-tooltip]{opacity:1}._iconButton_k4blz_1+._iconButton_k4blz_1{margin-left:.5em}._iconButton_k4blz_1 svg{color:inherit;width:1em;height:1em}._iconButton_k4blz_1 [data-tooltip]{font-size:1rem;margin-right:.5em} 2 | -------------------------------------------------------------------------------- /assets/options.e9b09b52.js: -------------------------------------------------------------------------------- 1 | import{S as k,j as l,F as I,a as e,I as i,u as b,r as E,g as O,R as T}from"./getHashFromItem.fad888be.js";const A="_text_1o66s_1";const N=({source:s,isHidden:p,onHide:o,onShow:r,onIncrease:h,onDecrease:m,weight:u})=>{let a;switch(s.type){case k.EQUIVALENCE:a=Object.keys(s.value)[0];break;case k.STATEMENT:a=s.value;break;case k.TABLE:a=s.value.title;break}return l(I,{children:[!p&&e(i,{icon:"hide",onClick:t=>{t.preventDefault(),o()}}),p&&e(i,{icon:"show",onClick:t=>{t.preventDefault(),r()}}),e(i,{icon:"plus",onClick:t=>{t.preventDefault(),h()}}),e(i,{icon:"minus",onClick:t=>{t.preventDefault(),m()}}),e("span",{className:A,children:a})," (",u||1,")"]})},j="_container_z7p80_1",w="_termsContainer_z7p80_11";function F(){const{sources:s,toogleActivation:p,hideMap:o,weightMap:r,initialized:h,hideItem:m,showItem:u,increaseWeight:a,decreaseWeight:t}=b(),[f,v]=E.exports.useState();if(!!h)return e("main",{className:j,children:l("section",{children:[e("h2",{children:"Available Sources"}),e("ul",{children:s.map(({id:n,title:S,deactivated:x,data:y})=>{const d=f===n;return l("li",{children:[e("input",{type:"checkbox",name:n,id:n,onClick:()=>{p(n)},checked:!x}),l("label",{htmlFor:n,children:[S," "]}),e(i,{icon:d?"folderOpen":"folder",onClick:()=>{v(d?void 0:n)}}),d&&l(I,{children:[e("p",{children:"Terms"}),e("ul",{className:w,children:y.map((_,D)=>{var g,C;const c=O(_.value);return e("li",{children:e(N,{source:_,isHidden:(g=o==null?void 0:o[n])==null?void 0:g[c],weight:(C=r==null?void 0:r[n])==null?void 0:C[c],onHide:()=>{m(n,c)},onShow:()=>{u(n,c)},onIncrease:()=>{a(n,c)},onDecrease:()=>{t(n,c)}})},D)})})]})]},n)})})]})})}const z=document.getElementById("app");T.render(e(F,{}),z); 2 | -------------------------------------------------------------------------------- /assets/newTab.db48dff6.js: -------------------------------------------------------------------------------- 1 | import{j as E,a as t,I as C,r as k,g as T,S as _,u as $,s as H,R}from"./getHashFromItem.fad888be.js";const N=["#001f3f","#0074d9","#7fdbff","#39cccc","#3d9970","#2ecc40","#01ff70","#ffdc00","#ff851b","#ff4136","#85144b","#f012be","#b10dc9"],W=N.length;function j(r){const e=r.split("").reduce((s,a)=>(s+a.charCodeAt(0))%W,0),n=N[e];return{color:B(n),backgroundColor:n}}const B=r=>{let e=r.replace("#","");e.length==3&&(e=e.split("").reduce((c,l)=>`${c}${l}${l}`,""));const[n,o,s]=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e).slice(1).map(c=>parseInt(c,16));return(n*299+o*587+s*114)/1e3>=128?"#000000":"#ffffff"},q="_container_179bl_1";const z=({onHide:r,onShow:e,onIncrease:n,onDecrease:o,isHidden:s,weight:a})=>E("nav",{className:q,children:[!s&&t(C,{icon:"hide",tooltip:"Hide this",onClick:c=>{r(),c.preventDefault()}}),s&&t(C,{icon:"show",tooltip:"Show this",onClick:c=>{e(),c.preventDefault()}}),t(C,{icon:"plus",tooltip:"Show more often",onClick:c=>{n(),c.preventDefault()}}),t(C,{icon:"minus",tooltip:"Show less often",disabled:a<=1,onClick:c=>{o(),c.preventDefault()}}),"(",a||1,")"]}),g=({term:r,definition:e})=>E("dl",{children:[t("dt",{children:r}),t("dd",{children:e})]}),x=({isRow:r,children:e,rowSpan:n,colSpan:o})=>r?t("th",{rowSpan:n,colSpan:o,children:e}):t("td",{rowSpan:n,colSpan:o,children:e}),A=({rows:r,isRow:e})=>r?t(({children:o})=>e?t("thead",{children:o}):t("tbody",{children:o}),{children:r.map((o,s)=>t("tr",{children:o.map((a,c)=>{if(typeof a=="string")return t(x,{isRow:e,children:a},c);const{rowSpan:l,colSpan:m,text:h}=a;return t(x,{isRow:e,rowSpan:l,colSpan:m,children:h},c)})},s))}):null,F="_table_258v5_1";const Q=({header:r,rows:e,title:n})=>E("table",{className:F,children:[n&&t("caption",{children:n}),t(A,{rows:r,isRow:!0}),t(A,{rows:e})]}),U="_container_hyud8_1";function V(r,e={initialized:!0,deactivatedMap:{},hideMap:{},weightMap:{}}){const n=k.exports.useRef(),o=k.exports.useMemo(()=>{if(!(e!=null&&e.initialized))return null;if(n.current)return n.current;const s=r.filter(({id:f})=>{var p;return!((p=e==null?void 0:e.deactivatedMap)!=null&&p[f])});if(!s.length)return null;const a=Math.floor(Math.random()*s.length),c=s[a],l=c.id,m={};let h=c.data.reduce((f,p)=>{var y,I,w,D,O;const b=T(p.value);if(!!((I=(y=e==null?void 0:e.hideMap)==null?void 0:y[l])!=null&&I[b]))return f;const L=(O=(D=(w=e==null?void 0:e.weightMap)==null?void 0:w[l])==null?void 0:D[b])!=null?O:1;return m[b]=p,f.concat(new Array(L).fill(b))},[]);const d=Math.floor(Math.random()*h.length),{type:i,value:u}=m[h[d]],M=T(u),S=i===_.EQUIVALENCE?Object.entries(u)[0]:u;return n.current={hash:M,choice:S,type:i,id:l},n.current},[r,e]);if(!o){const s="No sources, go to options to select them";return{type:_.STATEMENT,choice:s,id:"__NO_CHOICE__",hash:T(s)}}return o}function P(){var f,p;const{deactivatedMap:r,increaseWeight:e,decreaseWeight:n,hideItem:o,hideMap:s,initialized:a,showItem:c,weightMap:l}=$(),{type:m,choice:h,hash:d,id:i}=V(H,{deactivatedMap:r,initialized:a,hideMap:s,weightMap:l});if(!a)return null;let u;const{color:M,backgroundColor:S}=j(d);switch(m){case _.EQUIVALENCE:{const[b,v]=h;u=t(g,{term:b,definition:v});break}case _.TABLE:{u=t(Q,{...h});break}case _.STATEMENT:{u=t("span",{children:h});break}}return E("main",{className:U,style:{color:M,backgroundColor:S},children:[u,t(z,{weight:(f=l==null?void 0:l[i])==null?void 0:f[d],onDecrease:()=>{n(i,d)},onHide:()=>{o(i,d)},onShow:()=>{c(i,d)},onIncrease:()=>{e(i,d)},isHidden:(p=s==null?void 0:s[i])==null?void 0:p[d]})]})}const G=document.getElementById("app");R.render(t(P,{}),G); 2 | --------------------------------------------------------------------------------