Greasy Fork is available in English.

mutation-observer

Simple wrapper for using DOM mutation events

이 스크립트는 직접 설치해서 쓰는 게 아닙니다. 다른 스크립트가 메타 명령 // @require https://update.greasyfork.org/scripts/7602/32979/mutation-observer.js(으)로 포함하여 쓰는 라이브러리입니다.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
개발자
spiralx
버전
0.1.0
생성
2015-01-22
갱신
2015-01-22
라이선스
없음

mutation-summary

Library based on DOM Mutation Observers which allows triggering of events on the following conditions:

  • a node is added to the document
  • a node is removed from the document
  • the content of a node is changed
  • an attribute of the node is changed

This library simplifies the process of setting up and using mutation observers e.g.

function updateWidgets(summaries) {
  var widgetSummary = summaries[0];
  widgetSummary.added.forEach(buildNewWidget);
  widgetSummary.removed.forEach(cleanupExistingWidget);
}

var observer = new MutationSummary({
  callback: updateWidgets,
  queries: [{
    element: '[data-widget]'
  }]
});