-
-
Save rhwy/418889 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Bookmarklet for viewing source in iPad Safari | |
*/ | |
javascript:(function(){ | |
var w = window.open('about:blank'), | |
s = w.document; | |
s.write('<!DOCTYPE html><html><head><title>Source of ' + location.href + '</title><meta name="viewport" content="width=720, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" /></head><body></body></html>'); | |
s.close(); | |
s.body.innerText = document.documentElement.innerHTML; | |
s.body.style.whiteSpace = 'pre-wrap'; | |
s.body.style.display = 'block'; | |
s.body.style.font = "normal normal normal 12px/normal Monaco, 'Courier New', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace"; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment