Guest User

Untitled

a guest
Oct 16th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <title>Foo</title>
  3. <div style=white-space:pre>
  4. <i>foo bar lorem ipsum</i>
  5. <i>foo bar lorem ipsum</i>
  6. <i>foo bar lorem ipsum</i>
  7. <i>foo bar lorem ipsum</i>
  8. <i>foo bar lorem ipsum</i>
  9. <i>foo bar lorem ipsum</i>
  10. </div>​
  11. <script>
  12. Element.prototype.css=function(a,i,n){for(n in''+a===a||a)this.style[n]=a[n];return i||n?(this.style[a]=i,this):getComputedStyle(this)[a]};
  13.  
  14. Object.getOwnPropertyNames(Element.prototype).forEach(function(a){
  15.  
  16. NodeList.prototype[a]=function(){for(var n in this)this[n][a].apply(this[n],arguments)}
  17. });
  18.  
  19. Object.getOwnPropertyNames(NodeList.prototype).forEach(function(a){
  20.  
  21. String.prototype[a]=function(){document.querySelectorAll(this)[a].apply(document.querySelectorAll(this),arguments)}
  22. });
  23.  
  24. "div>i".css({color:"red"})
  25. </script>
Add Comment
Please, Sign In to add comment