Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Agreed.

I have one I use on my iPhone that shows page source. Comes in handy sometimes.

javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();



this is awesome! I've added the page title to the source:

   javascript:!function(){var e=window.open("","_blank");e.document.write("<!DOCTYPE html><html><head><title>Source of "+location.href+"</title><meta name='viewport' content='width=device-width, initial-scale=1.0'></head><body><pre></pre></body></html>"),e.document.body.querySelector("pre").textContent=document.documentElement.outerHTML,e.document.close()}();




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: