Advertisement
m4w4n

Plug2

Oct 25th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. <b:if cond='data:blog.pageType == &quot;item&quot;'>
  2. <script type='text/javascript'>var flagItem = 0;</script>
  3. </b:if>
  4. <b:if cond='data:blog.pageType == &quot;static_page&quot;'>
  5. <script type='text/javascript'>var flagItem = 1;</script>
  6. </b:if>
  7. <script type='text/javascript'>
  8.  
  9. var indexa = &#39;<data:top.id/>&#39;;
  10. var indexb = &#39;<data:post.id/>&#39;;
  11. //<![CDATA[
  12.  
  13. flagItem="0"==flagItem?"&postID=":"&pageID=";
  14.  
  15. function replyOriginal() {
  16.  
  17. var b = document.getElementById("comment-editor").getAttribute("src"), a = b.indexOf("#"), b = b.substring(a), a = document.getElementById("comment-editor");
  18.  
  19. a.parentNode.removeChild(a);
  20. a = document.getElementById("replypost");
  21. a.parentNode.removeChild(a);
  22.  
  23. b = "http://www.blogger.com/comment-iframe.g?blogID=" + (indexa + flagItem + indexb + b) + "";
  24. a = document.createElement("iframe");
  25. a.setAttribute("id", "comment-editor");
  26. a.setAttribute("name", "comment-editor");
  27. a.setAttribute("src", b);
  28. a.setAttribute("height", "250px");
  29. a.setAttribute("width", "100%");
  30. a.setAttribute("frameBorder", "0");
  31. a.setAttribute("allowtransparency", "true");
  32. document.getElementById("comment-form-thread").appendChild(a)
  33. }
  34. function reply(b) {
  35. var a = document.getElementById("comment-editor").getAttribute("src"), c = a.indexOf("#"), a = a.substring(c), c = document.getElementById("comment-editor");
  36.  
  37. c.parentNode.removeChild(c);
  38.  
  39. a = "http://www.blogger.com/comment-iframe.g?blogID=" + (indexa + flagItem + indexb) + "&parentID=" + (b + a) + "";
  40. c = document.createElement("iframe");
  41. c.setAttribute("id", "comment-editor");
  42. c.setAttribute("name", "comment-editor");
  43. c.setAttribute("src", a);
  44. c.setAttribute("height", "250px");
  45. c.setAttribute("width", "100%");
  46. c.setAttribute("frameBorder", "0");
  47. c.setAttribute("allowtransparency", "true");
  48. document.getElementById("contenedorreply-" + b + "").appendChild(c);
  49.  
  50. document.getElementById("replypost") || (b = document.createElement("a"), b.innerHTML = "Add a comment", b.setAttribute("id", "replypost"), b.setAttribute("href", "javascript:void(0)"), b.setAttribute("class", "LoadMore"), document.getElementById("comment-form-thread").appendChild(b));
  51. var clickOn = document.getElementById("replypost");
  52. clickOn.addEventListener ? clickOn.addEventListener("click", replyOriginal, !1) : clickOn.attachEvent("onclick", replyOriginal);
  53. }
  54. //]]>
  55. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement