show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener( | |
"input", | |
function (e) { | |
e = e || window.event; | |
const target = e.target || e.srcElement; | |
const isFarsi = /^[\u0600-\u06FF\s]+$/.test(target.value.split(" ")[0]); | |
const hasDirection = target.style.cssText.includes("direction"); | |
if ( | |
!(target.style.direction == "rtl") && |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: | |
// Replace React.lazy(() => import('x')); | |
// with retryDynamicImport(() => import('x')); | |
import { ComponentType, lazy } from 'react'; | |
const MAX_RETRY_COUNT = 15; | |
const RETRY_DELAY_MS = 500; | |
// Regex to extract the module URL from the import statement |