<html>
<head>
<link rel="stylesheet" href="http://mediabox.googlecode.com/svn/branches/mediaboxAdvanced/css/mediaboxAdvBlack.css" type="text/css" media="screen" />
<script src="http://ajax.googleapis.com/ajax/libs/mootools/1.2.3/mootools-yui-compressed.js" type="text/javascript"></script>
<script src="http://mediabox.googlecode.com/svn/branches/mediaboxAdvanced/js/mediaboxAdv.js" type="text/javascript"></script>
</head>
<body>
<p><span style="float: none; " class="an7_imgdir">
<a href="http://iaian7.com/media/mediabox/concrete.jpg"
title="Concrete::taken in eastern Michigan" class="an7_thumb">
<img src="http://iaian7.com/media/mediabox/thumbs/concrete.jpg" alt="Concrete" />
</a>
<a href="http://iaian7.com/media/mediabox/nature1.jpg" title="Autumn 1" class="an7_thumb">
<img src="http://iaian7.com/media/mediabox/thumbs/nature1.jpg" alt="Nature1" /></a>
<a href="http://iaian7.com/media/mediabox/nature2.jpg" title="Autumn 2" class="an7_thumb">
<img src="http://iaian7.com/media/mediabox/thumbs/nature2.jpg" alt="Nature2" /></a><a href="http://iaian7.com/media/mediabox/nature3.jpg" title="Autumn 3" class="an7_thumb"><img src="http://iaian7.com/media/mediabox/thumbs/nature3.jpg" alt="Nature3" /></a><a href="http://iaian7.com/media/mediabox/trainyard.jpg" title="Trainyard::taken near Marion, Indiana" class="an7_thumb"><img src="http://iaian7.com/media/mediabox/thumbs/trainyard.jpg" alt="Concrete" /></a><a href="http://iaian7.com/media/mediabox/window.jpg" title="Image set::Window - taken in <a href="http://www.cityofwabash.com/" title="cityofwabash.com" target="_blank">Wabash, Indiana</a>" class="an7_thumb"><img src="http://iaian7.com/media/mediabox/thumbs/window.jpg" alt="window" /></a></span></p>
<script type="text/javascript">
window.onload = function() {
var x=document.getElementsByTagName("a");
var y=('.jpg','.gif','.png','.flv','.swf','youtube.com/watch');
var regexku=/^.+(((twit)|(tweet)|(com\/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/;
for(var i=0;i<x.length;i++)
{
var a=x[i].getAttribute('href');
if (a.match(regexku) != null)
{
x[i].setAttribute("rel","lightbox");
alert(x[i].href + "; rel=" + x[i].getAttribute("rel"));
}
}
Mediabox.scanPage();
}
</script>
</body>
</html>
var x=document.getElementsByTagName("a");
var y=('.jpg','.gif','.png','.flv','.swf','youtube.com/watch');
var regexku=/^.+(((twit)|(tweet)|(com\/video.+)|(flickr.com.+)|(tube.com.+))|((gif)|(jpe?g)|(png)|(flv)|(swf)|(mp3)|(mp4))$)/;
for(i=0;i<x.length;i++)
{
x.item(i).setAttribute("rel","lightbox");
}
Output
You can jump to the latest bin by adding /latest
to your URL
Keyboard Shortcuts
Shortcut | Action |
---|---|
ctrl + [num] | Toggle nth panel |
ctrl + 0 | Close focused panel |
ctrl + enter | Re-render output. If console visible: run JS in console |
Ctrl + l | Clear the console |
ctrl + / | Toggle comment on selected lines |
ctrl + ] | Indents selected lines |
ctrl + [ | Unindents selected lines |
tab | Code complete & Emmet expand |
ctrl + shift + L | Beautify code in active panel |
ctrl + s | Save & lock current Bin from further changes |
ctrl + shift + s | Open the share options |
ctrl + y | Archive Bin |
Complete list of JS Bin shortcuts |
JS Bin URLs
URL | Action |
---|---|
/ | Show the full rendered output. This content will update in real time as it's updated from the /edit url. |
/edit | Edit the current bin |
/watch | Follow a Code Casting session |
/embed | Create an embeddable version of the bin |
/latest | Load the very latest bin (/latest goes in place of the revision) |
/[username]/last | View the last edited bin for this user |
/[username]/last/edit | Edit the last edited bin for this user |
/[username]/last/watch | Follow the Code Casting session for the latest bin for this user |
/quiet | Remove analytics and edit button from rendered output |
.js | Load only the JavaScript for a bin |
.css | Load only the CSS for a bin |
Except for username prefixed urls, the url may start with http://jsbin.com/abc and the url fragments can be added to the url to view it differently. |