mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into smol-tag-improvements
This commit is contained in:
@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user