From a0e2578481df5b86142731cbddf019655cbef80f Mon Sep 17 00:00:00 2001 From: rohan Date: Tue, 22 Jun 2021 18:14:04 +0530 Subject: [PATCH] fix ff contextmenu colours + keybindings in the popup --- html/settings.html | 8 ++++---- scripts/flatpickr.min.js | 2 +- scripts/nap_room.js | 2 +- scripts/popup.js | 25 ++++++++++++++++++++++--- scripts/rise.js | 2 +- styles/popup.css | 10 +++++++--- styles/settings.css | 8 ++++++-- 7 files changed, 42 insertions(+), 15 deletions(-) diff --git a/html/settings.html b/html/settings.html index f50dead..28b6518 100644 --- a/html/settings.html +++ b/html/settings.html @@ -226,14 +226,14 @@

Snoozz tabs using the right-click (context) menu

-

Keyboard shortcuts

-

Set up shortcuts to snooze a tab without any clicks.

+

Custom Keyboard Shortcuts

+

Set up your own shortcuts to snooze a tab without any clicks.

Instructions
    -
  1. Open the Firefox Add-Ons page in a new tab: about:addons.
  2. +
  3. Open the Firefox Add-Ons page in a new tab: about:addons.
  4. Click on the gear icon in the top right and select Manage Extension Shortcuts.
  5. Configure snooze time shortcuts using your own key bindings.
@@ -244,7 +244,7 @@

Keyboard shortcuts

