Merge branch 'staging' into smol-tag-improvements

This commit is contained in:
Cohee
2024-06-16 16:04:37 +03:00
65 changed files with 2907 additions and 1969 deletions

View File

@ -306,6 +306,9 @@ export function throttle(func, limit = 300) {
* @returns {boolean} True if the element is in the viewport, false otherwise.
*/
export function isElementInViewport(el) {
if (!el) {
return false;
}
if (typeof jQuery === 'function' && el instanceof jQuery) {
el = el[0];
}