forked from stowball/Viewport-Genie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookmarklet.html
47 lines (44 loc) · 2.24 KB
/
bookmarklet.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Viewport Genie Bookmarklet</title>
<style>
body {
font-family: sans-serif;
}
a[href*="javascript"] {
background: #999;
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxsaW5lYXJHcmFkaWVudCBpZD0iZzIyOSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiIHgxPSIwJSIgeTE9IjAlIiB4Mj0iMCUiIHkyPSIxMDAlIj48c3RvcCBzdG9wLWNvbG9yPSIjY2NjY2NjIiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjOTk5OTk5IiBvZmZzZXQ9IjEiLz48L2xpbmVhckdyYWRpZW50PjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZzIyOSkiIC8+PC9zdmc+);
background: -ms-linear-gradient(top, #ccc 0%, #999 100%);
background: -moz-linear-gradient(top, #ccc 0%, #999 100%);
background: -o-linear-gradient(top, #ccc 0%, #999 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ccc), color-stop(100%, #999));
background: -webkit-linear-gradient(top, #ccc 0%, #999 100%);
background: linear-gradient(top, #ccc 0%, #999 100%);
border: 1px solid #666;
-webkit-border-radius: 5px;
border-radius: 5px;
color: #fff;
font-size: 25px;
font-weight: bold;
display: inline-block;
padding: 15px 22px;
text-decoration: none;
}
p:last-of-type a {
color: #666;
font-size: 12px;
}
</style>
</head>
<body>
<h1>Viewport Genie Bookmarklet</h1>
<h3>Adds the "real" viewport width and height (in px and em) as an element on the body to help with obtaining values for responsive breakpoints</h3>
<p>Use it in conjunction with <a href="https://github.com/stowball/mqGenie">mqGenie</a> to trigger the correct breakpoints in non-WebKit browsers.</p>
<p>Drag the Viewport Genie button to your bookmarks bar</p>
<p><a href="javascript:(function(){var script=document.createElement('SCRIPT');script.src='https://github.com/stowball/Viewport-Genie/raw/master/viewport.genie.bookmarklet.min.js';document.body.appendChild(script);})()">Viewport Genie</a></p>
<p><a href="https://github.com/stowball/Viewport-Genie">Also available as a JavaScript plugin</a></p>
<p><a href="https://github.com/stowball/Viewport-Genie">Get the source on GitHub</a></p>
</body>
</html>