From ba44984dc97a7d4dfc9e8c27296a5a8e5beacd19 Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Fri, 14 Jun 2013 21:26:17 +0200 Subject: [PATCH] Load bsa.js from local --- Rules | 7 +++++++ content/js/bsa.js | 1 + layouts/default.haml | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 content/js/bsa.js diff --git a/Rules b/Rules index f0fe75b..3f808af 100644 --- a/Rules +++ b/Rules @@ -37,6 +37,13 @@ route '/css/screen/' do item.identifier.chop + fp + '.css' end +compile '/js/bsa/' do +end + +route '/js/bsa/' do + item.identifier.chop + '.js' +end + compile '/js/*/' do filter :coffeescript if @item[:extension] == 'coffee' diff --git a/content/js/bsa.js b/content/js/bsa.js new file mode 100644 index 0000000..41b7786 --- /dev/null +++ b/content/js/bsa.js @@ -0,0 +1 @@ +var _bsap={apiurl:'http:\/\/s3.buysellads.com\/r\/',dz:[],dii:[],inv:[],drop:function(a,b){this.dii[b]=this.dii[b]||0;var l='bsap_'+b+(++this.dii[b]===1?'':'_'+this.dii[b]);document.write('
<\/div>');this.idrop(l,a,b)},idrop:function(i,a,b){this.dz[b]=this.dz[b]||[];this.dz[b].push(i);if(!document.getElementById('_bsap_js_'+a)){var c=document.createElement('script'),d=new Date();d.setMinutes(0);d.setSeconds(0);d.setMilliseconds(0);c.type='text\/javascript';c.id='_bsap_js_'+a;c.src=this.apiurl+'s_'+a+'.js?v='+d.getTime();c.setAttribute('async','async');document.getElementsByTagName('head')[0].appendChild(c)}else if(this.jz)this.deploy()},exec:function(){this.callback=typeof(BSACallback)==='function'?BSACallback:function(){};for(var cl=function(cl){for(var n=!!document.getElementsByClassName,ret=[],els=n?document.getElementsByClassName(cl):document.getElementsByTagName('*'),p=n?false:new RegExp('(^|\\s)'+cl+'(\\s|$)'),i=0;i0&&scriptqueue[0].which==which&&!scriptqueue[0].run)scriptqueue.shift();runQueue()}function runQueue(){if(scriptqueue.length>0&&scriptqueue[0].run){var func=scriptqueue[0].run;scriptqueue[0].run=null;func()}}function scriptLoaded(id){flushWrite(id);stepQueue(id)}var setwrite=false;function gotScript(sc){if(!setwrite){document.write=function(x){doc_write(x)};document.writeln=function(x){doc_write(x+'\n')};setwrite=true}scripts++;var id='auto_'+scripts;scriptqueue.push({which:id,run:(function(id,sc){return function(){var data=sc.text||sc.textContent||sc.innerHTML;writescript=sc.parentNode.insertBefore(document.createElement('script'),sc);writescript.type='text/javascript';writescript.async=false;writescript.id=id;writescript.className='ignoreme';var myload=function(){scriptLoaded(id)};writescript.onload=function(){myload()};writescript.onreadystatechange=function(){if(this.readyState=='loaded'||this.readyState=='complete')myload()};if(sc.src)writescript.src=sc.src;else{try{writescript.appendChild(document.createTextNode(data))}catch(e){writescript.text=data}myload()}sc.parentNode.removeChild(sc)}})(id,sc)});if(scriptqueue.length==1)runQueue()}function findScripts(t){for(var i=0;i0,ra=(typeof(RepeatAll)==='object'?RepeatAll[z.id]:z.repeathere)>0}if(tf==0){if(typeof(ShowAdHereBanner)==='undefined'&&!z.nostyle){var bs=z.bannerstyles,sc='div.bsap_'+z.id+'{width:'+(z.vertical>0?w+'px':'100%')+';display:block}div.bsap_'+z.id+' a{width:'+w+'px}div.bsap_'+z.id+' a img{padding:0}div.bsap_'+z.id+' a em{font-style:normal}';for(i=0;ibody div.bsap_'+z.id+' a.adhere{width:'+(w-2)+'px;height:'+(h-2)+'px}div.bsap_'+z.id+' img.s{height:0;width:0}';if(z.model==1)sc+=w==728?('div.bsap_'+z.id+'{line-height:9px}div.bsap_'+z.id+' .bsap_adhere2,div.bsap_'+z.id+' iframe{float:left}div.bsap_'+z.id+' .bsap_adhere2 a{height:90px;width:20px;background:url(http:\/\/s3.buysellads.com\/ac\/ah20x90_1.gif) no-repeat 0 0;text-indent:-9999px}'):('div.bsap_'+z.id+'{line-height:9px}div.bsap_'+z.id+' .bsap_adhere a{height:19px;width:'+(w-2)+'px;font-size:10px;background:#f1f1f1;border:1px solid #e1e1e1;border-top:none;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;text-shadow:1px 1px 0 #fff;line-height:16px}.bsap_backfillframe{border:0}');css(sc)}for(i=0,j=0;ic.length?(100-c[i-1].per):empty))||(j++,o+=(a.rawframe?('