Skip to content

Instantly share code, notes, and snippets.

@paulmars
Created July 5, 2013 03:44
Show Gist options
  • Select an option

  • Save paulmars/5931491 to your computer and use it in GitHub Desktop.

Select an option

Save paulmars/5931491 to your computer and use it in GitHub Desktop.
Responsive bookmarklets
javascript:document.write(%27<!DOCTYPE html><html><head><meta charset%3D"utf-8"><title>Responsive Design Testing</title><style>body %7B margin: 20px%3B font-family: sans-serif%3B overflow-x: scroll%3B %7D.wrapper %7B width: 6000px%3B %7D.frame %7B float: left%3B %7Dh2 %7B margin: 0 0 5px 0%3B %7Diframe %7B margin: 0 20px 20px 0%3B border: 1px solid %23666%3B %7D</style></head><body><div class%3D"wrapper"><div class%3D"frame"><h2>320<span> x 480</span> <small>(mobile)</small></h2><iframe src%3D"%27 %2B window.location %2B %27" sandbox%3D"allow-scripts allow-same-origin allow-forms" seamless width%3D"320" height%3D"480"></iframe></div><div class%3D"frame"><h2>480<span> x 640</span> <small>(small tablet)</small></h2><iframe src%3D"%27 %2B window.location %2B %27" sandbox%3D"allow-scripts allow-same-origin allow-forms" seamless width%3D"480" height%3D"640"></iframe></div><div class%3D"frame"><h2>768<span> x 1024</span> <small>(tablet - portrait)</small></h2><iframe src%3D"%27 %2B window.location %2B %27" sandbox%3D"allow-scripts allow-same-origin allow-forms" seamless width%3D"768" height%3D"1024"></iframe></div><div class%3D"frame"><h2>1024<span> x 768</span> <small>(tablet - landscape)</small></h2><iframe src%3D"%27 %2B window.location %2B %27" sandbox%3D"allow-scripts allow-same-origin allow-forms" seamless width%3D"1024" height%3D"768"></iframe></div><div class%3D"frame"><h2>1200<span> x 800</span> <small>(desktop)</small></h2><iframe src%3D"%27 %2B window.location %2B %27" sandbox%3D"allow-scripts allow-same-origin allow-forms" seamless width%3D"1200" height%3D"800"></iframe></div></div></body></html>%27)
@paulmars
Copy link
Copy Markdown
Author

paulmars commented Jul 5, 2013

Based of the excellent work here:
http://www.benjaminkeen.com/open-source-projects/smaller-projects/responsive-design-bookmarklet/

Added "allow scripts" because all my pages are JS now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment