Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (() => {
  2.     let f = () => {
  3.         Array.prototype.slice.call(document.querySelectorAll('*'))
  4.             .filter(_ => !_.childElementCount && _.innerText)
  5.         .forEach(_ =>  _.innerText = 'xxx' + _.innerText);
  6.     o.takeRecords();
  7.     };
  8.     let o = new MutationObserver(f);
  9.     o.observe(document,({ characterData: true, subtree: true }))
  10.     f();
  11. })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement