July 10, 201214 yr For a while I've wanted to view website source code whilst on my iPad away from the computer, I found this little bit of code, all you have to do is press the pre created bookmark when on the page you want and your done. I've found it quite handy so I thought I would share. javascript:(function(){var a=window.open('about:blank').document;a.write('<!DOCTYPE html><html><head><title>Source of '+location.href+'</title><meta name="viewport" content="width=device-width" /></head><body></body></html>');a.close();var b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))})(); Just create a bookmark, press edit and add the above code into the URL section. It also works on iPhones etc. Original article is Here
July 10, 201214 yr Been using this for a while if I'm out and quickly need to check something. Only real issue is you can't copy and paste from the source.
July 10, 201214 yr Author Yep, that's the only problem I have found as well. I'm sure there's a fix somewhere, but it is still really useful
Create an account or sign in to comment