A browser bookmarklet to view videos on msnbc.com

Aug 21, '06 07:30:04AM

Contributed by: MacFiend

MSNBC offers many videos on their site, but hide them behind code that restricts their viewing to users of Internet Explorer 6 and Windows Media Player 10, both of which are Windows only. Thanks to Flip4Mac, Flip4Mac forum member andgarden, and especially to a Javascript guru that goes by the name of Void, Mac users can now watch these videos in Safari or Firefox. Create a new blank bookmark entry, and name it MSNBC video fix (or whatever you like). For the URL portion of the bookmark, copy and paste the following code:

javascript:(function(){var%20as%20=%20document.getElementsByTagName('a');for%20(var%20i%20=%200;i%20%3C%20as.length;%20i++)%20{if%20(as[i].href.substring(0,19)=='javascript:msnvDwd(')%20{var%20b%20=%20as[i].href;var%20temp%20=%20new%20Array();temp%20=%20b.split(%22'%22);as[i].href='http://msnbc.msn.com/default.cdnx/id/'+temp[15]+'/displaymode/1157';}}})();

Now whenever you're surfing MSNBC.com and see a link to a video that you'd like to watch, click or choose the bookmarklet you created above. The video URL(s) will then point directly to a file or files that Flip4Mac can play.

[robg adds: First, sorry for the use of the horizontal scrolling box, but it seemed the best way to make sure the code was presented properly. The easiest way to copy and paste it is to triple-click within the box, then press Command-C. Second, I was only able to make this work in Safari, not Camino or Firefox -- note that this may be an issue on my end. Finally, to actually use the bookmarklet, just load the page containing the videos, click the bookmarklet, then click the video you're interested in watching.]

Comments (26)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20060812234922750