Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. // ==UserScript==
  2. // @name slashers Helper
  3. // @namespace edited ls
  4. // @include http://ladderslasher.d2jsp.org/v1.30/
  5. // @version 2.0
  6. // @grant none
  7. // ==/UserScript==
  8.  
  9.  
  10.  
  11. function addGlobalStyle(css) {var head;var style;
  12. head = document.getElementsByTagName('head') [0];
  13. if (!head) {return;}
  14. style = document.createElement('style');
  15. style.type = 'text/css';
  16. style.innerHTML = css;
  17. head.appendChild(style);}
  18.  
  19. addGlobalStyle('.itemBoxRight { display:none; border:1px solid red}');
  20. addGlobalStyle('.cataArrowControls svg {width:0px; height:0px; position:absolute; opacity:.2; cursor:pointer }');
  21.  
  22. unsafeWindow.setInvTab = (function(fCache){return function(e){fCache.apply(this, [0]);}}(unsafeWindow.setInvTab));
  23. unsafeWindow.showLake = function () {new CSkill(Skill.FISHING);};
  24. unsafeWindow.dTDmg = function (e, t, s, a, o, r, i)
  25. {var n = CEd("div", e, "pa targetDmgBox", {left: (r && r.x < t ? r.x : t) + "px",top: (r && r.y < s ? r.y : s) + "px"}),l = SVG(n, 0, 0, 1, 1);
  26. n.label = CTD(n, a, "pa targetDmg" + (o ? " " + o : ""), {left: (r && r.x < t ? t - r.x : 0) + 4 + "px",top: (r && r.y < s ? s - r.y : 0) + 2 + "px"});
  27. var c = n.label.offsetHeight + 4,u = n.label.offsetWidth + 8,p = u,d = c;
  28. if (r) { p += Math.abs(t - r.x), d += Math.abs(s - r.y), l.setAttribute("viewBox", (r.x < t ? r.x - t : 0) + " " + (r.y < s ? r.y - s : 0) + " " + p + " " + d)}
  29. l.style.width = p + "px", l.style.height = d + "px", i && (n.icon = CI(n, "svg/" + i + ".svg", (r && r.x > t ? r.x - t : 0) - 8, (r && r.y > s ? r.y - s : 0) - 8, 16, 16));var m = 1;
  30. return n.alp = new njTween(n, "opacity", null, 1.5, 0, m, function(e) {e.parentNode && e.parentNode.removeChild(e)}), n};
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement