Advertisement
fagci

Epsilon notes markdown extra fixed

Oct 14th, 2018
377
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. var regex = /<(\w+)\s*(.*)>([^{>]*)\{\.([^}]+)\}(.*)/g,
  2. body = document.body,
  3. html = body.innerHTML,
  4. repl = '<$1 $2 class="$4">$3 $5';
  5. body.innerHTML = html.replace(regex, repl);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement