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