Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. function forAll(xpath, root, f) {
  2. var result = document.evaluate(xpath, root != null ? root : document.documentElement, null,
  3. XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
  4. for (var i=0; i<result.snapshotLength; i++) {
  5. var n = result.snapshotItem(i);
  6. f(n);
  7. }
  8. }
  9.  
  10. if (window.location.href.endsWith('forum') || window.location.href.contains('team')) {
  11. $('#chat-messages').css('max-height', '800px');
  12. } else if (window.location.href.contains('fight')) {
  13. $('#logs').css({
  14. 'text-align': 'left',
  15. 'background-color': 'rgba(60,60,60, 0.7)',
  16. 'font-size': '10px',
  17. });
  18. $('#logs-wrapper').css({
  19. 'height': '1000px',
  20. 'width': '1000px',
  21. });
  22. }
  23. if (window.location.href.contains('forum')) {
  24. var f = function(){
  25. forAll("//div[@author='13509']", null, function(elt) { // Evenkore
  26. elt.style.color = "#dddddd";
  27. elt.style.fontSize = "9px";
  28. });
  29. forAll("//div[@author='8148']", null, function(elt) { // srax
  30. elt.innerHTML = elt.innerHTML.replace(/ sencer /, ' censé ');
  31. });
  32. };
  33. setInterval(f, 1000);
  34. }
  35. { // logo + header
  36. var elt = document.getElementById('logo');
  37. elt.parentNode.removeChild(elt);
  38. $('#header').css('height', '0');
  39. }
  40. { // footer
  41. var elt = document.getElementById('footer');
  42. elt.parentNode.removeChild(elt);
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement