Skip to content

Instantly share code, notes, and snippets.

@elchininet
elchininet / custom-sidebar-plugin.js
Last active June 7, 2026 15:35
Custom Sidebar bundle with debug logs to debug what happens during restarts
!function(){"use strict";function e(e,t,n,i){return new(n||(n=Promise))((function(o,r){function s(e){try{c(i.next(e))}catch(e){r(e)}}function a(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const t=10,n=10,i=(e,i,o={})=>{var r;const{retries:s=t,delay:a=n,shouldReject:c=!0}=o,l=null!==(r=o.rejectMessage)&&void 0!==r?r:"Could not get the result after {{ retries }} retries";return new Promise(((t,n)=>{let o=0;const r=()=>{const d=e();i(d)?t(d):(o++,o<s?setTimeout(r,a):c?n(new Error(l.replace(/\{\{\s*retries\s*\}\}/g,`${s}`))):t(d))};r()}))};function o(e,t,n,i){return new(n||(n=Promise))((function(t,o){function r(e){try{a(i.next(e))}catch(e){o(e)}}function s(e){try{a(i.throw(e))}catch(e){o(e)}}function a(e){var i;e.done?t(e.value):(i=e.value,i instanceof n?i:new n((function(e){e(i)}))).then(r,s)}a((i=i.apply(e,[])).next())}))}"function"
@elchininet
elchininet / input.scss
Created December 30, 2023 11:45
Generated by SassMeister.com.
@function str-replace($string, $search, $replace: "") {
$index: str-index($string, $search);
@if $index {
@return str-slice($string, 1, $index - 1) + $replace + str-replace(str-slice($string, $index + str-length($search)), $search, $replace);
}
@return $string;
}
@elchininet
elchininet / kiosk-mode.js
Last active June 13, 2026 00:17
Compiled Kiosk-mode library with the latest code in master.
(function () {
'use strict';
function __rest(s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))