677Forcing a Boolean value in Javascript aka ‘The double negative trick’

return !!someValueThatisNotBooleanButShouldBe;
I first encountered it at Mark Pilgrim’sDive Into HTML5. Anyone else remembers his classic Kant Pro Generator from the olden days?

654Find Largest Number in Javascript

Nice way and fast way of finding the largest number in an array.
var arr = [1233, 32, 442];
var largest = Math.max.apply(Math, arr);
http://ejohn.org/blog/fast-javascript-maxmin/ http://stackoverflow.com/questions/1379553/how-might-i-find-the-largest-number-contained-in-a-javascript-array

652PHP Arrays to Javascript Objects via JSON

Moving PHP Associative Array (Dictionaries, whatever..) over for use in Javascript. In JS Associative Array are actually objects, so we might as well make it into one.
echo "var data =" . json_encode($somatic, JSON_FORCE_OBJECT) . ";

233Modifying Quicktags in WordPress

Open:
/wp-includes/js/quicktags.js
Change/Add/Delete tags to your likening.

195UIWebView, Changing filenames with Javascript

Calling JS from webViewDidFinishLoading, modifying paths to local. Before that all the images had to be stored into the local path. http://iphoneincubator.com/blog/windows-views/uiwebview-dynamically-modify-html-documents Interesting direction, but still looking for an elegant way to mix external sites (HTML) with local content (images, scripts…)

168Google Translate *New & Improved Bookmarklet

if (page == empty) go to Google Translate else Translate Current Page