Created
December 6, 2015 14:04
-
-
Save bxt/addc4eab08cdceb274d1 to your computer and use it in GitHub Desktop.
The weirdest atom editor bug ever
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
jQuery(function($){ | |
/* | |
var slideUrls=['slide001.png','slide002.png','slide003.png','slide004.png']; | |
var slide=Math.floor(Math.random()*slideUrls.length); | |
var switcherHtml='<div id="slideSwitcher">'; | |
for(var i=0;i<slideUrls.length;i++) switcherHtml+='<a href="javascript:;" title="Nummer '+(i+1)+' anzeigen">slide '+(i+1)+'</a>'; | |
$("#slides").append(switcherHtml); | |
nction toImage(no,duration) { | |
$("#slideSwitcher").find("a").removeClass('active').eq(no).addClass('active'); | |
var preloadImg=new Image(); | |
preloadImg.src=slidesUrl+slideUrls[no]; | |
$("#slides").find("img").eq(0).fadeTo(duration,0,function(){ | |
$(this).remove(); | |
}); | |
$("#slides").prepend('<img src="'+slidesUrl+slideUrls[no]+'">'); | |
} | |
toage(slide,0); | |
wind.setInterval(function(){ | |
toImage((++slide)%slideUrls.length,1000); | |
},6500); | |
$("#slides a").click(function(){ | |
slide=$(this).attr('title').replace(/[^0-9]/g,'')-1; | |
toImage(slide,1000); | |
return false; | |
}); | |
var tieUrls=['filmtitel001.png','filmtitel002.png','filmtitel003.png','filmtitel004.png','filmtitel005.png']; | |
var titleNo=Math.floor(Math.random()*titleUrls.length), direction=false; | |
function animateTitle() { | |
titleNo=(titleNo+1)%titleUrls.length; | |
direction=!direction; | |
var preloadImg=new Image(); | |
preloadImg.src=moviesUrl+titleUrls[titleNo]; | |
if($.browser.msie) { // no fading as it is buggy | |
$('<img src="'+moviesUrl+titleUrls[titleNo]+'">').appendTo("#slides") | |
.css({top:(30+Math.random()*90)}).css({left:(direction?160:205)}) | |
.animate({left:(direction?'+':'-')+'=30'},6500,function(){ | |
$(this).remove();animateTitle(); | |
}); | |
} else { | |
$('<img src="'+moviesUrl+titleUrls[titleNo]+'">').appendTo("#slides") | |
.css({top:(30+Math.random()*90)}).css({left:(direction?160:205)}) | |
.hide().fadeTo(1000,1,function(){ | |
$(this).animate({left:(direction?'+':'-')+'=30'},5000,function(){ | |
$(this).fadeTo(500,0,function(){ $(this).remove();animateTitle(); }) | |
}); | |
}); | |
} | |
} | |
animitle(); | |
*/ | |
/* | |
// thisas used for 2013: | |
var theSlideUr= slidesUrl+'webmotiv-mehr.jpg'; | |
var slidePosition=[[440,252],[460,89],[17,143],[0,43],[190,384]]; | |
var position = 0; | |
$("#slides").emp().append('<div id="slideCropper"><img src="'+theSlideUrl+'" /></div>'); | |
var switcherHtml='iv id="slideSwitcher">'; | |
for(var i=0;i<slidePosition.length;i++) switcherHtml+='<a href="javascript:;" title="Nummer '+(i+1)+' anzeigen">slide '+(i+1)+'</a>'; | |
switcherHtml+='</div>'; | |
$("#slides").append(switcherHtml); | |
$("#slideCropper").css({'width':'592px','height':'193px','position':'relative','overflow':'hidden'}); | |
$("#slideCropper img").css({'position':'absolute'}); | |
function toPosition(,duration) { | |
$("#slideSwitcher").find("a").removeClass('active').eq(no).addClass('active'); | |
$("#slideCropper img").stop().animate({'top':-slidePosition[no][1],'left':-slidePosition[no][0]},duration); | |
} | |
toPosition(position,0) | |
window.setInterval(functn(){ | |
toPosition((++position)%slidePosition.length,1000); | |
},6500); | |
$("#slides a").click(function(){ | |
position=$(this).attr('title').replace(/[^0-9]/g,'')-1; | |
toPosition(position,1000); | |
return false; | |
}); | |
*/ | |
/* | |
// This was usefor 20: | |
chro | |
var theSlideUrl = slidesUrl+'webmotiv-2014.jpg'; | |
var minSlidePosition=13; | |
var maxSlidePosition=53; | |
$("#slides").empty().append('<v id="slideCropper"><img src="'+theSlideUrl+'" /></div>'); | |
$("#slideCropper").css({'width':92px','height':'193px','position':'relative','overflow':'hidden'}); | |
$("#slideCropper img").css({'position':'absolute'}); | |
$(document).mousemove(function(e){ var offset = minSlidePosition + (e.pageY/$(window).height()) * (maxSlidePosition-minSlidePosition); | |
$("#slideCropper img").css({'top':-offset},100); | |
}); | |
*/ | |
// slideshow for 2015: | |
var slideUs=['motiv-1.gif','motiv-2.f','motiv-3.gif','phase-1.gif','phase-2.gif','phase-3.gif','phase-4.gif']; | |
var slideOrder = [3,4,5,6,2,6,5,0,6,5,1,6,5]; | |
var slideLong = [0,0,0,0,1,0,0,1,0,0,1,0,0]; | |
var slideLongDuration = 6100; | |
var slideFadeDuration = 900; | |
var slide = 0; | |
function toImage(url,duration) { | |
varreloadImg=new Image(); | |
preloadImg.src=url; | |
$("#slides").find("img").eq(0).fadeTo(duration,0,function(){ | |
$(this).remove(); | |
}); | |
$("#slides").prepend('<img src="'+url+'">'); | |
} | |
(function nextSlide(){ | |
toImage(slidesU+'2015/'+slideUrls[slideOrder[slide]],slideFadeDuration); | |
window.setTimeout(nextSlide, slideFadeDuration + (slideLong[slide] ? slideLongDuration : 0)); | |
slide = (slide+1) % slideOrder.length; | |
})(); | |
}); | |
jQuery(function($){ | |
$(window).on('resiz,function(){ | |
$("#centerContainer").css('min-height',$(window).height()); | |
}).trigger('resize'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instructions:
hexdump -C templates/fw2012/assets/main.js | grep 09
, there are not tabulators.atom --safe main.js
to open it.⌘S
to save