Advertisement
EstherMoellman

Untitled

Jun 15th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <bindings id="generalBindings"
  3. xmlns="http://www.mozilla.org/xbl"
  4. xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  5. xmlns:xbl="http://www.mozilla.org/xbl">
  6. <binding id="ucjs">
  7. <implementation>
  8. <constructor><![CDATA[
  9. (function(e){
  10. let checkbox = document.createElement("input");
  11. checkbox.setAttribute("type","checkbox");
  12. checkbox.addEventListener("click",function(){
  13. if(this.hasAttribute("checked")){
  14. this.removeAttribute("checked",true);
  15. }else{
  16. this.setAttribute("checked",true);
  17. }
  18. });
  19. checkbox.id="statechecker-" + e.id;
  20. checkbox.className = "statecheck-check";
  21. e.insertBefore(checkbox,e.firstChild);
  22. })(this);
  23. ]]></constructor>
  24. </implementation>
  25. </binding>
  26. </bindings>
  27. </implementation>
  28. </binding>
  29. </bindings>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement