Created
August 20, 2011 13:54
-
-
Save johnhunter/1159133 to your computer and use it in GitHub Desktop.
These bookmarklets provide various search dialogs
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Bookmarklets</title> | |
<style> | |
body { | |
background: #eee; | |
} | |
div { | |
position: relative; | |
margin: 20px; | |
padding: 20px; | |
padding-bottom: 0; | |
border-radius: 10px; | |
background: #fff; | |
overflow: hidden; | |
max-width: 800px; | |
} | |
p { | |
margin: 0 0 1.5em 170px; | |
line-height: 1.4; | |
color: #666; | |
} | |
a { | |
float: left; | |
padding: 7px 10px; | |
border: 1px solid #888; | |
border-radius: 4px; | |
text-decoration: none; | |
color: #333; | |
background: #eee; | |
min-width: 130px; | |
text-align: center; | |
} | |
a:hover, | |
a:active { | |
box-shadow: 0 0 5px #fcc; | |
} | |
a:hover:after { | |
content: ' Drag this to your bookmarks '; | |
position: absolute; | |
top: 3px; | |
left: 180px; | |
padding: 10px; | |
border-radius: 8px; | |
background: #222; | |
opacity: 0.7; | |
color: #eee; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<a href="javascript:(function(t){t=prompt('enter%20a%20jQuery%20term');if(t)window.open('http://api.jquery.com/?s='+encodeURIComponent(t))})()">jQuery API...</a> | |
<p>Opens a dialog to search the jquery API documentation. Results open in a new window.</p> | |
</div> | |
<div> | |
<a href="javascript:(function(t){t=prompt('enter%20a%20Javascript%20term');if(t)window.open('http://www.google.com/search?q='+encodeURIComponent(t)+'+site%3Ahttps%3A%2F%2Fdeveloper.mozilla.org%2Fen%2FJavaScript%2FReference%2FGlobal_Objects%2F')})()">JS lookup...</a> | |
<p>Opens a dialog to search the Mozilla MDN Javascript reference. This is the best on-line Javascript resource but their search is terrible | |
and the site is difficult to find your way around. It uses Google to search just the core Javascript docs which gives more | |
focused answers, it doesn't include the DOM reference. Results open in a new window.</p> | |
</div> | |
<div> | |
<a href="javascript:(function(t){t=prompt('enter%20a%20css%20term');if(t)window.open('http://search.sitepoint.com/?q=css%2B'+encodeURIComponent(t)+'&refinements[reference]=1#results')})()">CSS lookup..</a> | |
<p>Opens a dialog to search the Sitepoint CSS reference site. Results open in a new window.</p> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment