The fun part of user scripting is deciding what happens. The boring part is scavenging the DOM for bits of templated data, or elements you want to mod.
Have on.js do it for you!
The fun part of user scripting is deciding what happens. The boring part is scavenging the DOM for bits of templated data, or elements you want to mod.
Have on.js do it for you!
| // http://www.html5rocks.com/en/tutorials/file/dndfiles/ | |
| d3.select('svg') | |
| .on('dragover', handleDragOver) | |
| .on('drop', handleFileSelect) | |
| ; | |
| function handleFileSelect() { | |
| var event = d3.event | |
| , files = event.dataTransfer.files // FileList object | |
| , about = [] |
| <html> | |
| <head> | |
| <title>{Title}{block:SearchPage} ({lang:Search results for SearchQuery}){/block:SearchPage}{block:PermalinkPage}{block:PostSummary} — {PostSummary}{/block:PostSummary}{/block:PermalinkPage}</title> | |
| <meta charset="utf-8"> | |
| <meta name="description" content="{block:IndexPage}{block:Description}{MetaDescription}{/block:Description}{/block:IndexPage}{block:PermalinkPage}{block:PostSummary}{PostSummary}{/block:PostSummary}{/block:PermalinkPage}" /> | |
| <meta name="color:Accent" content="#4EA3D0"/> | |
| <meta name="font:Body" content="'Helvetica Neue', Helvetica, Arial, sans-serif"/> | |
| <meta name="if:Two column posts" content="1"/> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.layout.js"></script> | |
| <script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script> | |
| <style type="text/css"> | |
| .link { stroke: #ccc; } | |
| .nodetext { pointer-events: none; font: 10px sans-serif; } | |
| </style> |
| # request one at http://api.census.gov/data/key_signup.html and paste it below | |
| CENSUS_API_KEY=YOUR_CODE_HERE | |
| # a factor 1609.34 squared | |
| SQ_M_TO_SQ_MI=2589975.2356 | |
| #prereqs: | |
| # npm install -g shapefile # 0.6.1 | |
| # npm install -g d3-geo-projection # 1.2.1 | |
| # npm install -g ndjson-cli # 0.3.0 |
Click "raw" below to install. Requires Google Chrome, Firefox + Greasemonkey, or some other browser supporting user scripts / content scripts / user javascript.
Facebook US' recognized holidays are: