Skip to content

Instantly share code, notes, and snippets.

@rockoo
Created August 19, 2015 09:15
Show Gist options
  • Save rockoo/3577031fdd2d42a9d8a3 to your computer and use it in GitHub Desktop.
Save rockoo/3577031fdd2d42a9d8a3 to your computer and use it in GitHub Desktop.
Bookmarklet example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Redactor Project</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="respond.js"></script>
<style type="text/css">
#linkto {
width: 300px;
padding: 10px;
text-align: center;
background-color: #337AB7;
overflow: hidden;
border-radius: 4px;
}
#linkto a {
font-weight: bold;
color: #fff;
}
</style>
</head>
<body>
<div class="clearfix">
<div id="linkto">
<a href="javascript:(function(){var head=document.getElementsByTagName(&quot;head&quot;)[0],link=document.createElement(&quot;link&quot;);link.rel=&quot;stylesheet&quot;,link.type=&quot;text/css&quot;,link.href=&quot;https://s3.amazonaws.com/redacted/redacted.css&quot;,link.media=&quot;all&quot;,head.appendChild(link),function(e,a,t,n,l,s,c){e.GoogleAnalyticsObject=l,e[l]=e[l]||function(){(e[l].q=e[l].q||[]).push(arguments)},e[l].l=1*new Date,s=a.createElement(t),c=a.getElementsByTagName(t)[0],s.async=1,s.src=n,c.parentNode.insertBefore(s,c)}(window,document,&quot;script&quot;,&quot;//www.google-analytics.com/analytics.js&quot;,&quot;ga&quot;),ga(&quot;create&quot;,&quot;UA-66403054-1&quot;,&quot;auto&quot;),ga(&quot;send&quot;,&quot;pageview&quot;);})();">Drag me to bookmark</a>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment