{"id":180,"date":"2012-10-25T17:41:01","date_gmt":"2012-10-25T05:41:01","guid":{"rendered":"http:\/\/site.stecman.ath.cx\/?p=180"},"modified":"2013-10-14T22:12:22","modified_gmt":"2013-10-14T10:12:22","slug":"javascript-for-everyday-scripting","status":"publish","type":"post","link":"\/blog\/2012\/10\/javascript-for-everyday-scripting","title":{"rendered":"JavaScript for everyday scripting"},"content":{"rendered":"

Though JavaScript tends to cop a lot of flak, I find it’s actually a pretty useful thing to know. No matter how much you may dislike JavaScript, the fact is that it’s part of almost every web browser since 1996, and it’s the only major, cross-browser client-side scripting option for the web (though Dart<\/a> is looking to join that rank). While I fully agree that writing large systems in JavaScript can be a pain, I can’t say the same thing about what’s in the name: scripting. I’m not talking about scripting in the sense of writing small programs, rather scripting the way you operate a command line; short, contextual snippets of code to get stuff done<\/strong>.<\/p>\n

Every now and then, I find myself popping open the JavaScript console in Google Chrome and writing a few lines of JavaScript to accelerate something I’m doing. While situations that warrant this are rare, there have been a few occasions where the JavaScript console has saved me huge amounts of menial clicking labour. It’s arguable that if you have to write code to do something on the web, then the creator(s) of the page you’re battling with didn’t do a good enough job. In reality however, most of the things I’ve accomplished with the JavaScript console have been far outside the scope of what the target pages were intended to do. So much to the point that only once have I used the JavaScript console to work around a real usability issue.<\/p>\n

Essentially, this all boils down to the fact that the data on every page is right there in your web browser, and in a highly accessible form at that. Why waste time doing things manually when you can automate?! It’s exactly the reason projects like Greasemonkey<\/a> exist.<\/p>\n

Here’s a list for you to ponder:<\/p>\n