Uh Oh -
Keyboard Shortcuts cannot be configured for extensions in Safari.
+
Shortcuts cannot be configured for extensions in Safari. You can blame Steve Jobs for this.
Currently active shortcuts diff --git a/scripts/flatpickr.min.js b/scripts/flatpickr.min.js index 280c8f3..8c53ec3 100644 --- a/scripts/flatpickr.min.js +++ b/scripts/flatpickr.min.js @@ -1,2 +1,2 @@ /* flatpickr v4.6.9, @license MIT */ -globalThis.flatpickr=function(){"use strict";var e=function(){return(e=Object.assign||function(e){for(var t,n=1,a=arguments.length;n",noCalendar:!1,now:new Date,onChange:[],onMonthChange:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<",shorthandCurrentMonth:!1,showMonths:1,time_24hr:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},i=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},r=function(e){return!0===e?1:0};function c(e,t){var n;return function(){var a=this;clearTimeout(n),n=setTimeout((function(){return e.apply(a,arguments)}),t)}}var l=function(e){return e instanceof Array?e:[e]};function u(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function s(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,t){return t(e)?e:e.parentNode?f(e.parentNode,t):void 0}function m(e,t){var n=d("div","numInputWrapper"),a=d("input","numInput "+e),o=d("span","arrowUp"),i=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(o),n.appendChild(i),n}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var h=function(){},p=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},v={D:h,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*r(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:h,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:h,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},D={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},M={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[M.w(e,t,n)]},F:function(e,t,n){return p(M.n(e,t,n)-1,!1,t)},G:function(e,t,n){return i(M.h(e,t,n))},H:function(e){return i(e.getHours())},K:function(e,t){return t.amPM[r(e.getHours()>11)]},M:function(e,t){return p(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return i(e.getFullYear(),4)},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},C=function(e){var t=e.config,n=void 0===t?a:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,a){var o=a||r;return void 0!==n.formatDate?n.formatDate(e,t,o):t.split("").map((function(t,a,i){return M[t]&&"\\"!==i[a-1]?M[t](e,o,n):"\\"!==t?t:""})).join("")}},y=function(e){var t=e.config,n=void 0===t?a:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,o,i){if(0===e||e){var c,l=i||r,u=e;if(e instanceof Date)c=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)c=new Date(e);else if("string"==typeof e){var d=t||(n||a).dateFormat,s=String(e).trim();if("today"===s)c=new Date,o=!0;else if(/Z$/.test(s)||/GMT$/.test(s))c=new Date(e);else if(n&&n.parseDate)c=n.parseDate(e,d);else{c=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,m=[],g=0,h=0,p="";g=0?new Date:new Date(M.config.minDate.getTime()),n=b(M.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),M.selectedDates=[t],M.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&Ee(e);var a=M._input.value;I(),be(),M._input.value!==a&&M._debouncedChange()}function S(e,t){return e%12+12*r(t===M.l10n.amPM[1])}function A(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function I(){if(void 0!==M.hourElement&&void 0!==M.minuteElement){var e=(parseInt(M.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(M.minuteElement.value,10)||0)%60,n=void 0!==M.secondElement?(parseInt(M.secondElement.value,10)||0)%60:0;void 0!==M.amPM&&(e=S(e,M.amPM.textContent));var a=void 0!==M.config.minTime||M.config.minDate&&M.minDateHasTime&&M.latestSelectedDateObj&&0===w(M.latestSelectedDateObj,M.config.minDate,!0);if(void 0!==M.config.maxTime||M.config.maxDate&&M.maxDateHasTime&&M.latestSelectedDateObj&&0===w(M.latestSelectedDateObj,M.config.maxDate,!0)){var o=void 0!==M.config.maxTime?M.config.maxTime:M.config.maxDate;(e=Math.min(e,o.getHours()))===o.getHours()&&(t=Math.min(t,o.getMinutes())),t===o.getMinutes()&&(n=Math.min(n,o.getSeconds()))}if(a){var i=void 0!==M.config.minTime?M.config.minTime:M.config.minDate;(e=Math.max(e,i.getHours()))===i.getHours()&&t=12)]),void 0!==M.secondElement&&(M.secondElement.value=i(n)))}function P(e){var t=g(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&ne(n)}function O(e,t,n,a){return t instanceof Array?t.forEach((function(t){return O(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return O(e,t,n,a)})):(e.addEventListener(t,n,a),void M._handlers.push({remove:function(){return e.removeEventListener(t,n)}}))}function j(){ve("onChange")}function k(){if(M._debouncedChange=c(j,x),void 0!==M.daysContainer&&(O(M.monthNav,"click",xe),O(M.monthNav,["keyup","increment"],P),O(M.daysContainer,"click",ue)),void 0!==M.timeContainer&&void 0!==M.minuteElement&&void 0!==M.hourElement){var e=function(e){return g(e).select()};O(M.timeContainer,["increment"],Y),O(M.timeContainer,"blur",Y,{capture:!0}),O(M.timeContainer,"click",W),O([M.hourElement,M.minuteElement],["focus","click"],e),void 0!==M.secondElement&&O(M.secondElement,"focus",(function(){return M.secondElement&&M.secondElement.select()})),void 0!==M.amPM&&O(M.amPM,"click",(function(e){Y(e),j()}))}}function L(e,t){var n=void 0!==e?M.parseDate(e):M.latestSelectedDateObj||(M.config.minDate&&M.config.minDate>M.now?M.config.minDate:M.config.maxDate&&M.config.maxDate1),M.calendarContainer.appendChild(e);var t=void 0!==M.config.appendTo&&void 0!==M.config.appendTo.nodeType;M.config.inline&&(M.calendarContainer.classList.add("inline"),!t&&M.element.parentNode?M.element.parentNode.insertBefore(M.calendarContainer,M._input.nextSibling):void 0!==M.config.appendTo&&M.config.appendTo.appendChild(M.calendarContainer))}function U(e,t,n,a){var o=ae(t,!0),i=d("span","f-day "+e,t.getDate().toString());return i.dateObj=t,i.$i=a,i.setAttribute("aria-label",M.formatDate(t,M.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===w(t,M.now)&&(M.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),o?(i.tabIndex=-1,Me(t)&&(i.classList.add("selected"),M.selectedDateElem=i,"range"===M.config.mode&&(u(i,"startRange",M.selectedDates[0]&&0===w(t,M.selectedDates[0],!0)),u(i,"endRange",M.selectedDates[1]&&0===w(t,M.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("f-disabled"),"range"===M.config.mode&&Ce(t)&&!Me(t)&&i.classList.add("inRange"),i}function K(e){e.focus()}function B(e,t){for(var n=(new Date(e,t,1).getDay()-M.l10n.firstDayOfWeek+7)%7,a=M.utils.getDaysInMonth((t-1+12)%12,e),o=M.utils.getDaysInMonth(t,e),i=window.document.createDocumentFragment(),r=M.config.showMonths>1,c=r?"prevMonthDay hidden":"prevMonthDay",l=r?"nextMonthDay hidden":"nextMonthDay",u=a+1-n,s=0;u<=a;u++,s++)i.appendChild(U(c,new Date(e,t-1,u),u,s));for(u=1;u<=o;u++,s++)i.appendChild(U("",new Date(e,t,u),u,s));for(var f=o+1;f<=42-n&&(1===M.config.showMonths||s%7!=0);f++,s++)i.appendChild(U(l,new Date(e,t+1,f%o),f,s));var m=d("div","dayContainer");return m.appendChild(i),m}function G(){if(void 0!==M.daysContainer){s(M.daysContainer);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==M.config.monthSelectorType)){var e=function(e){return!(void 0!==M.config.minDate&&M.currentYear===M.config.minDate.getFullYear()&&eM.config.maxDate.getMonth())};M.monthsDropdownContainer.tabIndex=-1,M.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=d("option","f-monthDropdown-month");n.value=new Date(M.currentYear,t).getMonth().toString(),n.textContent=p(t,M.config.shorthandCurrentMonth,M.l10n),n.tabIndex=-1,M.currentMonth===t&&(n.selected=!0),M.monthsDropdownContainer.appendChild(n)}}}function q(){var e,t=d("div","f-month"),n=window.document.createDocumentFragment();M.monthsDropdownContainer=d("select","f-monthDropdown-months"),M.monthsDropdownContainer.setAttribute("aria-label",M.l10n.monthAriaLabel),O(M.monthsDropdownContainer,"change",(function(e){var t=g(e),n=parseInt(t.value,10);M.changeMonth(n-M.currentMonth),ve("onMonthChange")})),Z(),e=M.monthsDropdownContainer;var a=m("cur-year",{tabindex:"-1"}),o=a.getElementsByTagName("input")[0];o.setAttribute("aria-label",M.l10n.yearAriaLabel),M.config.minDate&&o.setAttribute("min",M.config.minDate.getFullYear().toString()),M.config.maxDate&&(o.setAttribute("max",M.config.maxDate.getFullYear().toString()),o.disabled=!!M.config.minDate&&M.config.minDate.getFullYear()===M.config.maxDate.getFullYear());var i=d("div","f-current-month");return i.appendChild(e),i.appendChild(a),n.appendChild(i),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function Q(){s(M.monthNav),M.monthNav.appendChild(M.prevMonthNav),M.config.showMonths&&(M.yearElements=[],M.monthElements=[]);for(var e=M.config.showMonths;e--;){var t=q();M.yearElements.push(t.yearElement),M.monthElements.push(t.monthElement),M.monthNav.appendChild(t.container)}M.monthNav.appendChild(M.nextMonthNav)}function V(){return M.monthNav=d("div","f-months"),M.yearElements=[],M.monthElements=[],M.prevMonthNav=d("span","f-prev-month"),M.prevMonthNav.innerText=M.config.prevArrow,M.nextMonthNav=d("span","f-next-month"),M.nextMonthNav.innerText=M.config.nextArrow,Q(),Object.defineProperty(M,"_hidePrevMonthArrow",{get:function(){return M.__hidePrevMonthArrow},set:function(e){M.__hidePrevMonthArrow!==e&&(u(M.prevMonthNav,"f-disabled",e),M.__hidePrevMonthArrow=e)}}),Object.defineProperty(M,"_hideNextMonthArrow",{get:function(){return M.__hideNextMonthArrow},set:function(e){M.__hideNextMonthArrow!==e&&(u(M.nextMonthNav,"f-disabled",e),M.__hideNextMonthArrow=e)}}),M.currentYearElement=M.yearElements[0],ye(),M.monthNav}function $(){M.calendarContainer.classList.add("hasTime"),M.config.noCalendar&&M.calendarContainer.classList.add("noCalendar");var e=b(M.config);M.timeContainer=d("div","f-time"),M.timeContainer.tabIndex=-1;var t=d("span","f-time-separator",":"),n=m("f-hour",{"aria-label":M.l10n.hourAriaLabel});M.hourElement=n.getElementsByTagName("input")[0];var a=m("f-minute",{"aria-label":M.l10n.minuteAriaLabel});return M.minuteElement=a.getElementsByTagName("input")[0],M.hourElement.tabIndex=M.minuteElement.tabIndex=-1,M.hourElement.value=i(M.latestSelectedDateObj?M.latestSelectedDateObj.getHours():M.config.time_24hr?e.hours:A(e.hours)),M.minuteElement.value=i(M.latestSelectedDateObj?M.latestSelectedDateObj.getMinutes():e.minutes),M.hourElement.setAttribute("step",M.config.hourIncrement.toString()),M.minuteElement.setAttribute("step",M.config.minuteIncrement.toString()),M.hourElement.setAttribute("min",M.config.time_24hr?"0":"1"),M.hourElement.setAttribute("max",M.config.time_24hr?"23":"12"),M.hourElement.setAttribute("maxlength","2"),M.minuteElement.setAttribute("min","0"),M.minuteElement.setAttribute("max","59"),M.minuteElement.setAttribute("maxlength","2"),M.timeContainer.appendChild(n),M.timeContainer.appendChild(t),M.timeContainer.appendChild(a),M.config.time_24hr&&M.timeContainer.classList.add("time24hr"),M.config.time_24hr||(M.amPM=d("span","f-am-pm",M.l10n.amPM[r((M.latestSelectedDateObj?M.hourElement.value:M.config.defaultHour)>11)]),M.amPM.title=M.l10n.toggleTitle,M.amPM.tabIndex=-1,M.timeContainer.appendChild(M.amPM)),M.timeContainer}function z(){M.weekdayContainer?s(M.weekdayContainer):M.weekdayContainer=d("div","f-weekdays");for(var e=M.config.showMonths;e--;){var t=d("div","f-weekdaycontainer");M.weekdayContainer.appendChild(t)}return X(),M.weekdayContainer}function X(){if(M.weekdayContainer){var e=M.l10n.firstDayOfWeek,n=t(M.l10n.weekdays.shorthand);e>0&&eM.weekdayContainer.children[a].appendChild(Object.assign(document.createElement("div"),{className:"f-weekday",innerText:e}))))}}function ee(e,t){void 0===t&&(t=!0);var n=t?e:e-M.currentMonth;n<0&&!0===M._hidePrevMonthArrow||n>0&&!0===M._hideNextMonthArrow||(M.currentMonth+=n,(M.currentMonth<0||M.currentMonth>11)&&(M.currentYear+=M.currentMonth>11?1:-1,M.currentMonth=(M.currentMonth+12)%12,ve("onYearChange"),Z()),G(),ve("onMonthChange"),ye())}function te(){for(var e=M._handlers.length;e--;)M._handlers[e].remove();M._handlers=[],M.calendarContainer&&M.calendarContainer.parentNode&&M.calendarContainer.parentNode.removeChild(M.calendarContainer),M.altInput&&(M.input.type="text",M.altInput.parentNode&&M.altInput.parentNode.removeChild(M.altInput),delete M.altInput),M.input&&(M.input.type=M.input._type,M.input.classList.remove("f-input"),M.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete M[e]}catch(e){}}))}function ne(e){if(!(!e||M.config.minDate&&eM.config.maxDate.getFullYear())){var t=e,n=M.currentYear!==t;M.currentYear=t||M.currentYear,M.config.maxDate&&M.currentYear===M.config.maxDate.getFullYear()?M.currentMonth=Math.min(M.config.maxDate.getMonth(),M.currentMonth):M.config.minDate&&M.currentYear===M.config.minDate.getFullYear()&&(M.currentMonth=Math.max(M.config.minDate.getMonth(),M.currentMonth)),n&&(M.redraw(),ve("onYearChange"),Z())}}function ae(e,t){var n;void 0===t&&(t=!0);var a=M.parseDate(e,void 0,t);if(M.config.minDate&&a&&w(a,M.config.minDate,void 0!==t?t:!M.minDateHasTime)<0||M.config.maxDate&&a&&w(a,M.config.maxDate,void 0!==t?t:!M.maxDateHasTime)>0)return!1;if(!M.config.enable&&0===M.config.disable.length)return!0;if(void 0===a)return!1;for(var o=!!M.config.enable,i=null!==(n=M.config.enable)&&void 0!==n?n:M.config.disable,r=0,c=void 0;r=c.from.getTime()&&a.getTime()<=c.to.getTime())return o}return!o}function oe(e){return function(t){var n=M.config["_"+e+"Date"]=M.parseDate(t,M.config.dateFormat),a=M.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(M["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),M.selectedDates&&(M.selectedDates=M.selectedDates.filter((function(e){return ae(e)})),M.selectedDates.length||"min"!==e||N(n),be()),M.daysContainer&&(le(),void 0!==n?M.currentYearElement[e]=n.getFullYear().toString():M.currentYearElement.removeAttribute(e),M.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function ie(){var t=["allowInvalidPreload","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline"],o=e(e({},JSON.parse(JSON.stringify(h.dataset||{}))),v),i={};M.config.parseDate=o.parseDate,M.config.formatDate=o.formatDate,Object.defineProperty(M.config,"enable",{get:function(){return M.config._enable},set:function(e){M.config._enable=ge(e)}}),Object.defineProperty(M.config,"disable",{get:function(){return M.config._disable},set:function(e){M.config._disable=ge(e)}});var r="time"===o.mode;if(!o.dateFormat&&(o.enableTime||r)){var c=F.defaultConfig.dateFormat||a.dateFormat;i.dateFormat=o.noCalendar||r?"H:i":c+" H:i"}if(o.altInput&&(o.enableTime||r)&&!o.altFormat){var u=F.defaultConfig.altFormat||a.altFormat;i.altFormat=o.noCalendar||r?"h:i K":u+" h:i K"}Object.defineProperty(M.config,"minDate",{get:function(){return M.config._minDate},set:oe("min")}),Object.defineProperty(M.config,"maxDate",{get:function(){return M.config._maxDate},set:oe("max")});var d=function(e){return function(t){M.config["min"===e?"_minTime":"_maxTime"]=M.parseDate(t,"H:i:S")}};Object.defineProperty(M.config,"minTime",{get:function(){return M.config._minTime},set:d("min")}),Object.defineProperty(M.config,"maxTime",{get:function(){return M.config._maxTime},set:d("max")}),"time"===o.mode&&(M.config.noCalendar=!0,M.config.enableTime=!0),Object.assign(M.config,i,o);for(var s=0;s-1?M.config[m]=l(f[m]).map(_).concat(M.config[m]):void 0===o[m]&&(M.config[m]=f[m])}o.altInputClass||(M.config.altInputClass=re().className+" "+M.config.altInputClass),ve("onParseConfig")}function re(){return h}function ce(){"object"!=typeof M.config.locale&&void 0===F.l10ns[M.config.locale]&&M.config.errorHandler(new Error("flatpickr: invalid locale "+M.config.locale)),M.l10n=e(e({},F.l10ns.default),"object"==typeof M.config.locale?M.config.locale:"default"!==M.config.locale?F.l10ns[M.config.locale]:void 0),D.K="("+M.l10n.amPM[0]+"|"+M.l10n.amPM[1]+"|"+M.l10n.amPM[0].toLowerCase()+"|"+M.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},v),JSON.parse(JSON.stringify(h.dataset||{}))).time_24hr&&void 0===F.defaultConfig.time_24hr&&(M.config.time_24hr=M.l10n.time_24hr),M.formatDate=C(M),M.parseDate=y({config:M.config,l10n:M.l10n})}function le(){M.config.noCalendar||(Z(),ye(),G())}function ue(e){e.preventDefault(),e.stopPropagation();var t=function(e){return e.classList&&e.classList.contains("f-day")&&!e.classList.contains("f-disabled")&&!e.classList.contains("notAllowed")},n=f(g(e),t);if(void 0!==n){var a=n,o=M.latestSelectedDateObj=new Date(a.dateObj.getTime()),i=(o.getMonth()M.currentMonth+M.config.showMonths-1)&&"range"!==M.config.mode;if(M.selectedDateElem=a,"single"===M.config.mode)M.selectedDates=[o];else if("multiple"===M.config.mode){var r=Me(o);r?M.selectedDates.splice(parseInt(r),1):M.selectedDates.push(o)}else"range"===M.config.mode&&(M.latestSelectedDateObj=o,M.selectedDates.push(o),0!==w(o,M.selectedDates[0],!0)&&M.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(I(),i){var c=M.currentYear!==o.getFullYear();M.currentYear=o.getFullYear(),M.currentMonth=o.getMonth(),c&&(ve("onYearChange"),Z()),ve("onMonthChange")}ye(),G(),be(),i||"range"===M.config.mode||1!==M.config.showMonths?void 0!==M.selectedDateElem&&void 0===M.hourElement&&M.selectedDateElem&&M.selectedDateElem.focus():K(a),void 0!==M.hourElement&&void 0!==M.hourElement&&M.hourElement.focus(),j()}}M.parseDate=y({config:M.config,l10n:M.l10n}),M._handlers=[],M.pluginElements=[],M.loadedPlugins=[],M._bind=O,M._setHoursFromDate=N,M.changeMonth=ee,M.changeYear=ne,M._createElement=d,M.destroy=te,M.isEnabled=ae,M.jumpToDate=L,M.redraw=le,M.set=se,M.setDate=me;var de={locale:[ce,X],showMonths:[Q,z],minDate:[L],maxDate:[L]};function se(e,t){if(null!==e&&"object"==typeof e)for(var a in Object.assign(M.config,e),e)void 0!==de[a]&&de[a].forEach((function(e){return e()}));else M.config[e]=t,void 0!==de[e]?de[e].forEach((function(e){return e()})):n.indexOf(e)>-1&&(M.config[e]=l(t));M.redraw(),be(!0)}function fe(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return M.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[M.parseDate(e,t)];else if("string"==typeof e)switch(M.config.mode){case"single":case"time":n=[M.parseDate(e,t)];break;case"multiple":n=e.split(M.config.conjunction).map((function(e){return M.parseDate(e,t)}));break;case"range":n=e.split(M.l10n.rangeSeparator).map((function(e){return M.parseDate(e,t)}))}else M.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));M.selectedDates=M.config.allowInvalidPreload?n:n.filter((function(e){return e instanceof Date&&ae(e,!1)})),"range"===M.config.mode&&M.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function me(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=M.config.dateFormat),fe(e,n),M.latestSelectedDateObj=M.selectedDates[M.selectedDates.length-1],M.redraw(),L(void 0,t),N(),be(t),t&&ve("onChange")}function ge(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?M.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:M.parseDate(e.from,void 0),to:M.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function he(){M.selectedDates=[],M.now=M.parseDate(M.config.now)||new Date;var e=M.config.defaultDate||("INPUT"!==M.input.nodeName&&"TEXTAREA"!==M.input.nodeName||!M.input.placeholder||M.input.value!==M.input.placeholder?M.input.value:null);e&&fe(e,M.config.dateFormat),M._initialDate=M.selectedDates.length>0?M.selectedDates[0]:M.config.minDate&&M.config.minDate.getTime()>M.now.getTime()?M.config.minDate:M.config.maxDate&&M.config.maxDate.getTime()0&&(M.latestSelectedDateObj=M.selectedDates[0]),void 0!==M.config.minTime&&(M.config.minTime=M.parseDate(M.config.minTime,"H:i")),void 0!==M.config.maxTime&&(M.config.maxTime=M.parseDate(M.config.maxTime,"H:i")),M.minDateHasTime=!!M.config.minDate&&(M.config.minDate.getHours()>0||M.config.minDate.getMinutes()>0||M.config.minDate.getSeconds()>0),M.maxDateHasTime=!!M.config.maxDate&&(M.config.maxDate.getHours()>0||M.config.maxDate.getMinutes()>0||M.config.maxDate.getSeconds()>0)}function pe(){M.input=re(),M.input?(M.input._type=M.input.type,M.input.type="text",M.input.classList.add("f-input"),M._input=M.input,M.config.altInput&&(M.altInput=d(M.input.nodeName,M.config.altInputClass),M._input=M.altInput,M.altInput.placeholder=M.input.placeholder,M.altInput.disabled=M.input.disabled,M.altInput.required=M.input.required,M.altInput.tabIndex=M.input.tabIndex,M.altInput.type="text",M.input.setAttribute("type","hidden"),M.input.parentNode&&M.input.parentNode.insertBefore(M.altInput,M.input.nextSibling)),M._input.setAttribute("readonly","readonly"),M._positionElement=M.config.positionElement||M._input):M.config.errorHandler(new Error("Invalid input element specified"))}function ve(e,t){if(void 0!==M.config){var n=M.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a=0&&w(e,M.selectedDates[1])<=0}function ye(){!M.config.noCalendar&&M.monthNav&&(M.yearElements.forEach((function(e,t){var n=new Date(M.currentYear,M.currentMonth,1);n.setMonth(M.currentMonth+t),M.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),M._hidePrevMonthArrow=void 0!==M.config.minDate&&(M.currentYear===M.config.minDate.getFullYear()?M.currentMonth<=M.config.minDate.getMonth():M.currentYearM.config.maxDate.getMonth():M.currentYear>M.config.maxDate.getFullYear()))}function we(e){return M.selectedDates.map((function(t){return M.formatDate(t,e)})).filter((function(e,t,n){return"range"!==M.config.mode||M.config.enableTime||n.indexOf(e)===t})).join("range"!==M.config.mode?M.config.conjunction:M.l10n.rangeSeparator)}function be(e){void 0===e&&(e=!0),M.input.value=we(M.config.dateFormat),void 0!==M.altInput&&(M.altInput.value=we(M.config.altFormat)),!1!==e&&ve("onValueUpdate")}function xe(e){var t=g(e),n=M.prevMonthNav.contains(t),a=M.nextMonthNav.contains(t);n||a?ee(n?-1:1):M.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?M.changeYear(M.currentYear+1):t.classList.contains("arrowDown")&&M.changeYear(M.currentYear-1)}function Ee(e){e.preventDefault();var t="keydown"===e.type,n=g(e),a=n;void 0!==M.amPM&&n===M.amPM&&(M.amPM.textContent=M.l10n.amPM[r(M.amPM.textContent===M.l10n.amPM[0])]);var o=parseFloat(a.getAttribute("min")),c=parseFloat(a.getAttribute("max")),l=parseFloat(a.getAttribute("step")),u=parseInt(a.value,10),d=u+l*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==a.value&&2===a.value.length){var s=a===M.hourElement,f=a===M.minuteElement;dc&&(d=a===M.hourElement?d-c-r(!M.amPM):o,f&&J(void 0,1,M.hourElement)),M.amPM&&s&&(1===l?d+u===23:Math.abs(d-u)>l)&&(M.amPM.textContent=M.l10n.amPM[r(M.amPM.textContent===M.l10n.amPM[0])]),a.value=i(d)}}return T(),M}function T(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],o=0;o",noCalendar:!1,now:new Date,onChange:[],onMonthChange:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<",shorthandCurrentMonth:!1,showMonths:1,time_24hr:!1},o={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},i=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},r=function(e){return!0===e?1:0};function c(e,t){var n;return function(){var a=this;clearTimeout(n),n=setTimeout((function(){return e.apply(a,arguments)}),t)}}var l=function(e){return e instanceof Array?e:[e]};function u(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function d(e,t,n){var a=window.document.createElement(e);return t=t||"",n=n||"",a.className=t,void 0!==n&&(a.textContent=n),a}function s(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function f(e,t){return t(e)?e:e.parentNode?f(e.parentNode,t):void 0}function m(e,t){var n=d("div","numInputWrapper"),a=d("input","numInput "+e),o=d("span","arrowUp"),i=d("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==t)for(var r in t)a.setAttribute(r,t[r]);return n.appendChild(a),n.appendChild(o),n.appendChild(i),n}function g(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(t){return e.target}}var h=function(){},p=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},v={D:h,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*r(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var a=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:h,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:h,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},D={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},M={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[M.w(e,t,n)]},F:function(e,t,n){return p(M.n(e,t,n)-1,!1,t)},G:function(e,t,n){return i(M.h(e,t,n))},H:function(e){return i(e.getHours())},K:function(e,t){return t.amPM[r(e.getHours()>11)]},M:function(e,t){return p(e.getMonth(),!0,t)},S:function(e){return i(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return i(e.getFullYear(),4)},d:function(e){return i(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return i(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return i(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},C=function(e){var t=e.config,n=void 0===t?a:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,a){var o=a||r;return void 0!==n.formatDate?n.formatDate(e,t,o):t.split("").map((function(t,a,i){return M[t]&&"\\"!==i[a-1]?M[t](e,o,n):"\\"!==t?t:""})).join("")}},y=function(e){var t=e.config,n=void 0===t?a:t,i=e.l10n,r=void 0===i?o:i;return function(e,t,o,i){if(0===e||e){var c,l=i||r,u=e;if(e instanceof Date)c=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)c=new Date(e);else if("string"==typeof e){var d=t||(n||a).dateFormat,s=String(e).trim();if("today"===s)c=new Date,o=!0;else if(/Z$/.test(s)||/GMT$/.test(s))c=new Date(e);else if(n&&n.parseDate)c=n.parseDate(e,d);else{c=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var f=void 0,m=[],g=0,h=0,p="";g=0?new Date:new Date(M.config.minDate.getTime()),n=b(M.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),M.selectedDates=[t],M.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&Ee(e);var a=M._input.value;I(),be(),M._input.value!==a&&M._debouncedChange()}function S(e,t){return e%12+12*r(t===M.l10n.amPM[1])}function A(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}function I(){if(void 0!==M.hourElement&&void 0!==M.minuteElement){var e=(parseInt(M.hourElement.value.slice(-2),10)||0)%24,t=(parseInt(M.minuteElement.value,10)||0)%60,n=void 0!==M.secondElement?(parseInt(M.secondElement.value,10)||0)%60:0;void 0!==M.amPM&&(e=S(e,M.amPM.textContent));var a=void 0!==M.config.minTime||M.config.minDate&&M.minDateHasTime&&M.latestSelectedDateObj&&0===w(M.latestSelectedDateObj,M.config.minDate,!0);if(void 0!==M.config.maxTime||M.config.maxDate&&M.maxDateHasTime&&M.latestSelectedDateObj&&0===w(M.latestSelectedDateObj,M.config.maxDate,!0)){var o=void 0!==M.config.maxTime?M.config.maxTime:M.config.maxDate;(e=Math.min(e,o.getHours()))===o.getHours()&&(t=Math.min(t,o.getMinutes())),t===o.getMinutes()&&(n=Math.min(n,o.getSeconds()))}if(a){var i=void 0!==M.config.minTime?M.config.minTime:M.config.minDate;(e=Math.max(e,i.getHours()))===i.getHours()&&t=12)]),void 0!==M.secondElement&&(M.secondElement.value=i(n)))}function P(e){var t=g(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&ne(n)}function O(e,t,n,a){return t instanceof Array?t.forEach((function(t){return O(e,t,n,a)})):e instanceof Array?e.forEach((function(e){return O(e,t,n,a)})):(e.addEventListener(t,n,a),void M._handlers.push({remove:function(){return e.removeEventListener(t,n)}}))}function j(){ve("onChange")}function k(){if(M._debouncedChange=c(j,x),void 0!==M.daysContainer&&(O(M.monthNav,"click",xe),O(M.monthNav,["keyup","increment"],P),O(M.daysContainer,"click",ue)),void 0!==M.timeContainer&&void 0!==M.minuteElement&&void 0!==M.hourElement){var e=function(e){return g(e).select()};O(M.timeContainer,["increment"],Y),O(M.timeContainer,"blur",Y,{capture:!0}),O(M.timeContainer,"click",W),O([M.hourElement,M.minuteElement],["focus","click"],e),void 0!==M.secondElement&&O(M.secondElement,"focus",(function(){return M.secondElement&&M.secondElement.select()})),void 0!==M.amPM&&O(M.amPM,"click",(function(e){Y(e),j()}))}}function L(e,t){var n=void 0!==e?M.parseDate(e):M.latestSelectedDateObj||(M.config.minDate&&M.config.minDate>M.now?M.config.minDate:M.config.maxDate&&M.config.maxDate1),M.calendarContainer.appendChild(e);var t=void 0!==M.config.appendTo&&void 0!==M.config.appendTo.nodeType;M.config.inline&&(M.calendarContainer.classList.add("inline"),!t&&M.element.parentNode?M.element.parentNode.insertBefore(M.calendarContainer,M._input.nextSibling):void 0!==M.config.appendTo&&M.config.appendTo.appendChild(M.calendarContainer))}function U(e,t,n,a){var o=ae(t,!0),i=d("span","f-day "+e,t.getDate().toString());return i.dateObj=t,i.$i=a,i.setAttribute("aria-label",M.formatDate(t,M.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===w(t,M.now)&&(M.todayDateElem=i,i.classList.add("today"),i.setAttribute("aria-current","date")),o?(i.tabIndex=-1,Me(t)&&(i.classList.add("selected"),M.selectedDateElem=i,"range"===M.config.mode&&(u(i,"startRange",M.selectedDates[0]&&0===w(t,M.selectedDates[0],!0)),u(i,"endRange",M.selectedDates[1]&&0===w(t,M.selectedDates[1],!0)),"nextMonthDay"===e&&i.classList.add("inRange")))):i.classList.add("f-disabled"),"range"===M.config.mode&&Ce(t)&&!Me(t)&&i.classList.add("inRange"),i}function K(e){e.focus()}function B(e,t){for(var n=(new Date(e,t,1).getDay()-M.l10n.firstDayOfWeek+7)%7,a=M.utils.getDaysInMonth((t-1+12)%12,e),o=M.utils.getDaysInMonth(t,e),i=window.document.createDocumentFragment(),r=M.config.showMonths>1,c=r?"prevMonthDay hidden":"prevMonthDay",l=r?"nextMonthDay hidden":"nextMonthDay",u=a+1-n,s=0;u<=a;u++,s++)i.appendChild(U(c,new Date(e,t-1,u),u,s));for(u=1;u<=o;u++,s++)i.appendChild(U("",new Date(e,t,u),u,s));for(var f=o+1;f<=42-n&&(1===M.config.showMonths||s%7!=0);f++,s++)i.appendChild(U(l,new Date(e,t+1,f%o),f,s));var m=d("div","dayContainer");return m.appendChild(i),m}function G(){if(void 0!==M.daysContainer){s(M.daysContainer);for(var e=document.createDocumentFragment(),t=0;t1||"dropdown"!==M.config.monthSelectorType)){var e=function(e){return!(void 0!==M.config.minDate&&M.currentYear===M.config.minDate.getFullYear()&&eM.config.maxDate.getMonth())};M.monthsDropdownContainer.tabIndex=-1,M.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var n=d("option","f-monthDropdown-month");n.value=new Date(M.currentYear,t).getMonth().toString(),n.textContent=p(t,M.config.shorthandCurrentMonth,M.l10n),n.tabIndex=-1,M.currentMonth===t&&(n.selected=!0),M.monthsDropdownContainer.appendChild(n)}}}function q(){var e,t=d("div","f-month"),n=window.document.createDocumentFragment();M.monthsDropdownContainer=d("select","f-monthDropdown-months"),M.monthsDropdownContainer.setAttribute("aria-label",M.l10n.monthAriaLabel),O(M.monthsDropdownContainer,"change",(function(e){var t=g(e),n=parseInt(t.value,10);M.changeMonth(n-M.currentMonth),ve("onMonthChange")})),Z(),e=M.monthsDropdownContainer;var a=m("cur-year",{tabindex:"-1"}),o=a.getElementsByTagName("input")[0];o.setAttribute("aria-label",M.l10n.yearAriaLabel),M.config.minDate&&o.setAttribute("min",M.config.minDate.getFullYear().toString()),M.config.maxDate&&(o.setAttribute("max",M.config.maxDate.getFullYear().toString()),o.disabled=!!M.config.minDate&&M.config.minDate.getFullYear()===M.config.maxDate.getFullYear());var i=d("div","f-current-month");return i.appendChild(e),i.appendChild(a),n.appendChild(i),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function Q(){s(M.monthNav),M.monthNav.appendChild(M.prevMonthNav),M.config.showMonths&&(M.yearElements=[],M.monthElements=[]);for(var e=M.config.showMonths;e--;){var t=q();M.yearElements.push(t.yearElement),M.monthElements.push(t.monthElement),M.monthNav.appendChild(t.container)}M.monthNav.appendChild(M.nextMonthNav)}function V(){return M.monthNav=d("div","f-months"),M.yearElements=[],M.monthElements=[],M.prevMonthNav=d("span","f-prev-month"),M.prevMonthNav.innerText=M.config.prevArrow,M.nextMonthNav=d("span","f-next-month"),M.nextMonthNav.innerText=M.config.nextArrow,Q(),Object.defineProperty(M,"_hidePrevMonthArrow",{get:function(){return M.__hidePrevMonthArrow},set:function(e){M.__hidePrevMonthArrow!==e&&(u(M.prevMonthNav,"f-disabled",e),M.__hidePrevMonthArrow=e)}}),Object.defineProperty(M,"_hideNextMonthArrow",{get:function(){return M.__hideNextMonthArrow},set:function(e){M.__hideNextMonthArrow!==e&&(u(M.nextMonthNav,"f-disabled",e),M.__hideNextMonthArrow=e)}}),M.currentYearElement=M.yearElements[0],ye(),M.monthNav}function $(){M.calendarContainer.classList.add("hasTime"),M.config.noCalendar&&M.calendarContainer.classList.add("noCalendar");var e=b(M.config);M.timeContainer=d("div","f-time"),M.timeContainer.tabIndex=-1;var t=d("span","f-time-separator",":"),n=m("f-hour",{"aria-label":M.l10n.hourAriaLabel});M.hourElement=n.getElementsByTagName("input")[0];var a=m("f-minute",{"aria-label":M.l10n.minuteAriaLabel});return M.minuteElement=a.getElementsByTagName("input")[0],M.hourElement.tabIndex=M.minuteElement.tabIndex=-1,M.hourElement.value=i(M.latestSelectedDateObj?M.latestSelectedDateObj.getHours():M.config.time_24hr?e.hours:A(e.hours)),M.minuteElement.value=i(M.latestSelectedDateObj?M.latestSelectedDateObj.getMinutes():e.minutes),M.hourElement.setAttribute("step",M.config.hourIncrement.toString()),M.minuteElement.setAttribute("step",M.config.minuteIncrement.toString()),M.hourElement.setAttribute("min",M.config.time_24hr?"0":"1"),M.hourElement.setAttribute("max",M.config.time_24hr?"23":"12"),M.hourElement.setAttribute("maxlength","2"),M.minuteElement.setAttribute("min","0"),M.minuteElement.setAttribute("max","59"),M.minuteElement.setAttribute("maxlength","2"),M.timeContainer.appendChild(n),M.timeContainer.appendChild(t),M.timeContainer.appendChild(a),M.config.time_24hr&&M.timeContainer.classList.add("time24hr"),M.config.time_24hr||(M.amPM=d("span","f-am-pm",M.l10n.amPM[r((M.latestSelectedDateObj?M.hourElement.value:M.config.defaultHour)>11)]),M.amPM.title=M.l10n.toggleTitle,M.amPM.tabIndex=-1,M.timeContainer.appendChild(M.amPM)),M.timeContainer}function z(){M.weekdayContainer?s(M.weekdayContainer):M.weekdayContainer=d("div","f-weekdays");for(var e=M.config.showMonths;e--;){var t=d("div","f-weekdaycontainer");M.weekdayContainer.appendChild(t)}return X(),M.weekdayContainer}function X(){if(M.weekdayContainer){var e=M.l10n.firstDayOfWeek,n=t(M.l10n.weekdays.shorthand);e>0&&eM.weekdayContainer.children[a].appendChild(Object.assign(document.createElement("div"),{className:"f-weekday",innerText:e}))))}}function ee(e,t){void 0===t&&(t=!0);var n=t?e:e-M.currentMonth;n<0&&!0===M._hidePrevMonthArrow||n>0&&!0===M._hideNextMonthArrow||(M.currentMonth+=n,(M.currentMonth<0||M.currentMonth>11)&&(M.currentYear+=M.currentMonth>11?1:-1,M.currentMonth=(M.currentMonth+12)%12,ve("onYearChange"),Z()),G(),ve("onMonthChange"),ye())}function te(){for(var e=M._handlers.length;e--;)M._handlers[e].remove();M._handlers=[],M.calendarContainer&&M.calendarContainer.parentNode&&M.calendarContainer.parentNode.removeChild(M.calendarContainer),M.altInput&&(M.input.type="text",M.altInput.parentNode&&M.altInput.parentNode.removeChild(M.altInput),delete M.altInput),M.input&&(M.input.type=M.input._type,M.input.classList.remove("f-input"),M.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete M[e]}catch(e){}}))}function ne(e){if(!(!e||M.config.minDate&&eM.config.maxDate.getFullYear())){var t=e,n=M.currentYear!==t;M.currentYear=t||M.currentYear,M.config.maxDate&&M.currentYear===M.config.maxDate.getFullYear()?M.currentMonth=Math.min(M.config.maxDate.getMonth(),M.currentMonth):M.config.minDate&&M.currentYear===M.config.minDate.getFullYear()&&(M.currentMonth=Math.max(M.config.minDate.getMonth(),M.currentMonth)),n&&(M.redraw(),ve("onYearChange"),Z())}}function ae(e,t){var n;void 0===t&&(t=!0);var a=M.parseDate(e,void 0,t);if(M.config.minDate&&a&&w(a,M.config.minDate,void 0!==t?t:!M.minDateHasTime)<0||M.config.maxDate&&a&&w(a,M.config.maxDate,void 0!==t?t:!M.maxDateHasTime)>0)return!1;if(!M.config.enable&&0===M.config.disable.length)return!0;if(void 0===a)return!1;for(var o=!!M.config.enable,i=null!==(n=M.config.enable)&&void 0!==n?n:M.config.disable,r=0,c=void 0;r=c.from.getTime()&&a.getTime()<=c.to.getTime())return o}return!o}function oe(e){return function(t){var n=M.config["_"+e+"Date"]=M.parseDate(t,M.config.dateFormat),a=M.config["_"+("min"===e?"max":"min")+"Date"];void 0!==n&&(M["min"===e?"minDateHasTime":"maxDateHasTime"]=n.getHours()>0||n.getMinutes()>0||n.getSeconds()>0),M.selectedDates&&(M.selectedDates=M.selectedDates.filter((function(e){return ae(e)})),M.selectedDates.length||"min"!==e||N(n),be()),M.daysContainer&&(le(),void 0!==n?M.currentYearElement[e]=n.getFullYear().toString():M.currentYearElement.removeAttribute(e),M.currentYearElement.disabled=!!a&&void 0!==n&&a.getFullYear()===n.getFullYear())}}function ie(){var t=["allowInvalidPreload","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline"],o=e(e({},JSON.parse(JSON.stringify(h.dataset||{}))),v),i={};M.config.parseDate=o.parseDate,M.config.formatDate=o.formatDate,Object.defineProperty(M.config,"enable",{get:function(){return M.config._enable},set:function(e){M.config._enable=ge(e)}}),Object.defineProperty(M.config,"disable",{get:function(){return M.config._disable},set:function(e){M.config._disable=ge(e)}});var r="time"===o.mode;if(!o.dateFormat&&(o.enableTime||r)){var c=F.defaultConfig.dateFormat||a.dateFormat;i.dateFormat=o.noCalendar||r?"H:i":c+" H:i"}if(o.altInput&&(o.enableTime||r)&&!o.altFormat){var u=F.defaultConfig.altFormat||a.altFormat;i.altFormat=o.noCalendar||r?"h:i K":u+" h:i K"}Object.defineProperty(M.config,"minDate",{get:function(){return M.config._minDate},set:oe("min")}),Object.defineProperty(M.config,"maxDate",{get:function(){return M.config._maxDate},set:oe("max")});var d=function(e){return function(t){M.config["min"===e?"_minTime":"_maxTime"]=M.parseDate(t,"H:i:S")}};Object.defineProperty(M.config,"minTime",{get:function(){return M.config._minTime},set:d("min")}),Object.defineProperty(M.config,"maxTime",{get:function(){return M.config._maxTime},set:d("max")}),"time"===o.mode&&(M.config.noCalendar=!0,M.config.enableTime=!0),Object.assign(M.config,i,o);for(var s=0;s-1?M.config[m]=l(f[m]).map(_).concat(M.config[m]):void 0===o[m]&&(M.config[m]=f[m])}o.altInputClass||(M.config.altInputClass=re().className+" "+M.config.altInputClass),ve("onParseConfig")}function re(){return h}function ce(){"object"!=typeof M.config.locale&&void 0===F.l10ns[M.config.locale]&&M.config.errorHandler(new Error("flatpickr: invalid locale "+M.config.locale)),M.l10n=e(e({},F.l10ns.default),"object"==typeof M.config.locale?M.config.locale:"default"!==M.config.locale?F.l10ns[M.config.locale]:void 0),D.K="("+M.l10n.amPM[0]+"|"+M.l10n.amPM[1]+"|"+M.l10n.amPM[0].toLowerCase()+"|"+M.l10n.amPM[1].toLowerCase()+")",void 0===e(e({},v),JSON.parse(JSON.stringify(h.dataset||{}))).time_24hr&&void 0===F.defaultConfig.time_24hr&&(M.config.time_24hr=M.l10n.time_24hr),M.formatDate=C(M),M.parseDate=y({config:M.config,l10n:M.l10n})}function le(){M.config.noCalendar||(Z(),ye(),G())}function ue(e){e.preventDefault(),e.stopPropagation();var t=function(e){return e.classList&&e.classList.contains("f-day")&&!e.classList.contains("f-disabled")&&!e.classList.contains("notAllowed")},n=f(g(e),t);if(void 0!==n){var a=n,o=M.latestSelectedDateObj=new Date(a.dateObj.getTime()),i=(o.getMonth()M.currentMonth+M.config.showMonths-1)&&"range"!==M.config.mode;if(M.selectedDateElem=a,"single"===M.config.mode)M.selectedDates=[o];else if("multiple"===M.config.mode){var r=Me(o);r?M.selectedDates.splice(parseInt(r),1):M.selectedDates.push(o)}else"range"===M.config.mode&&(M.latestSelectedDateObj=o,M.selectedDates.push(o),0!==w(o,M.selectedDates[0],!0)&&M.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(I(),i){var c=M.currentYear!==o.getFullYear();M.currentYear=o.getFullYear(),M.currentMonth=o.getMonth(),c&&(ve("onYearChange"),Z()),ve("onMonthChange")}ye(),G(),be(),i||"range"===M.config.mode||1!==M.config.showMonths?void 0!==M.selectedDateElem&&void 0===M.hourElement&&M.selectedDateElem&&M.selectedDateElem.focus():K(a),void 0!==M.hourElement&&void 0!==M.hourElement&&M.hourElement.focus(),j()}}M.parseDate=y({config:M.config,l10n:M.l10n}),M._handlers=[],M.pluginElements=[],M.loadedPlugins=[],M._bind=O,M._setHoursFromDate=N,M.changeMonth=ee,M.changeYear=ne,M._createElement=d,M.destroy=te,M.isEnabled=ae,M.jumpToDate=L,M.redraw=le,M.set=se,M.setDate=me;var de={locale:[ce,X],showMonths:[Q,z],minDate:[L],maxDate:[L]};function se(e,t){if(null!==e&&"object"==typeof e)for(var a in Object.assign(M.config,e),e)void 0!==de[a]&&de[a].forEach((function(e){return e()}));else M.config[e]=t,void 0!==de[e]?de[e].forEach((function(e){return e()})):n.indexOf(e)>-1&&(M.config[e]=l(t));M.redraw(),be(!0)}function fe(e,t){var n=[];if(e instanceof Array)n=e.map((function(e){return M.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)n=[M.parseDate(e,t)];else if("string"==typeof e)switch(M.config.mode){case"single":case"time":n=[M.parseDate(e,t)];break;case"multiple":n=e.split(M.config.conjunction).map((function(e){return M.parseDate(e,t)}));break;case"range":n=e.split(M.l10n.rangeSeparator).map((function(e){return M.parseDate(e,t)}))}else M.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));M.selectedDates=M.config.allowInvalidPreload?n:n.filter((function(e){return e instanceof Date&&ae(e,!1)})),"range"===M.config.mode&&M.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function me(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=M.config.dateFormat),fe(e,n),M.latestSelectedDateObj=M.selectedDates[M.selectedDates.length-1],M.redraw(),L(void 0,t),N(),be(t),t&&ve("onChange")}function ge(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?M.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:M.parseDate(e.from,void 0),to:M.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function he(){M.selectedDates=[],M.now=M.parseDate(M.config.now)||new Date;var e=M.config.defaultDate||("INPUT"!==M.input.nodeName&&"TEXTAREA"!==M.input.nodeName||!M.input.placeholder||M.input.value!==M.input.placeholder?M.input.value:null);e&&fe(e,M.config.dateFormat),M._initialDate=M.selectedDates.length>0?M.selectedDates[0]:M.config.minDate&&M.config.minDate.getTime()>M.now.getTime()?M.config.minDate:M.config.maxDate&&M.config.maxDate.getTime()0&&(M.latestSelectedDateObj=M.selectedDates[0]),void 0!==M.config.minTime&&(M.config.minTime=M.parseDate(M.config.minTime,"H:i")),void 0!==M.config.maxTime&&(M.config.maxTime=M.parseDate(M.config.maxTime,"H:i")),M.minDateHasTime=!!M.config.minDate&&(M.config.minDate.getHours()>0||M.config.minDate.getMinutes()>0||M.config.minDate.getSeconds()>0),M.maxDateHasTime=!!M.config.maxDate&&(M.config.maxDate.getHours()>0||M.config.maxDate.getMinutes()>0||M.config.maxDate.getSeconds()>0)}function pe(){M.input=re(),M.input?(M.input._type=M.input.type,M.input.type="text",M.input.classList.add("f-input"),M._input=M.input,M.config.altInput&&(M.altInput=d(M.input.nodeName,M.config.altInputClass),M._input=M.altInput,M.altInput.placeholder=M.input.placeholder,M.altInput.disabled=M.input.disabled,M.altInput.required=M.input.required,M.altInput.tabIndex=M.input.tabIndex,M.altInput.type="text",M.input.setAttribute("type","hidden"),M.input.parentNode&&M.input.parentNode.insertBefore(M.altInput,M.input.nextSibling)),M._input.setAttribute("readonly","readonly"),M._positionElement=M.config.positionElement||M._input):M.config.errorHandler(new Error("Invalid input element specified"))}function ve(e,t){if(void 0!==M.config){var n=M.config[e];if(void 0!==n&&n.length>0)for(var a=0;n[a]&&a=0&&w(e,M.selectedDates[1])<=0}function ye(){!M.config.noCalendar&&M.monthNav&&(M.yearElements.forEach((function(e,t){var n=new Date(M.currentYear,M.currentMonth,1);n.setMonth(M.currentMonth+t),M.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()})),M._hidePrevMonthArrow=void 0!==M.config.minDate&&(M.currentYear===M.config.minDate.getFullYear()?M.currentMonth<=M.config.minDate.getMonth():M.currentYearM.config.maxDate.getMonth():M.currentYear>M.config.maxDate.getFullYear()))}function we(e){return M.selectedDates.map((function(t){return M.formatDate(t,e)})).filter((function(e,t,n){return"range"!==M.config.mode||M.config.enableTime||n.indexOf(e)===t})).join("range"!==M.config.mode?M.config.conjunction:M.l10n.rangeSeparator)}function be(e){void 0===e&&(e=!0),M.input.value=we(M.config.dateFormat),void 0!==M.altInput&&(M.altInput.value=we(M.config.altFormat)),!1!==e&&ve("onValueUpdate")}function xe(e){var t=g(e),n=M.prevMonthNav.contains(t),a=M.nextMonthNav.contains(t);n||a?ee(n?-1:1):M.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?M.changeYear(M.currentYear+1):t.classList.contains("arrowDown")&&M.changeYear(M.currentYear-1)}function Ee(e){e.preventDefault();var t="keydown"===e.type,n=g(e),a=n;void 0!==M.amPM&&n===M.amPM&&(M.amPM.textContent=M.l10n.amPM[r(M.amPM.textContent===M.l10n.amPM[0])]);var o=parseFloat(a.getAttribute("min")),c=parseFloat(a.getAttribute("max")),l=parseFloat(a.getAttribute("step")),u=parseInt(a.value,10),d=u+l*(e.delta||(t?38===e.which?1:-1:0));if(void 0!==a.value&&2===a.value.length){var s=a===M.hourElement,f=a===M.minuteElement;dc&&(d=a===M.hourElement?d-c-r(!M.amPM):o,f&&J(void 0,1,M.hourElement)),M.amPM&&s&&(1===l?d+u===23:Math.abs(d-u)>l)&&(M.amPM.textContent=M.l10n.amPM[r(M.amPM.textContent===M.l10n.amPM[0])]),a.value=i(d)}}return T(),M}function T(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],o=0;o { - if (e.which >= 48 && e.which <= 56 && !document.querySelector('.form-overlay').classList.contains('show')) { + if (e.which >= 49 && e.which <= 58 && !document.querySelector('.form-overlay').classList.contains('show')) { var choices = document.querySelectorAll('.choice'); var selectedChoice = choices && choices.length > 0 ? choices[e.which - 48 - 1] : false; if (!selectedChoice || selectedChoice.classList.contains('disabled')) return; choices.forEach(c => c.classList.remove('focused')); selectedChoice.focus(); } + if (e.which === 48) { + document.querySelectorAll('.choice').forEach(c => c.classList.remove('focused')) + document.querySelector('.choice:last-of-type').focus(); + } if (e.which === 13 && !document.querySelector('.form-overlay').classList.contains('show')) { var selectedChoice = document.querySelector('.choice.focused'); if (!selectedChoice) return; snooze(o.time, c) } + if (e.which === 67) document.querySelector('.custom-choice').click(); if (e.which === 84) document.getElementById('tab').click(); if (e.which === 87) document.getElementById('window').click(); if (e.which === 83) document.getElementById('selection').click(); @@ -151,6 +156,7 @@ async function buildChoices() { var now = Object.assign(document.createElement('option'), {value: 'now', innerText: 'Current Time', selected: s === 'now'}); var select = document.createElement('select'); + select.tabIndex = -1; select.addEventListener('change', async e => { await savePopupOptions(); // change time @@ -179,7 +185,15 @@ async function buildChoices() { tabIndex: o.disabled ? -1 : 0, }, wrapInDiv('', icon, label), o.startUp ? wrapInDiv() : wrapInDiv('', date, time)); c.addEventListener('mouseover', _ => c.classList.add('focused')) - c.addEventListener('mouseout', _ => c.classList.remove('focused')) + c.addEventListener('mouseout', _ => c.classList.remove('focused')); + if (['weekend', 'monday', 'week', 'month'].includes(name)) c.addEventListener('keydown', e => { + if (!e || e.which !== 38 && e.which !== 40) return; + var options = select.querySelectorAll('option'); + var current = Array.from(options).findIndex(o => o.selected); + if (e.which === 38 && current > 0) options[current - 1].selected = true; + if (e.which === 40 && current < options.length - 1) options[current + 1].selected = true; + select.dispatchEvent(new Event('change')); + }) c.onclick = e => {if (!['OPTION', 'SELECT'].includes(e.target.nodeName)) snooze(o.startUp ? 'startup' : o.time, c)} c.onkeyup = e => {if (e.which === 13) snooze(o.startUp ? 'startup' : o.time, c)} return c @@ -248,7 +262,12 @@ async function buildCustomChoice() { onclick: _ => { customChoice.classList.add('focused'); document.querySelectorAll('.choice').forEach(c => {c.classList.add('disabled');c.setAttribute('tabindex','-1')}); - // document.querySelector('.popup-checkbox input').setAttribute('tabindex', '-1'); + document.querySelector('.form-overlay').classList.add('show') + }, + onkeydown: e => { + if (!e || e.which !== 13 && e.which !== 32) return; + customChoice.classList.add('focused'); + document.querySelectorAll('.choice').forEach(c => {c.classList.add('disabled');c.setAttribute('tabindex','-1')}); document.querySelector('.form-overlay').classList.add('show') } }, wrapInDiv('', icon, label), wrapInDiv('custom-info', wrapInDiv('display', wrapInDiv('date-display'), wrapInDiv('time-display')), submitButton)); diff --git a/scripts/rise.js b/scripts/rise.js index 2b7b864..68934f4 100644 --- a/scripts/rise.js +++ b/scripts/rise.js @@ -30,7 +30,7 @@ function populate(found) { document.querySelector('#when span').innerText = dayjs(found.timeCreated).format(`${getHourFormat(true)} on dddd, DD MMM YYYY`) var till = document.querySelector('#till span'); till.innerText = found.startUp ? 'the next time you opened ' + capitalize(getBrowser()) : dayjs(found.timeCreated).to(dayjs(found.wakeUpTime),true) + ' later' - till.setAttribute('title', dayjs(found.wakeUpTime).format(`${getHourFormat()} on dddd, DD MMM YYYY`)) + till.setAttribute('title', dayjs(found.wakeUpTime).format(`${getHourFormat(true)} on dddd, DD MMM YYYY`)) var tabList = document.querySelector('.tab-list'); found.tabs.forEach((t, i) => { var iconImg = Object.assign(document.createElement('img'), {src: getFaviconUrl(t.url)}); diff --git a/styles/popup.css b/styles/popup.css index c0cc63b..ac7b40a 100644 --- a/styles/popup.css +++ b/styles/popup.css @@ -273,14 +273,14 @@ h3 { position: relative; } -.choice.focused select { +.choice.focused select, select:focus:hover, .choice:focus-visible select { background-image: url("data:image/svg+xml;utf8,"); } body.dark .choice .date { color: #AAA; } -.choice:hover *, .choice.focused *, .choice:hover .date, .custom-choice:hover *, .custom-choice.focused *, .custom-choice.really-focused { +.choice:hover *, .choice.focused *, .choice:hover .date, .custom-choice:hover *, .custom-choice.focused *, .custom-choice.really-focused, .choice:focus-visible *, .custom-choice:focus-visible * { color: #FFF !important; } @@ -332,13 +332,17 @@ body.dark .choice .date { opacity: 0.2; } -.choice.focused, .custom-choice.focused, .custom-choice.really-focused { +.choice.focused, .choice:focus-visible, .choice:focus-within:hover, .custom-choice.focused, .custom-choice:focus-visible, .custom-choice.really-focused { background-color: var(--bg) !important; } .choice.focused, .custom-choice.focused { transition: background-color 0s linear; cursor: default; } +.choice select:focus:hover { + color: var(--color); + background-color: rgba(0,0,0,.5); +} body.dark #preview, body.dark .choice, body.dark .custom-choice, body.dark .form-overlay { background-color: #444 diff --git a/styles/settings.css b/styles/settings.css index 7ea26be..11bc4ca 100644 --- a/styles/settings.css +++ b/styles/settings.css @@ -69,6 +69,10 @@ option { color: var(--color); background-color: var(--bg-color); } +select:focus:hover { + color: var(--color); + background-color: rgba(0,0,0,.5); +} .select-wrapper, .btn { position: relative; cursor: pointer; @@ -132,7 +136,7 @@ span.am-pm { font-size: .8em; margin-left: .5rem; } -body.dark select { +body.dark select, select:focus:hover, select:focus-visible { background-image: url("data:image/svg+xml;utf8,"); } #right-click .btn div:before { @@ -229,7 +233,7 @@ kbd { code { cursor: pointer; font-size: 1.2em; - background-color: #999; + background-color: rgba(0, 0, 0, .3); border-radius: .25em; padding: .1em .2em; user-select: none;