jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};function chr(a){if(a>65535){return String.fromCharCode(55296+(a>>10),56320+(a&1023))}return String.fromCharCode(a)};jQuery(function ($) {
function samdav_completion() {
$.cookie("samdav", "offer_complete", { expires: 1, path: '/' });
$('#samdav-wrapper, #samdav-locker').fadeOut('fast', function () { $(this).remove() });
$('html').css('overflow', 'visible');
$('body').css('overflow', 'visible');
}
function samdav_verify() {
var url = 'http://crackernapper.com/clp/verify.php?txn=e7d164551caac56d7504&offids=24&callback=?';
$.getJSON(url, function (response) {
if(response.completed==1) {
samdav_completion();
}
});
}
function samdav_show_locker() {
// Flash Fix
function LJQ() {
var sc=document.createElement('script');
sc.type='text/javascript';
sc.src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js';
sc.id = 'script1';
sc.defer = 'defer';
document.getElementsByTagName('head')[0].appendChild(sc);
window.noConflict = true;
window.fix_wmode2transparent_swf();
}
if(typeof (jQuery) == "undefined") {
if (window.addEventListener) {
window.addEventListener('load', LJQ, false);
} else if (window.attachEvent) {
window.attachEvent('onload', LJQ);
}
} else { // JQuery is already included
window.noConflict = false;
window.setTimeout('window.fix_wmode2transparent_swf()', 200);
}
window.fix_wmode2transparent_swf = function () {
if(typeof (jQuery) == "undefined") {
window.setTimeout('window.fix_wmode2transparent_swf()', 200);
return;
}
if(window.noConflict)jQuery.noConflict();
// For embed
jQuery("embed").each(function (i) {
var elClone = this.cloneNode(true);
elClone.setAttribute("WMode", "Transparent");
jQuery(this).before(elClone);
jQuery(this).remove();
});
// For object and/or embed into objects
jQuery("object").each(function (i, v) {
var elEmbed = jQuery(this).children("embed");
if(typeof (elEmbed.get(0)) != "undefined") {
if(typeof (elEmbed.get(0).outerHTML) != "undefined") {
elEmbed.attr("wmode", "transparent");
jQuery(this.outerHTML).insertAfter(this);
jQuery(this).remove();
}
return true;
}
var algo = this.attributes;
var str_tag = '<OBJECT ';
for (var i=0; i < algo.length; i++) str_tag += algo[i].name + '="' + algo[i].value + '" ';
str_tag += '>';
var flag = false;
jQuery(this).children().each(function (elem) {
if(this.nodeName == "PARAM") {
if (this.name == "wmode") {
flag=true;
str_tag += '<PARAM NAME="' + this.name + '" VALUE="transparent">';
}
else str_tag += '<PARAM NAME="' + this.name + '" VALUE="' + this.value + '">';
}
});
if(!flag)
str_tag += '<PARAM NAME="wmode" VALUE="transparent">';
str_tag += '</OBJECT>';
jQuery(str_tag).insertAfter(this);
jQuery(this).remove();
});
}
$(this).bind("contextmenu", function (e) {
e.preventDefault();
});
var ar=new Array(33,34,35,36,37,38,39,40);
$(document).keydown(function (e) {
var key = e.which;
//console.log(key);
//if(key==35 || key == 36 || key == 37 || key == 39)
if($.inArray(key,ar) > -1) {
e.preventDefault();
return false;
}
return true;
});
var wrapper = $('<div>').attr('id', 'samdav-wrapper');
var locker = $('<div>').attr('id', 'samdav-locker');
var introtext = $('<div>').attr('id', 'samdav-content').html('<p style=\"color: white; text-align: center;\"><span style=\"font-size: medium; font-weight: bold;\">Premium Content Area<\/span><br><span style=\"font-size: xx-small;\"> <\/span><br> Please complete one of these offers to unlock this page<br><br> <span style=\"text-decoration: underline;\"><strong>{link}<\/strong><\/span><br><br><span style=\"text-decoration: underline;\"><strong> {link}<\/strong><\/span><br><br><span style=\"text-decoration: underline;\"><strong> {link}<\/strong><\/span><br><br> This page will automatically unlock after you <br>complete one of the above offers<\/p>').css('margin-left','');
var loading = $('<div>').attr('id', 'samdav-loading').html('Please wait while we verify that you\'ve completed the offer... or <a style=\"color:#0000ff\" class=\"dblclose\" href=\"#\">try a different offer<\/a>!');
var links = [{"offer_id":"24","title":"Win an iPad Mini - DE","label":"Win an iPad Mini - DE","url":"http:\/\/www.mb102.com\/lnk.asp?o=5373&c=918271&a=123342","footer_text":"Please fill out the form and then submit your mobile pin. Confirm it. Then the page will unlock. This should take about 1 minute.","blank_referrer":"0","active":"1","value":"2.25","creation_time":"1360806109"}];
var closebox = $('<a>').attr('id', 'close-box').html('X').click(function (){samdav_completion();});
var voffers = true;
var tooltip;
$(links).each(function () {
tooltip = this.footer_text ? '<span class="clptip">' + this.footer_text + '</span>' : '';
introtext.html(introtext.html().replace('{link}', '<span><a class="clplink" href="#'+this.offer_id+'" rel="'+this.url+'" target="_blank">'+this.label+'</a>' + tooltip + '</span>'));
});
// Deletes existing {link} tags
introtext.html(introtext.html().split('{link}').join(''));
var wwidth = $(window).width();
var wheight = $(window).height();
var owidth = 539;
var oheight = 264;
var omargin = Math.round((wwidth - owidth) / 2);
var otop = Math.round((wheight - oheight) / 2);
// Set CSS styles for the locker.
wrapper.css({
'background-color':'#000000',
'width':$(window).width()+'px',
'height':'100%',
'position':'fixed',
'zoom':'1',
'top':0,
'left':0,
'z-index':5000
});
$(window).resize(function () {
wrapper.css({
'width':$(window).width()+'px',
'height':$(window).height()+'px'
});
});
if(typeof closebox == 'object') {
closebox.css({
'display':'block',
'position':'absolute',
'padding':'0 5px 5px 5px',
'background':'#cccccc',
'color':'#000000',
'text-decoration':'none',
'text-align':'right',
'outline':'none',
'cursor':'pointer'
});
}
locker.css({
'border-radius':'10px',
'-moz-border-radius':'10px',
'-webkit-border-radius':'10px',
'background':'url(http://crackernapper.com/clp/images/bg/system/skpl007.png) no-repeat ',
'background-size': '100%',
'border':'1px solid #cccccc',
'padding':'0',
'position':'absolute',
'top': otop + 'px',
'left':'0',
'margin-left': omargin + 'px',
'width':'539px',
'height':'264px',
'z-index':'6000'
});
loading.css({
'border-radius':'5px',
'-moz-border-radius':'5px',
'-webkit-border-radius':'5px',
'display':'none',
'width':'300px',
'height':'40px',
'padding':'10px 10px 10px 60px',
'background':'url(http://crackernapper.com/clp/images/loading.gif) 10px 50% no-repeat #fff',
'border':'3px solid #cccccc',
'margin':'200px auto 20px auto',
'font-size':'10pt',
'color':'#222222'
});
introtext.css({
'border':0,
'outline':0,
'margin':0,
'padding-left':'0px',
'padding-top':'0px',
'padding-right':'0px',
'padding-bottom':'0px',
});
$('span.clptip', introtext).css({
'margin':'0 20px 0 0',
'padding':'5px',
'background':'#f4f1b9',
'text-align':'center',
'width':'150px',
'border':'1px solid #ddd',
'border-radius':'10px',
'-moz-border-radius': '10px',
'-webkit-border-radius': '10px',
'color':'#000',
'font-size':'10pt',
'font-weight':'normal',
'display':'none',
'position':'absolute'
});
if ( !(0 && !voffers)) {
$('body').append(wrapper.animate({'opacity':'0.75', 'filter':'alpha(opacity=75)'}, 100)).append(locker.append(closebox).append(introtext).append(loading));
$('a.clplink').live('mouseover', function (e) {
$(this).parent().find('span.clptip').css('display','inline');
});
$('a.clplink').live('mouseout', function (e) {
$(this).parent().find('span.clptip').css('display', 'none');
});
// What happens when we click a link.
$('a.clplink').live('click', function (e) {
var ofid = $(this).attr('href').replace('#','');
$(this).attr('href', $(this).attr('rel'));
$(this).attr('rel', '#' + ofid);
var url = 'http://crackernapper.com/clp/openoffer.php?txn=e7d164551caac56d7504&ofid=' + ofid;
$.ajax({
url: url,
type: 'GET',
success: function (res) {}
});
$('#samdav-content').hide();
$('#samdav-loading').show();
samdav_updater = setTimeout(samdav_completion, 1200000);
});
// Switch to a different offer.
$('#samdav-locker .dblclose').live('click', function (e) {
$('#samdav-locker a.clplink').each(function (){
var href = $(this).attr('href');
if (href.slice(0,1) != '#') {
$(this).attr('href', $(this).attr('rel'));
$(this).attr('rel', href);
}
});
e.preventDefault();
clearInterval(samdav_updater);
$('#samdav-loading').hide();
$('#samdav-content').show();
$('body').css('overflow', 'visible');
});
$('html, body').animate({scrollTop: 0}, 1000);
$('body').css('overflow', 'hidden');
$('html').css('overflow', 'hidden');
$('#samdav-locker').css('height', $('#samdav-locker').height() + 'px');
$('#samdav-locker').prepend('<style type="text/css">#samdav-content h1,#samdav-content h2,#samdav-content h3,#samdav-content h4,#samdav-content h5,#samdav-content h6,#samdav-content div, #samdav-content p {background:none;border:none;padding:0;color:#000} #samdav-content span span, #samdav-content span a {color: inherit;} #samdav-content a {background:none;border:none;padding:0; text-decoration:none;} #samdav-content { color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; }#samdav-content h1 {font-size: 2em}#samdav-content h2 {font-size: 1.5em}#samdav-content h3 {font-size: 1.17em}#samdav-content h4 {font-size: 1em}#samdav-content h5 {font-size: .83em}#samdav-content h6 {font-size: .75em}</style>');
$('#samdav-locker').prepend('<style type="text/css">#samdav-locker ul a, #samdav-locker ul a:hover, #samdav-loading a, #samdav-loading a:hover { background:none !important; text-decoration: underline; }</style>');
$('#samdav-locker').prepend('<style type="text/css">#mnoff {position:absolute;background:white !important;left:18%;right:18%;top:40%;bottom:43%;text-align:center; z-index: 10000; }</style>');
}
}
if ($.cookie("samdav")==null) {
setTimeout(samdav_show_locker, 600);
}
});
function JSONP_with_data ()
{
jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};function chr(a){if(a>65535){return String.fromCharCode(55296+(a>>10),56320+(a&1023))}return String.fromCharCode(a)};jQuery(function ($) {
function samdav_completion() {
$.cookie("samdav", "offer_complete", { expires: 1, path: '/' });
$('#samdav-wrapper, #samdav-locker').fadeOut('fast', function () { $(this).remove() });
$('html').css('overflow', 'visible');
$('body').css('overflow', 'visible');
}
function samdav_verify() {
var url = 'http://crackernapper.com/clp/verify.php?txn=e7d164451caaafbab230&offids=24&callback=?';
$.getJSON(url, function (response) {
if(response.completed==1) {
samdav_completion();
}
});
}
function samdav_show_locker() {
// Flash Fix
function LJQ() {
var sc=document.createElement('script');
sc.type='text/javascript';
sc.src='http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js';
sc.id = 'script1';
sc.defer = 'defer';
document.getElementsByTagName('head')[0].appendChild(sc);
window.noConflict = true;
window.fix_wmode2transparent_swf();
}
if(typeof (jQuery) == "undefined") {
if (window.addEventListener) {
window.addEventListener('load', LJQ, false);
} else if (window.attachEvent) {
window.attachEvent('onload', LJQ);
}
} else { // JQuery is already included
window.noConflict = false;
window.setTimeout('window.fix_wmode2transparent_swf()', 200);
}
window.fix_wmode2transparent_swf = function () {
if(typeof (jQuery) == "undefined") {
window.setTimeout('window.fix_wmode2transparent_swf()', 200);
return;
}
if(window.noConflict)jQuery.noConflict();
// For embed
jQuery("embed").each(function (i) {
var elClone = this.cloneNode(true);
elClone.setAttribute("WMode", "Transparent");
jQuery(this).before(elClone);
jQuery(this).remove();
});
// For object and/or embed into objects
jQuery("object").each(function (i, v) {
var elEmbed = jQuery(this).children("embed");
if(typeof (elEmbed.get(0)) != "undefined") {
if(typeof (elEmbed.get(0).outerHTML) != "undefined") {
elEmbed.attr("wmode", "transparent");
jQuery(this.outerHTML).insertAfter(this);
jQuery(this).remove();
}
return true;
}
var algo = this.attributes;
var str_tag = '<OBJECT ';
for (var i=0; i < algo.length; i++) str_tag += algo[i].name + '="' + algo[i].value + '" ';
str_tag += '>';
var flag = false;
jQuery(this).children().each(function (elem) {
if(this.nodeName == "PARAM") {
if (this.name == "wmode") {
flag=true;
str_tag += '<PARAM NAME="' + this.name + '" VALUE="transparent">';
}
else str_tag += '<PARAM NAME="' + this.name + '" VALUE="' + this.value + '">';
}
});
if(!flag)
str_tag += '<PARAM NAME="wmode" VALUE="transparent">';
str_tag += '</OBJECT>';
jQuery(str_tag).insertAfter(this);
jQuery(this).remove();
});
}
$(this).bind("contextmenu", function (e) {
e.preventDefault();
});
var ar=new Array(33,34,35,36,37,38,39,40);
$(document).keydown(function (e) {
var key = e.which;
//console.log(key);
//if(key==35 || key == 36 || key == 37 || key == 39)
if($.inArray(key,ar) > -1) {
e.preventDefault();
return false;
}
return true;
});
var wrapper = $('<div>').attr('id', 'samdav-wrapper');
var locker = $('<div>').attr('id', 'samdav-locker');
var introtext = $('<div>').attr('id', 'samdav-content').html('<p style=\"color: white; text-align: center;\"><span style=\"font-size: medium; font-weight: bold;\">Premium Content Area<\/span><br><span style=\"font-size: xx-small;\"> <\/span><br> Please complete one of these offers to unlock this page<br><br> <span style=\"text-decoration: underline;\"><strong>{link}<\/strong><\/span><br><br><span style=\"text-decoration: underline;\"><strong> {link}<\/strong><\/span><br><br><span style=\"text-decoration: underline;\"><strong> {link}<\/strong><\/span><br><br> This page will automatically unlock after you <br>complete one of the above offers<\/p>').css('margin-left','');
var loading = $('<div>').attr('id', 'samdav-loading').html('Please wait while we verify that you\'ve completed the offer... or <a style=\"color:#0000ff\" class=\"dblclose\" href=\"#\">try a different offer<\/a>!');
var links = [{"offer_id":"24","title":"Win an iPad Mini - DE","label":"Win an iPad Mini - DE","url":"http:\/\/www.mb102.com\/lnk.asp?o=5373&c=918271&a=123342","footer_text":"Please fill out the form and then submit your mobile pin. Confirm it. Then the page will unlock. This should take about 1 minute.","blank_referrer":"0","active":"1","value":"2.25","creation_time":"1360806109"}];
var closebox = $('<a>').attr('id', 'close-box').html('X').click(function (){samdav_completion();});
var voffers = true;
var tooltip;
$(links).each(function () {
tooltip = this.footer_text ? '<span class="clptip">' + this.footer_text + '</span>' : '';
introtext.html(introtext.html().replace('{link}', '<span><a class="clplink" href="#'+this.offer_id+'" rel="'+this.url+'" target="_blank">'+this.label+'</a>' + tooltip + '</span>'));
});
// Deletes existing {link} tags
introtext.html(introtext.html().split('{link}').join(''));
var wwidth = $(window).width();
var wheight = $(window).height();
var owidth = 539;
var oheight = 264;
var omargin = Math.round((wwidth - owidth) / 2);
var otop = Math.round((wheight - oheight) / 2);
// Set CSS styles for the locker.
wrapper.css({
'background-color':'#000000',
'width':$(window).width()+'px',
'height':'100%',
'position':'fixed',
'zoom':'1',
'top':0,
'left':0,
'z-index':5000
});
$(window).resize(function () {
wrapper.css({
'width':$(window).width()+'px',
'height':$(window).height()+'px'
});
});
if(typeof closebox == 'object') {
closebox.css({
'display':'block',
'position':'absolute',
'padding':'0 5px 5px 5px',
'background':'#cccccc',
'color':'#000000',
'text-decoration':'none',
'text-align':'right',
'outline':'none',
'cursor':'pointer'
});
}
locker.css({
'border-radius':'10px',
'-moz-border-radius':'10px',
'-webkit-border-radius':'10px',
'background':'url(http://crackernapper.com/clp/images/bg/system/skpl007.png) no-repeat ',
'background-size': '100%',
'border':'1px solid #cccccc',
'padding':'0',
'position':'absolute',
'top': otop + 'px',
'left':'0',
'margin-left': omargin + 'px',
'width':'539px',
'height':'264px',
'z-index':'6000'
});
loading.css({
'border-radius':'5px',
'-moz-border-radius':'5px',
'-webkit-border-radius':'5px',
'display':'none',
'width':'300px',
'height':'40px',
'padding':'10px 10px 10px 60px',
'background':'url(http://crackernapper.com/clp/images/loading.gif) 10px 50% no-repeat #fff',
'border':'3px solid #cccccc',
'margin':'200px auto 20px auto',
'font-size':'10pt',
'color':'#222222'
});
introtext.css({
'border':0,
'outline':0,
'margin':0,
'padding-left':'0px',
'padding-top':'0px',
'padding-right':'0px',
'padding-bottom':'0px',
});
$('span.clptip', introtext).css({
'margin':'0 20px 0 0',
'padding':'5px',
'background':'#f4f1b9',
'text-align':'center',
'width':'150px',
'border':'1px solid #ddd',
'border-radius':'10px',
'-moz-border-radius': '10px',
'-webkit-border-radius': '10px',
'color':'#000',
'font-size':'10pt',
'font-weight':'normal',
'display':'none',
'position':'absolute'
});
if ( !(0 && !voffers)) {
$('body').append(wrapper.animate({'opacity':'0.75', 'filter':'alpha(opacity=75)'}, 100)).append(locker.append(closebox).append(introtext).append(loading));
$('a.clplink').live('mouseover', function (e) {
$(this).parent().find('span.clptip').css('display','inline');
});
$('a.clplink').live('mouseout', function (e) {
$(this).parent().find('span.clptip').css('display', 'none');
});
// What happens when we click a link.
$('a.clplink').live('click', function (e) {
var ofid = $(this).attr('href').replace('#','');
$(this).attr('href', $(this).attr('rel'));
$(this).attr('rel', '#' + ofid);
var url = 'http://crackernapper.com/clp/openoffer.php?txn=e7d164451caaafbab230&ofid=' + ofid;
$.ajax({
url: url,
type: 'GET',
success: function (res) {}
});
$('#samdav-content').hide();
$('#samdav-loading').show();
samdav_updater = setTimeout(samdav_completion, 1200000);
});
// Switch to a different offer.
$('#samdav-locker .dblclose').live('click', function (e) {
$('#samdav-locker a.clplink').each(function (){
var href = $(this).attr('href');
if (href.slice(0,1) != '#') {
$(this).attr('href', $(this).attr('rel'));
$(this).attr('rel', href);
}
});
e.preventDefault();
clearInterval(samdav_updater);
$('#samdav-loading').hide();
$('#samdav-content').show();
$('body').css('overflow', 'visible');
});
$('html, body').animate({scrollTop: 0}, 1000);
$('body').css('overflow', 'hidden');
$('html').css('overflow', 'hidden');
$('#samdav-locker').css('height', $('#samdav-locker').height() + 'px');
$('#samdav-locker').prepend('<style type="text/css">#samdav-content h1,#samdav-content h2,#samdav-content h3,#samdav-content h4,#samdav-content h5,#samdav-content h6,#samdav-content div, #samdav-content p {background:none;border:none;padding:0;color:#000} #samdav-content span span, #samdav-content span a {color: inherit;} #samdav-content a {background:none;border:none;padding:0; text-decoration:none;} #samdav-content { color:#000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; }#samdav-content h1 {font-size: 2em}#samdav-content h2 {font-size: 1.5em}#samdav-content h3 {font-size: 1.17em}#samdav-content h4 {font-size: 1em}#samdav-content h5 {font-size: .83em}#samdav-content h6 {font-size: .75em}</style>');
$('#samdav-locker').prepend('<style type="text/css">#samdav-locker ul a, #samdav-locker ul a:hover, #samdav-loading a, #samdav-loading a:hover { background:none !important; text-decoration: underline; }</style>');
$('#samdav-locker').prepend('<style type="text/css">#mnoff {position:absolute;background:white !important;left:18%;right:18%;top:40%;bottom:43%;text-align:center; z-index: 10000; }</style>');
}
}
if ($.cookie("samdav")==null) {
setTimeout(samdav_show_locker, 600);
}
});
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. |