RT @kovanhuissteden: 🧵: Kalk strooien in verzuurd bos.
Het is volgens BBBoeren het beste medicijn voor bossen die verzuren door de neersla… 10 minutes ago
RT @kovanhuissteden: De veroorzakers van de schade - de grote stikstofuitstoters, de vlees, zuivel -en veevoergiganten zeker niet.
Nee da… 10 minutes ago
RT @caseofdees: Eén en al herkenning. Zelfs toen mijn vader stervend was, moest hij nog een indicatie-aanpassing voor de WLZ tekenen. Het h… 13 minutes ago
A while ago, I wanted to convert the dl delimited list htmlelement on a web page into a regular table so I could more easily reorder the data into cells.
So I ran the below bit of code in the Chrome Console after first putting the mentioned table with id here_table in the place where I wanted the table to be included:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
The content of the JQueryfibookmarklet is in the below gist:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
javascript:(function(){varel=document.createElement("div"),b=document.getElementsByTagName("body")[0],otherlib=!1,msg="";el.style.position="fixed",el.style.height="32px",el.style.width="220px",el.style.marginLeft="-110px",el.style.top="0",el.style.left="50%",el.style.padding="5px 10px",el.style.zIndex=1001,el.style.fontSize="12px",el.style.color="#222",el.style.backgroundColor="#f99";functionshowMsg(){vartxt=document.createTextNode(msg);el.appendChild(txt),b.appendChild(el),window.setTimeout(function(){txt=null,typeofjQuery=="undefined"?b.removeChild(el):(jQuery(el).fadeOut("slow",function(){jQuery(this).remove()}),otherlib&&(window.$jq=jQuery.noConflict()))},2500)}if(typeofjQuery!="undefined")returnmsg="This page already using jQuery v"+jQuery.fn.jquery,showMsg();typeof$=="function"&&(otherlib=!0);functiongetScript(url,success){varscript=document.createElement("script");script.src=url;varhead=document.getElementsByTagName("head")[0],done=!1;script.onload=script.onreadystatechange=function(){!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")&&(done=!0,success(),script.onload=script.onreadystatechange=null,head.removeChild(script))},head.appendChild(script)}getScript("http://code.jquery.com/jquery.min.js",function(){returntypeofjQuery=="undefined"?msg="Sorry, but jQuery was not able to load":(msg="This page is now jQuerified with v"+jQuery.fn.jquery,otherlib&&(msg+=" and noConflict(). Use $jq(), not $().")),showMsg()})})();
browsers can have length restrictions (some around 500 characters) forcing you to put the actual script on-line as externalised bookmarklet (which won’t work on body-less pages)
you will have to encode special characters (and URI decode them before beautifying existing JavaScript bookmarklets)
Bl.ocks (pronounced “Blocks”) is a simple viewer for sharing code examples hosted on GitHub Gist.
…
The main source for your example is in index.html. This file can contain relative links to other files in your Gist, such as images, scripts or stylesheets. And of course you can use absolute links, such as CDN-hosted D3, jQuery or Leaflet. To explain your example, add a README.md written in Markdown. (You can omit the index.html if you just want to write, too.)
tl;dr: Finding event handlers registered using jQuery can be tricky. findHandlersJS makes finding them easy, all you need is the event type and a jQuery selector for the elements where the events might originate.