JavaScript Bookmarklet in Firefox

Load jQuery to the page

javascript:(function(e,s){e.src=s;e.onload=function(){jQuery.noConflict();console.log('jQuery%20injected')};document.head.appendChild(e);})(document.createElement('script'),'//code.jquery.com/jquery-latest.min.js')

Load D3.js to the page

javascript:(function(e,s){e.src=s;e.onload=function(){console.log('D3.js%20injected')};document.head.appendChild(e);})(document.createElement('script'),'https://d3js.org/d3.v4.min.js')

Show coments on the page

javascript:(function()%20{"use%20strict";/*%20Define%20styles%20and%20append%20them%20to%20the%20document%20*/var%20commentsStyle="#bookmarklet%20{position:%20absolute;width:%20100%;height:100%;top:%200;padding:%205%%2010%;background:%20black%20none%20repeat%20fixed%200%%200%;%20color:white;overflow:%20scroll;z-index:%20100000;}%20#bookmarklet%20h2%20{color:%20#ccb404;margin:%200%200%201.4375rem;font-size:%202.75rem;line-height:%201.27;padding:%200;font-family:%20Ubuntu,%20Arial,%20sans-serif;font-variant:%20small-caps;}#bookmarklet%20li%20{padding:%207px%200;}#bookmarklet%20ol%20{list-style-type:%20decimal%20!important;}";%20var%20link%20=%20document.createElement("link");%20link.rel%20=%20"stylesheet";%20link.href%20=%20"data:text/css,"%20+%20encodeURIComponent(commentsStyle);%20/*%20Append%20to%20head%20*/document.getElementsByTagName("head")[0].appendChild(link);var%20parent%20=%20document.body;/*%20A%20div%20to%20hold%20a%20list%20of%20comments%20*/var%20commentsDiv%20=%20document.createElement("div");commentsDiv.id%20=%20"bookmarklet";parent.appendChild(commentsDiv);/*%20Add%20the%20title%20*/var%20title%20=%20document.createElement("h2");title.innerHTML%20=%20"Comments";commentsDiv.style.padding%20=%20"10%";commentsDiv.appendChild(title);/*%20Add%20an%20ordered%20list%20tag%20*/var%20commentsOl%20=%20document.createElement("ol");commentsOl.setAttribute("type",%20"1");commentsDiv.appendChild(commentsOl);/*%20Get%20all%20HTML%20comments%20on%20the%20current%20page%20*/function%20getAllComments()%20{%20%20%20%20var%20comments%20=%20[];%20%20%20%20var%20recurse%20=%20function%20(el)%20{%20%20%20%20/*%20If%20node%20is%20a%20comment,%20save%20it%20in%20comments%20array%20*/%20%20%20%20%20%20%20%20%20%20%20%20if%20(el.nodeType%20==%20Node.COMMENT_NODE)%20{%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20comments.push(el);%20%20%20%20%20%20%20%20%20%20%20%20};%20%20%20%20/*%20If%20node%20has%20children,%20chek%20if%20there%20are%20any%20comments%20among%20them%20*/%20%20%20%20%20%20%20%20%20%20%20%20if%20(el.childNodes%20&&%20el.childNodes.length)%20{%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20for%20(var%20i%20=%200;%20i%20<%20el.childNodes.length;%20i++)%20{%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20recurse(el.childNodes[i]);%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20};%20%20%20%20%20%20%20%20%20%20%20%20};%20%20%20%20%20%20%20%20};%20%20%20%20recurse(document.getElementsByTagName("html")[0]);%20%20%20%20return%20comments;};var%20comments%20=%20getAllComments();/*%20Display%20all%20comments%20*/for%20(var%20i%20=%200;%20i%20<%20comments.length;%20i++)%20{var%20listItem%20=%20document.createElement("li");listItem.innerHTML%20=%20comments[i].data;commentsOl.appendChild(listItem);}/*%20Remove%20all%20comments%20on%20click%20*/var%20theComments%20=%20document.getElementById("bookmarklet");document.addEventListener("click",%20function()%20{%20theComments.parentNode.removeChild(theComments)},%20false);})();