watcher

Watch for added and removed elements and changes to attributes or text content

As of 13.07.2018. See ბოლო ვერსია.

ეს სკრიპტი არ უნდა იყოს პირდაპირ დაინსტალირებული. ეს ბიბლიოთეკაა, სხვა სკრიპტებისთვის უნდა ჩართეთ მეტა-დირექტივაში // @require https://update.greasyforks.org/scripts/370259/612451/watcher.js.

ავტორი
spiralx
ვერსია
0.0.1
შექმნილია
13.07.2018
განახლებულია
13.07.2018
Size
48,6 KB
ლიცენზია
პ/გ

watcher

Watch a page's DOM for added and removed elements and changes to attributes or text content.


const watcher = new Watcher()

const watch = watcher.add('a[href]', result => {
  console.group(`Added ${result.added.length} links, removed ${result.removed.length} links`)
  for (const a of result.added) {
    console.log(`Added: %o`, a)
  }
  for (const a of result.removed) {
    console.log(`Removed: %o`, a)
  }
  console.groupEnd()
})

watcher.start()

长期地址
遇到问题?请前往 GitHub 提 Issues。