TetteLib

A library containing several functions i use often in my other scripts

Este script não deve ser instalado diretamente. Este script é uma biblioteca de outros scripts para incluir com o diretório meta // @require https://update.greasyfork.dpdns.org/scripts/478390/1550902/TetteLib.js

Autor
TetteDev
Versão
0.7
Criado
27/10/2023
Atualizado
10/03/2025
Tamanho
12,8 KB
Licença
N/A
  • assert: Basic assert function that checks up on a condition, and throws if it fails, mainly used for debugging
  • simulateNotification: shows a floating messagebox
  • showToast: a better looking version of 'simulateNotification
  • waitUntil: waits until a predicate returns true
  • waitForElement: spins indefinitely until an element is present on the page
  • waitForElementWithTimeout: spins indefinitely (or for a certain time) until an element is present on the page
  • traverseParentsUntil: loops all parents of an element until a provided function taking the parent returns true
  • waitForElementWithTimeoutExtended: similar to waitForElementWithTimeout but offer ability to get multiple elements returned, see code for comment
  • traverseChildrenUntil: same as traverseParentsUntil but for all children of an element
  • __visible: how jquery checks if an element is visible to the eye in the current document
  • removeAllEventListeners: removes all registered eventlisteners for an element (and its children if preserveChildrenEvents is set to false)
  • DoOnce: calls a function once even if the code is executed multiple times
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元