View Source Bookmarklet for iPhone

var sourceWindow = window.open("about:blank"); var newDoc = sourceWindow.document; newDoc.open(); newDoc.write("<html><head><title>Source of " + document.location.href + "</title><meta name=\"viewport\" id=\"viewport\" content=\"initial-scale=1.0;" + "user-scalable=0; maximum-scale=0.6667; width=480\"/><script>function do_onload()" + "{setTimeout(function(){window.scrollTo(0,1);},100);}if(navigator.userAgent.indexOf" + "(\"iPhone\")!=-1)window.onload=do_onload;</script></head><body></body></html>");

From Evernote:

View Source Bookmarklet

Clipped from: http://www.iphonewebdev.com/examples/
var sourceWindow = window.open("about:blank");var newDoc = sourceWindow.document; newDoc.open(); newDoc.write("<html><head><title>Source of " +document.location.href + "</title><meta name=\"viewport\" id=\"viewport\" content=\"initial-scale=1.0;" + "user-scalable=0; maximum-scale=0.6667; width=480\"/><script>function do_onload()" +"{setTimeout(function(){window.scrollTo(0,1);},100);}if(navigator.userAgent.indexOf"+ "(\"iPhone\")!=-1)window.onload=do_onload;</script></head><body></body></html>"); 
Post a Comment