diff --git a/manifest-firefox.json b/manifest-firefox.json index 7feb1ab..4480d62 100644 --- a/manifest-firefox.json +++ b/manifest-firefox.json @@ -3,7 +3,7 @@ "manifest_version": 3, "name": "__MSG_appName__", "description": "__MSG_appDesc__", - "version": "3.11.3", + "version": "3.11.4", "default_locale": "nl", "icons": { "16": "icons/icon@16px.png", diff --git a/manifest.json b/manifest.json index 124f7a5..e68dde9 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "manifest_version": 3, "name": "__MSG_appName__", "description": "__MSG_appDesc__", - "version": "3.11.3", + "version": "3.11.4", "default_locale": "nl", "icons": { "16": "icons/icon@16px.png", diff --git a/popup/dist/assets/index-Bcqs9ZUh.js b/popup/dist/assets/index-CFAfwAOA.js similarity index 93% rename from popup/dist/assets/index-Bcqs9ZUh.js rename to popup/dist/assets/index-CFAfwAOA.js index e629210..f0d617b 100644 --- a/popup/dist/assets/index-Bcqs9ZUh.js +++ b/popup/dist/assets/index-CFAfwAOA.js @@ -18,7 +18,7 @@ * vue v3.4.27 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const Ku=()=>{},Wu=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:Qi,BaseTransitionPropsValidators:ar,Comment:Be,DeprecationTypes:ou,EffectScope:Go,ErrorCodes:E4,ErrorTypeStrings:Yc,Fragment:ve,KeepAlive:ec,ReactiveEffect:zn,Static:sn,Suspense:H4,Teleport:Nc,Text:rn,TrackOpTypes:x4,Transition:Tn,TransitionGroup:js,TriggerOpTypes:S4,VueElement:so,assertNumber:C4,callWithAsyncErrorHandling:it,callWithErrorHandling:St,camelize:Xe,capitalize:ns,cloneVNode:At,compatUtils:su,compile:Ku,computed:he,createApp:ia,createBlock:qe,createCommentVNode:Ze,createElementBlock:X,createElementVNode:k,createHydrationRenderer:zl,createPropsRestProxy:vc,createRenderer:kl,createSSRApp:Uu,createSlots:nc,createStaticVNode:Pl,createTextVNode:Q,createVNode:U,customRef:Ii,defineAsyncComponent:J4,defineComponent:cr,defineCustomElement:Zl,defineEmits:ic,defineExpose:lc,defineModel:uc,defineOptions:ac,defineProps:rc,defineSSRCustomElement:Eu,defineSlots:cc,devtools:Jc,effect:Wa,effectScope:Ha,getCurrentInstance:pt,getCurrentScope:qo,getTransitionRawChildren:Ys,guardReactiveProps:Tl,h:Ll,handleError:fn,hasInjectionContext:xc,hydrate:ra,initCustomFormatter:qc,initDirectivesForSSR:Hu,inject:Bt,isMemoSame:jl,isProxy:Gs,isReactive:yn,isReadonly:xn,isRef:$e,isRuntimeOnly:Kc,isShallow:qn,isVNode:Ut,markRaw:Vi,mergeDefaults:pc,mergeModels:mc,mergeProps:mr,nextTick:ss,normalizeClass:Pe,normalizeProps:ja,normalizeStyle:Oe,onActivated:tl,onBeforeMount:ol,onBeforeUnmount:eo,onBeforeUpdate:rl,onDeactivated:nl,onErrorCaptured:cl,onMounted:$t,onRenderTracked:al,onRenderTriggered:ll,onScopeDispose:yi,onServerPrefetch:il,onUnmounted:to,onUpdated:Qs,openBlock:F,popScopeId:qt,provide:fr,proxyRefs:tr,pushScopeId:Gt,queuePostFlushCb:Ps,reactive:wn,readonly:Jo,ref:ce,registerRuntimeCompiler:Hc,render:Bo,renderList:et,renderSlot:ge,resolveComponent:B4,resolveDirective:F4,resolveDynamicComponent:Hi,resolveFilter:nu,resolveTransitionHooks:Sn,setBlockTracking:Vo,setDevtoolsHook:Qc,setTransitionHooks:on,shallowReactive:Pi,shallowReadonly:h4,shallowRef:m4,ssrContextKey:Gi,ssrUtils:tu,stop:Ga,toDisplayString:xe,toHandlerKey:Un,toHandlers:sc,toRaw:me,toRef:w4,toRefs:A4,toValue:y4,transformVNodeArgs:Lc,triggerRef:g4,unref:be,useAttrs:hc,useCssModule:Ou,useCssVars:hu,useModel:Nl,useSSRContext:qi,useSlots:dc,useTransitionState:lr,vModelCheckbox:oo,vModelDynamic:gr,vModelRadio:vr,vModelSelect:Ql,vModelText:En,vShow:Gl,version:Bl,warn:Xc,watch:_t,watchEffect:Zi,watchPostEffect:Xi,watchSyncEffect:Yi,withAsyncContext:gc,withCtx:G,withDefaults:fc,withDirectives:rs,withKeys:Fu,withMemo:Zc,withModifiers:ju,withScopeId:D4},Symbol.toStringTag,{value:"Module"}));function ca(e){return qo()?(yi(e),!0):!1}function ft(e){return typeof e=="function"?e():be(e)}const Gu=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qu=Object.prototype.toString,Zu=e=>qu.call(e)==="[object Object]",cn=()=>{};function ua(e,t){function n(...s){return new Promise((o,r)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(o).catch(r)})}return n}function Xu(e,t={}){let n,s,o=cn;const r=l=>{clearTimeout(l),o(),o=cn};return l=>{const c=ft(e),f=ft(t.maxWait);return n&&r(n),c<=0||f!==void 0&&f<=0?(s&&(r(s),s=null),Promise.resolve(l())):new Promise((a,h)=>{o=t.rejectOnCancel?h:a,f&&!s&&(s=setTimeout(()=>{n&&r(n),s=null,a(l())},f)),n=setTimeout(()=>{s&&r(s),s=null,a(l())},c)})}}function Yu(...e){let t=0,n,s=!0,o=cn,r,i,l,c,f;!$e(e[0])&&typeof e[0]=="object"?{delay:i,trailing:l=!0,leading:c=!0,rejectOnCancel:f=!1}=e[0]:[i,l=!0,c=!0,f=!1]=e;const a=()=>{n&&(clearTimeout(n),n=void 0,o(),o=cn)};return p=>{const g=ft(i),A=Date.now()-t,V=()=>r=p();return a(),g<=0?(t=Date.now(),V()):(A>g&&(c||!s)?(t=Date.now(),V()):l&&(r=new Promise((q,K)=>{o=f?K:q,n=setTimeout(()=>{t=Date.now(),s=!0,q(V()),a()},Math.max(0,g-A))})),!c&&!n&&(n=setTimeout(()=>s=!0,g)),s=!1,r)}}function Ju(e){return e||pt()}function fa(e,t=200,n={}){return ua(Xu(t,n),e)}function Qu(e,t=200,n=!1,s=!0,o=!1){return ua(Yu(t,n,s,o),e)}function da(e,t=!0,n){Ju()?$t(e,n):t?e():ss(e)}function bt(e){var t;const n=ft(e);return(t=n==null?void 0:n.$el)!=null?t:n}const as=Gu?window:void 0;function st(...e){let t,n,s,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,o]=e,t=as):[t,n,s,o]=e,!t)return cn;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const r=[],i=()=>{r.forEach(a=>a()),r.length=0},l=(a,h,p,g)=>(a.addEventListener(h,p,g),()=>a.removeEventListener(h,p,g)),c=_t(()=>[bt(t),ft(o)],([a,h])=>{if(i(),!a)return;const p=Zu(h)?{...h}:h;r.push(...n.flatMap(g=>s.map(A=>l(a,g,A,p))))},{immediate:!0,flush:"post"}),f=()=>{c(),i()};return ca(f),f}function e1(){const e=ce(!1),t=pt();return t&&$t(()=>{e.value=!0},t),e}function ha(e){const t=e1();return he(()=>(t.value,!!e()))}function t1(e,t,n={}){const{window:s=as,...o}=n;let r;const i=ha(()=>s&&"ResizeObserver"in s),l=()=>{r&&(r.disconnect(),r=void 0)},c=he(()=>Array.isArray(e)?e.map(h=>bt(h)):[bt(e)]),f=_t(c,h=>{if(l(),i.value&&s){r=new ResizeObserver(t);for(const p of h)p&&r.observe(p,o)}},{immediate:!0,flush:"post"}),a=()=>{l(),f()};return ca(a),{isSupported:i,stop:a}}function n1(e,t={width:0,height:0},n={}){const{window:s=as,box:o="content-box"}=n,r=he(()=>{var h,p;return(p=(h=bt(e))==null?void 0:h.namespaceURI)==null?void 0:p.includes("svg")}),i=ce(t.width),l=ce(t.height),{stop:c}=t1(e,([h])=>{const p=o==="border-box"?h.borderBoxSize:o==="content-box"?h.contentBoxSize:h.devicePixelContentBoxSize;if(s&&r.value){const g=bt(e);if(g){const A=g.getBoundingClientRect();i.value=A.width,l.value=A.height}}else if(p){const g=Array.isArray(p)?p:[p];i.value=g.reduce((A,{inlineSize:V})=>A+V,0),l.value=g.reduce((A,{blockSize:V})=>A+V,0)}else i.value=h.contentRect.width,l.value=h.contentRect.height},n);da(()=>{const h=bt(e);h&&(i.value="offsetWidth"in h?h.offsetWidth:t.width,l.value="offsetHeight"in h?h.offsetHeight:t.height)});const f=_t(()=>bt(e),h=>{i.value=h?t.width:0,l.value=h?t.height:0});function a(){c(),f()}return{width:i,height:l,stop:a}}function s1(e={}){const{initialValue:t=""}=e,n=ha(()=>typeof window<"u"&&"EyeDropper"in window),s=ce(t);async function o(r){if(!n.value)return;const l=await new window.EyeDropper().open(r);return s.value=l.sRGBHex,l}return{isSupported:n,sRGBHex:s,open:o}}function ro(e,t={}){const{initialValue:n=!1,focusVisible:s=!1}=t,o=ce(!1),r=he(()=>bt(e));st(r,"focus",l=>{var c,f;(!s||(f=(c=l.target).matches)!=null&&f.call(c,":focus-visible"))&&(o.value=!0)}),st(r,"blur",()=>o.value=!1);const i=he({get:()=>o.value,set(l){var c,f;!l&&o.value?(c=r.value)==null||c.blur():l&&!o.value&&((f=r.value)==null||f.focus())}});return _t(r,()=>{i.value=n},{immediate:!0,flush:"post"}),{focused:i}}const ci=1;function pa(e,t={}){const{throttle:n=0,idle:s=200,onStop:o=cn,onScroll:r=cn,offset:i={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:c="auto",window:f=as,onError:a=E=>{console.error(E)}}=t,h=ce(0),p=ce(0),g=he({get(){return h.value},set(E){V(E,void 0)}}),A=he({get(){return p.value},set(E){V(void 0,E)}});function V(E,S){var P,D,ee,C;if(!f)return;const L=ft(e);if(!L)return;(ee=L instanceof Document?f.document.body:L)==null||ee.scrollTo({top:(P=ft(S))!=null?P:A.value,left:(D=ft(E))!=null?D:g.value,behavior:ft(c)});const Y=((C=L==null?void 0:L.document)==null?void 0:C.documentElement)||(L==null?void 0:L.documentElement)||L;g!=null&&(h.value=Y.scrollLeft),A!=null&&(p.value=Y.scrollTop)}const q=ce(!1),K=wn({left:!0,right:!1,top:!0,bottom:!1}),T=wn({left:!1,right:!1,top:!1,bottom:!1}),y=E=>{q.value&&(q.value=!1,T.left=!1,T.right=!1,T.top=!1,T.bottom=!1,o(E))},x=fa(y,n+s),z=E=>{var S;if(!f)return;const P=((S=E==null?void 0:E.document)==null?void 0:S.documentElement)||(E==null?void 0:E.documentElement)||bt(E),{display:D,flexDirection:ee}=getComputedStyle(P),C=P.scrollLeft;T.left=Ch.value;const L=Math.abs(C)<=(i.left||0),Y=Math.abs(C)+P.clientWidth>=P.scrollWidth-(i.right||0)-ci;D==="flex"&&ee==="row-reverse"?(K.left=Y,K.right=L):(K.left=L,K.right=Y),h.value=C;let ne=P.scrollTop;E===f.document&&!ne&&(ne=f.document.body.scrollTop),T.top=nep.value;const I=Math.abs(ne)<=(i.top||0),se=Math.abs(ne)+P.clientHeight>=P.scrollHeight-(i.bottom||0)-ci;D==="flex"&&ee==="column-reverse"?(K.top=se,K.bottom=I):(K.top=I,K.bottom=se),p.value=ne},w=E=>{var S;if(!f)return;const P=(S=E.target.documentElement)!=null?S:E.target;z(P),q.value=!0,x(E),r(E)};return st(e,"scroll",n?Qu(w,n,!0,!1):w,l),da(()=>{try{const E=ft(e);if(!E)return;z(E)}catch(E){a(E)}}),st(e,"scrollend",y,l),{x:g,y:A,isScrolling:q,arrivedState:K,directions:T,measure(){const E=ft(e);f&&E&&z(E)}}}function Ao(e={}){const{touch:t=!0,drag:n=!0,capture:s=!1,initialValue:o=!1,window:r=as}=e,i=ce(o),l=ce(null);if(!r)return{pressed:i,sourceType:l};const c=h=>()=>{i.value=!0,l.value=h},f=()=>{i.value=!1,l.value=null},a=he(()=>bt(e.target)||r);return st(a,"mousedown",c("mouse"),{passive:!0,capture:s}),st(r,"mouseleave",f,{passive:!0,capture:s}),st(r,"mouseup",f,{passive:!0,capture:s}),n&&(st(a,"dragstart",c("mouse"),{passive:!0,capture:s}),st(r,"drop",f,{passive:!0,capture:s}),st(r,"dragend",f,{passive:!0,capture:s})),t&&(st(a,"touchstart",c("touch"),{passive:!0,capture:s}),st(r,"touchend",f,{passive:!0,capture:s}),st(r,"touchcancel",f,{passive:!0,capture:s})),{pressed:i,sourceType:l}}const Fo=[{id:"appearance",settings:[{id:"ptheme",title:"Algemeen",type:"ThemePicker",default:"auto,207,95,55"},{id:"pagecolor",title:"Achtergrondkleur",subtitle:"Achtergrond",type:"ColorOverrideSetting",default:"false,0,0,7"},{id:"wallpaper",title:"Achtergrondafbeelding",type:"DecorationPickerSetting",default:"none,"},{id:"sidecolor",title:"Menubalkkleur",subtitle:"Menubalk",type:"ColorOverrideSetting",default:"false,207,95,55"},{id:"decoration",title:"Menubalkdecoratie",type:"DecorationPickerSetting",default:"none,"},{id:"decoration-size",title:"Menubalkdecoratieformaat",type:"DecorationSizeSetting",default:1,format:"percent",decimals:0,min:.5,max:3,step:.1,conditions:[{settingId:"decoration",operator:"not starting with",value:"none"}]},{id:"appbarcolor",title:"Appbalkkleur",subtitle:"Appbalk",type:"ColorOverrideSetting",default:"false,207,95,47"},{id:"shape",title:"Hoekstraal",type:"SlideInput",default:8,format:"px",decimals:0,min:0,max:20,step:1},{id:"darken-content",title:"Inhoud donker maken",subtitle:"Experimenteel. Studiewijzers en opdrachten donker maken indien het donkere thema actief is.",conditions:[{settingId:"beta-options",operator:"equal",value:!0}],default:!0}]},{id:"login",settings:[{id:"magisterLogin-enabled",title:"Automatisch inloggen",default:!0},{id:"magisterLogin-username",title:"Gebruikersnaam",subtitle:"Je gebruikersnaam wordt vanzelf ingevoerd.",type:"TextInput",default:"",conditions:[{settingId:"magisterLogin-enabled",operator:"equal",value:!0}]},{id:"magisterLogin-email",title:"Microsoft-account",subtitle:"Vul het e-mailadres in van je Microsoft-schoolaccount—als je school gebruikmaakt van Single Sign On via Microsoft. Dit account wordt tijdens het inloggen aangeklikt.",type:"TextInput",fieldType:"email",default:"",conditions:[{settingId:"magisterLogin-enabled",operator:"equal",value:!0}]}]},{id:"sidebar",settings:[{id:"magister-appbar-week",title:"Weeknummer in menubalk",default:!0},{id:"shortcuts",title:"Snelkoppelingen menubalk",type:"ShortcutsEditor",default:[{icon:"",href:"$SCHOOLNAAM.zportal.nl/app",hotkey:"z"}]},{id:"magister-picture",title:"Profielfoto",type:"SegmentedButton",default:"hide",options:[{value:"show",title:"Schoolfoto",icon:"photo_camera_front"},{value:"custom",title:"Aangepast",icon:"add_photo_alternate"},{value:"hide",title:"Verbergen",icon:"visibility_off"}]},{id:"magister-picture-source",title:"Profielfoto kiezen",type:"ImageInput",default:null,conditions:[{settingId:"magister-picture",operator:"equal",value:"custom"}]},{id:"hotkeys-enabled",title:"Sneltoetsen",subtitle:"Houd de activatietoets ingedrukt en druk op een getal op je toetsenbord voor snelle navigatie.",default:!0},{id:"magister-overlay-hotkey",title:"Activatietoets sneltoetsen",subtitle:"Deze toets activeert de sneltoetsen.",type:"KeyPicker",default:"S",conditions:[{settingId:"hotkeys-enabled",operator:"equal",value:!0}]},{id:"hotkeys-quick",title:"Snellere sneltoetsen",subtitle:"Op de startpagina zijn sneltoetsen bruikbaar zonder de activatietoets ingedrukt te hoeven houden.",default:!1,conditions:[{settingId:"hotkeys-enabled",operator:"equal",value:!0}]}]},{id:"start",settings:[{id:"start-enabled",title:"Pagina Start",subtitle:"De pagina 'Vandaag' is nu 'Start'. Daarin zie je je rooster en gepersonaliseerde widgets. Aanvullende opties op Magister zelf.",default:!0},{id:"start-schedule-view",title:"Rooster in Start",type:"SegmentedButton",default:"schedule",conditions:[{settingId:"start-enabled",operator:"equal",value:!0}],options:[{value:"schedule",title:"Agenda",icon:"calendar_view_day"},{value:"list",title:"Lijst",icon:"list"}]},{id:"start-schedule-extra-day",title:"Volgende dag tonen in Start",subtitle:"Springen naar de eerstvolgende dag met lessen wanneer er vandaag geen lessen (meer) zijn. Alleen in de weergavemodus 'Dag'.",default:!0,conditions:[{settingId:"start-enabled",operator:"equal",value:!0},{settingId:"start-schedule-view",operator:"equal",value:"schedule"}]}]},{id:"grades",settings:[{id:"suf-threshold",title:"Voldoendegrens",type:"SlideInput",default:5.5,decimals:1,min:1,max:10,step:.1},{id:"cc",title:"Cijfercalculator",subtitle:"Zie wat je moet halen of wat je komt te staan op basis van je cijferlijst en/of aangepaste cijfers.",default:!0},{id:"cs",title:"Cijferstatistieken",subtitle:"Nieuw tabblad in het cijferoverzicht met statistieken, grafiekjes en handige filters.",default:!0},{id:"cb",title:"Cijferback-up",subtitle:"Knop in het cijferoverzicht om je cijferlijst te exporteren en te importeren.",default:!0,links:[{icon:"upload",label:"Cijferback-up importeren",href:"https://qkeleq10.github.io/studytools/grades"}]},{id:"insuf-red",title:"Onvoldoendes rood kleuren",subtitle:"Alleen in het cijferoverzicht en in de cijferwidget.",default:!0}]},{id:"studyguide",settings:[{id:"sw-enabled",title:"Studiewijzers rangschikken",subtitle:"Studiewijzers zullen worden gegroepeerd op vak.",default:!0},{id:"sw-cols",title:"Aantal kolommen",type:"SlideInput",default:3,decimals:0,min:1,max:5,step:1,conditions:[{settingId:"sw-enabled",operator:"equal",value:!0}]},{id:"sw-period",title:"Periodenummers bij studiewijzers",subtitle:"In plaats van de naam van de studiewijzer.",default:!0,conditions:[{settingId:"sw-enabled",operator:"equal",value:!0}]},{id:"sw-current-week-behavior",title:"Huidige week in studiewijzer",type:"SegmentedButton",default:"focus",options:[{value:"focus",title:"Scrollen",icon:"bolt"},{value:"highlight",title:"Markeren",icon:"ink_highlighter"},{value:"off",title:"Uit",icon:"block"}]},{id:"sw-resources-auto",title:"Aanbevelingen",subtitle:"Soms wordt er een gecureerde collectie hulpbronnen getoond in de zijbalk.",default:!0}]},{id:"about",settings:[{id:"language",title:"Taal",subtitle:"Experimenteel",type:"SegmentedButton",default:"nl-NL",options:[{value:"nl-NL",title:"Nederlands"},{value:"en-GB",title:"English"},{value:"fr-FR",title:"Français"},{value:"de-DE",title:"Deutsch"},{value:"la-LA",title:"Latina lingua"}]},{id:"beta-options",title:"Ontwikkelaarsopties",subtitle:"Experimenteel",default:!1},{id:"verbosity",title:"Uitgebreide consoleberichten",subtitle:"Experimenteel. Er worden meer activiteiten geplaatst in de console.",default:!1,conditions:[{settingId:"beta-options",operator:"equal",value:!0}]}]}],Ge=window.browser||window.chrome;function o1(){let e=ce({});$t(()=>{var s,o,r;console.log("mounted!"),(s=Ge==null?void 0:Ge.storage)!=null&&s.sync&&(Ge.storage.sync.get().then(i=>{e.value=i,Fo.forEach(l=>{l.settings.forEach(c=>{typeof e.value[c.id]>"u"&&(e.value[c.id]=c.default)})})}),e.value.v=(r=(o=Ge==null?void 0:Ge.runtime)==null?void 0:o.getManifest())==null?void 0:r.version)});const t=fa(()=>{var s;if((s=Ge==null?void 0:Ge.storage)!=null&&s.sync){let o={...e.value};Gs(o)&&(o=me(o)),Ge.storage.sync.set(o)}},250,{maxWait:2e3}),n=()=>{var i,l;const s=(i=e.value.ptheme)==null?void 0:i.split(","),o=(s==null?void 0:s[0])==="auto";let r=s;o&&((l=window.matchMedia)!=null&&l.call(window,"(prefers-color-scheme: dark)").matches)?r[0]="dark":o&&(r[0]="light"),document.documentElement.setAttribute("theme",(r==null?void 0:r[0])||"light"),document.documentElement.style.setProperty("--palette-primary-hue",(r==null?void 0:r[1])||207),document.documentElement.style.setProperty("--palette-primary-saturation",`${(r==null?void 0:r[2])||95}%`),document.documentElement.style.setProperty("--palette-primary-luminance",`${(r==null?void 0:r[3])||55}%`)};return Zi(()=>{({...e.value},t()),n()}),e}function r1(){let e=ce({});return $t(()=>{var t;(t=Ge==null?void 0:Ge.runtime)!=null&&t.getManifest&&(e.value=Ge.runtime.getManifest())}),{manifest:e}}const pe={__name:"Icon",props:{filled:Boolean},setup(e){return(t,n)=>(F(),X("span",{"aria-hidden":"true",class:Pe(["icon material-symbols-outlined",e.filled?"fill":""])},[ge(t.$slots,"default")],2))}},i1={id:"navigation-rail"},l1=["onClick","active"],a1=["active"],c1=k("div",{class:"navigation-item-state-layer"},null,-1),u1={__name:"NavigationRail",props:["modelValue"],emits:["update:modelValue","scrollToTop"],setup(e,{emit:t}){const n=e,s=t,o=he({get(){return n.modelValue},set(l){s("update:modelValue",l)}}),r=[{id:"appearance",name:"Uiterlijk",icon:"format_paint"},{id:"login",name:"Inloggen",icon:"key"},{id:"sidebar",name:"Menubalk",icon:"thumbnail_bar"},{id:"start",name:"Start",icon:"home"},{id:"grades",name:"Cijfers",icon:"workspace_premium"},{id:"studyguide",name:"ELO",icon:"local_library"},{id:"about",name:"Over",icon:"info"}];function i(l){let c=o.value!==l;o.value=l,s("scrollToTop",c)}return(l,c)=>(F(),X("nav",i1,[(F(),X(ve,null,et(r,f=>k("button",{key:f.id,class:"navigation-item",onClick:a=>i(f.id),active:f.id===o.value},[k("div",{class:"navigation-item-icon-wrapper",active:f.id===o.value},[U(pe,{filled:f.id===o.value,active:f.id===o.value},{default:G(()=>[Q(xe(f.icon),1)]),_:2},1032,["filled","active"])],8,a1),c1,k("span",null,xe(f.name),1)],8,l1)),64))]))}},f1=["for"],d1={class:"setting-title"},h1={class:"setting-subtitle"},p1=["data-state"],m1=["data-state"],v1=["id"],g1={__name:"SwitchInput",props:["modelValue","id"],emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,o=ce(null),{height:r}=n1(o),i=ce(null),{focused:l}=ro(i),c=he({get(){return n.modelValue},set(f){s("update:modelValue",f)}});return(f,a)=>(F(),X("label",{class:Pe(["setting switch",{tall:be(r)>70,focused:be(l)}]),for:e.id,ref_key:"label",ref:o},[k("div",null,[k("h3",d1,[ge(f.$slots,"title")]),k("span",h1,[ge(f.$slots,"subtitle")])]),k("div",{class:"switch-track","data-state":c.value},[k("div",{class:"switch-thumb","data-state":c.value},[U(pe,{class:"switch-icon","data-state":c.value},{default:G(()=>[Q("check")]),_:1},8,["data-state"])],8,m1)],8,p1),rs(k("input",{type:"checkbox",id:e.id,ref_key:"input",ref:i,"onUpdate:modelValue":a[0]||(a[0]=h=>c.value=h)},null,8,v1),[[oo,c.value]])],10,f1))}},kt=(e,t)=>{const n=e.__vccOpts||e;for(const[s,o]of t)n[s]=o;return n},y1=e=>(Gt("data-v-2857d39b"),e=e(),qt(),e),b1={class:"setting segmented-button"},_1={class:"setting-title"},A1={class:"setting-subtitle"},k1={class:"button-wrapper"},z1=["onClick","data-state","data-has-icon"],w1={class:"button-segment-icon-wrapper"},x1=y1(()=>k("div",{class:"button-segment-state-layer"},null,-1)),S1={__name:"SegmentedButton",props:["modelValue","id","setting"],emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,o=he({get(){return n.modelValue},set(r){s("update:modelValue",r)}});return(r,i)=>(F(),X("div",b1,[k("div",null,[k("h3",_1,[ge(r.$slots,"title",{},void 0,!0)]),k("span",A1,[ge(r.$slots,"subtitle",{},void 0,!0)])]),k("div",k1,[(F(!0),X(ve,null,et(e.setting.options,l=>(F(),X("button",{key:l.value,class:"button-segment",onClick:c=>o.value=l.value,"data-state":l.value===o.value,"data-has-icon":!!l.icon},[k("div",w1,[U(Tn,{name:"icon"},{default:G(()=>[l.value===o.value?(F(),qe(pe,{key:"selected",class:"button-segment-icon selected"},{default:G(()=>[Q("check ")]),_:1})):l.icon?(F(),qe(pe,{key:"icon",class:"button-segment-icon"},{default:G(()=>[Q(xe(l.icon),1)]),_:2},1024)):Ze("",!0)]),_:2},1024)]),k("span",{class:"button-segment-text",style:Oe({"margin-left":l.value===o.value||l.icon?"0":"-8px"})},xe(l.title),5),x1],8,z1))),128))])]))}},C1=kt(S1,[["__scopeId","data-v-2857d39b"]]),E1=["for"],$1=["type","id"],O1={class:"border-cutout"},T1={class:"setting-title"},P1={class:"setting-subtitle"},V1={__name:"TextInput",props:["modelValue","id","setting"],emits:["update:modelValue"],setup(e,{emit:t}){const n=e,s=t,o=he({get(){return n.modelValue},set(c){s("update:modelValue",c)}}),r=ce(null),{focused:i}=ro(r),l=he(()=>{var c;return((c=o==null?void 0:o.value)==null?void 0:c.length)>0});return(c,f)=>(F(),X("label",{class:Pe(["setting text",{focused:be(i),filled:l.value}]),for:e.id},[rs(k("input",{class:"text-input",type:e.setting.fieldType||"input",id:e.id,ref_key:"input",ref:r,"onUpdate:modelValue":f[0]||(f[0]=a=>o.value=a),placeholder:" ",autocomplete:"off"},null,8,$1),[[gr,o.value,void 0,{lazy:!0}]]),k("div",O1,[ge(c.$slots,"title")]),k("h3",T1,[ge(c.$slots,"title")]),k("span",P1,[ge(c.$slots,"subtitle")])],10,E1))}};var R1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function D1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function I1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(s){var o=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:function(){return e[s]}})}),n}var ma={exports:{}};const M1=I1(Wu);(function(e,t){(function(n,s){e.exports=s(M1)})(typeof self<"u"?self:R1,function(n){return function(){var s={388:function(l,c){var f,a,h;(function(p,g){a=[],f=g,h=typeof f=="function"?f.apply(c,a):f,h===void 0||(l.exports=h)})(typeof self<"u"&&self,function(){function p(){var g=Object.getOwnPropertyDescriptor(document,"currentScript");if(!g&&"currentScript"in document&&document.currentScript||g&&g.get!==p&&document.currentScript)return document.currentScript;try{throw new Error}catch(P){var A,V,q,K=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,T=/@([^@]*):(\d+):(\d+)\s*$/gi,y=K.exec(P.stack)||T.exec(P.stack),x=y&&y[1]||!1,z=y&&y[2]||!1,w=document.location.href.replace(document.location.hash,""),E=document.getElementsByTagName("script");x===w&&(A=document.documentElement.outerHTML,V=new RegExp("(?:[^\\n]+?\\n){0,"+(z-2)+"}[^<]* + diff --git a/popup/dist/settings.js b/popup/dist/settings.js index 78f7669..2938b18 100644 --- a/popup/dist/settings.js +++ b/popup/dist/settings.js @@ -377,6 +377,15 @@ export default [ { settingId: 'beta-options', operator: 'equal', value: true } ], }, + { + id: "custom-css", + title: "Aangepaste CSS", + type: "TextInput", + default: '', + conditions: [ + { settingId: 'beta-options', operator: 'equal', value: true } + ], + }, // TODO: setting to disable color adaptation for dark theme ] }, diff --git a/popup/public/settings.js b/popup/public/settings.js index 78f7669..2938b18 100644 --- a/popup/public/settings.js +++ b/popup/public/settings.js @@ -377,6 +377,15 @@ export default [ { settingId: 'beta-options', operator: 'equal', value: true } ], }, + { + id: "custom-css", + title: "Aangepaste CSS", + type: "TextInput", + default: '', + conditions: [ + { settingId: 'beta-options', operator: 'equal', value: true } + ], + }, // TODO: setting to disable color adaptation for dark theme ] }, diff --git a/src/magister/scripts/gamification.js b/src/magister/scripts/gamification.js index 9b2ab7b..2de504d 100644 --- a/src/magister/scripts/gamification.js +++ b/src/magister/scripts/gamification.js @@ -442,8 +442,8 @@ async function themeContest() { }) textarea.addEventListener('paste', (event) => { try { - let obj = JSON.parse(atob((event.clipboardData || window.clipboardData).getData("text")) || JSON.stringify((event.clipboardData || window.clipboardData).getData("text")) || (event.clipboardData || window.clipboardData).getData("text")) - if (obj.title !== 'Magister Theme Contest!') { + let obj = JSON.parse((event.clipboardData || window.clipboardData).getData("text")) + if (obj.title !== 'Magister Theme Contest') { throw new Error('invalid') } setTimeout(() => textarea.value = JSON.stringify(obj, null, 4), 0) @@ -456,8 +456,8 @@ async function themeContest() { } else { user = await MagisterApi.accountInfo(true) - navigator.clipboard.writeText(btoa(`Magister Theme Contest!/${user.name.firstname} ${user.name.lastname}/${window.location.hostname.split('.')[0]}/${JSON.stringify(pick(syncedStorage, 'ptheme', 'pagecolor', 'wallpaper', 'sidecolor', 'decoration', 'decoration-size', 'appbarcolor', 'shape', 'custom-css'))}`)) - notify('dialog', "Je thema is nu gekopieerd naar je klembord. Stuur hem ergens in het Discord-kanaal!") + navigator.clipboard.writeText(btoa(JSON.stringify({ title: 'Magister Theme Contest', name: `${user.name.firstname} ${user.name.lastname}`, school: window.location.hostname.split('.')[0], options: pick(syncedStorage, 'ptheme', 'pagecolor', 'wallpaper', 'sidecolor', 'decoration', 'decoration-size', 'appbarcolor', 'shape', 'custom-css') }))) + notify('dialog', "Je inzending is nu gekopieerd naar je klembord. Typ '/winactie' in Discord en volg de aanwijzingen.") } }) }