Safari Bookmarklet - accessing DOM
Safari requires that a literal percent sign in a URL (%) be URL-encoded in a bookmarklet (%25...while it looks like that's just 25 added, the percent sign followed by two numbers is decoded to a literal percent sign). Also, the property is .style.width, not just .width.

Change your bookmarklet to this:

javascript:document.getElementsByTagName("body")[0].style.width='50%25';


I've confirmed this works in Safari v8.0.6 (OS X 10.10.3).