Greasy Fork镜像 is available in English.

Simple WaitForKeyElement

Library that Exports my simplified vanilla JS version of WaitForKeyElement, which is a simple async function that returns a Promise that resolves to an element by a given selector, when that element is found

اعتبارا من 01-10-2024. شاهد أحدث إصدار.

لا ينبغي أن لا يتم تثبيت هذا السكريت مباشرة. هو مكتبة لسكبتات لتشمل مع التوجيه الفوقية // @require https://update.greasyforks.org/scripts/511024/1457631/Simple%20WaitForKeyElement.js

المؤلف
1N07
الإصدار
1.0.1
تم إنشاؤه
01-10-2024
تم تحديثه
01-10-2024
Size
956 Bytes
الترخيص
MIT

Library that Exports my simplified vanilla JS version of WaitForKeyElement

which is a simple async function that returns a Promise that resolves to an element by a given selector, when that element is found

Usage:

WaitForKeyElement(querySelectorString, optionalTimeoutInMilliseconds)

Example 1:

WaitForKeyElement('#someElement', 10000).then((foundElement) => {
  //do things with foundElement
});

Example 2:

//in async context*
const foundElement = await WaitForKeyElement('#someElement'));
//do things with foundElement
长期地址
遇到问题?请前往 GitHub 提 Issues。