mirror of
https://github.com/makeplane/plane.git
synced 2026-06-13 19:19:54 +00:00
2ca8620246
* Add github action to codespell preview on push and PRs
* Add rudimentary codespell config
* [DATALAD RUNCMD] chore: run codespell throughout fixing a few typos interactively
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w -i 3 -C 4 ./apps/web/core/components/workspace/delete-workspace-form.tsx ./deployments/cli/community/README.md",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
* Adjust coespell regex to ignore all camelCased words
* [DATALAD RUNCMD] chore: run codespell throughout fixing a few new typos automagically
=== Do not change lines below ===
{
"chain": [],
"cmd": "codespell -w",
"exit": 0,
"extra_inputs": [],
"inputs": [],
"outputs": [],
"pwd": "."
}
^^^ Do not change lines above ^^^
25 lines
588 B
TypeScript
25 lines
588 B
TypeScript
if (typeof window !== "undefined" && window) {
|
|
// Add request callback polyfill to browser in case it does not exist
|
|
window.requestIdleCallback =
|
|
window.requestIdleCallback ??
|
|
function (cb) {
|
|
const start = Date.now();
|
|
return setTimeout(function () {
|
|
cb({
|
|
didTimeout: false,
|
|
timeRemaining: function () {
|
|
return Math.max(0, 50 - (Date.now() - start));
|
|
},
|
|
});
|
|
}, 1);
|
|
};
|
|
|
|
window.cancelIdleCallback =
|
|
window.cancelIdleCallback ??
|
|
function (id) {
|
|
clearTimeout(id);
|
|
};
|
|
}
|
|
|
|
export {};
|