Created
August 16, 2012 04:56
-
-
Save quezo/3367053 to your computer and use it in GitHub Desktop.
This bookmarklet lets you grab code from tutorials all over the internet and play with them on CodePen. Drag the Codepen box to your toolbar and visit a tutorial. When you click the bookmarklet, it'll highlight all the code examples on the web page.
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
<h1>Code Pen Bookmarklet</h1> | |
<p>Drag the box below to your bookmarks toolbar. Then click it when browsing around the internet and find some code you want to play with. You'll be able to select the blocks of code you want by clicking on them and then easily bring them over to CodePen to play!</p> | |
<div class="bk-highlight"> | |
<a class="bookmarklet" href="">CodePen</a> | |
</div> |
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
var bkjs = "javascript:function __cp(){var h=document,g=h.createElement("script"),c=h.location,a=h.body;try{if(!a){throw (0)}g.setAttribute('src',c.protocol+'//assets.codepen.io/assets/bk/bk.js?t='+(new Date().getTime()));a.appendChild(g)}catch(f){alert('Try again when the page loads.')}}__cp();void (0);"; | |
$('a').attr('href', encodeURI(bkjs)); |
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
@import "compass"; | |
body { | |
color: white; | |
background-color: #222222; | |
font-family: Arial; | |
} | |
h1, h2, h3 { | |
font-family: "HelveticaNeue-CondensedBold", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; | |
} | |
.bk-highlight { | |
padding: 15px; | |
} | |
div.bk-highlight a { | |
font-size: 24px; | |
line-height: 110%; | |
color: white; | |
text-decoration: none; | |
padding: 15px; | |
border: 4px solid #76DAFF; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment