PageSourceSearch

http://askboard.ru/images/viewer.js

js askboard.ru collected 2026-10-04 23:53:17 UTC 4,787 bytes, 70 lines download raw bytes

1var imgs='<img src='+servername+'images/load.gif>Загрузка';var thumbnailviewer={enableTitle:false,enableAnimation:true,definefooter:'<div class="footerbar"><br />Закрыть<br /><br /></div>',defineLoading:imgs,scrollbarwidth:16,opacitystring:'filter:progid:DXImageTransform.Microsoft.alpha(opacity=10); -moz-opacity: 0.1; opacity: 0.1',targetlinks:[],createthumbBox:function(){document.write('<div id="thumbBox" onClick="thumbnailviewer.closeit()" title="Закрыть">'+this.definefooter+'<div id="thumbImage"></div></div>')
2document.write('<div id="thumbLoading">'+this.defineLoading+'</div>')
3this.thumbBox=document.getElementById("thumbBox")
4this.thumbImage=document.getElementById("thumbImage")
5this.thumbLoading=document.getElementById("thumbLoading")
6this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body},centerDiv:function(divobj){var ie=document.all&&!window.opera
7var dom=document.getElementById
8var scroll_top=(ie)?this.standardbody.scrollTop:window.pageYOffset
9var scroll_left=(ie)?this.standardbody.scrollLeft:window.pageXOffset
10var docwidth=(ie)?this.standardbody.clientWidth:window.innerWidth-this.scrollbarwidth
11var docheight=(ie)?this.standardbody.clientHeight:window.innerHeight
12var docheightcomplete=(this.standardbody.offsetHeight>this.standardbody.scrollHeight)?this.standardbody.offsetHeight:this.standardbody.scrollHeight
13var objwidth=divobj.offsetWidth
14var objheight=divobj.offsetHeight
15var topposition=(docheight>objheight)?scroll_top+docheight/2-objheight/2+"px":scroll_top+10+"px"
16divobj.style.left=docwidth/2-objwidth/2+"px"
17divobj.style.top=Math.floor(parseInt(topposition))+"px"
18divobj.style.visibility="visible"},showthumbBox:function(){this.centerDiv(this.thumbBox)
19if(this.enableAnimation){this.currentopacity=0.1
20this.opacitytimer=setInterval("thumbnailviewer.opacityanimation()",40)}},loadimage:function(link){if(this.thumbBox.style.visibility=="visible")
21this.closeit()
22var imageHTML='<img src="'+link.getAttribute("href")+'" style="'+this.opacitystring+'" />'
23if(this.enableTitle&&link.getAttribute("title"))
24imageHTML+='<br />'+link.getAttribute("title")
25this.centerDiv(this.thumbLoading)
26this.thumbImage.innerHTML=imageHTML
27this.featureImage=this.thumbImage.getElementsByTagName("img")[0]
28this.featureImage.onload=function(){thumbnailviewer.thumbLoading.style.visibility="hidden"
29thumbnailviewer.showthumbBox()}
30if(document.all&&!window.createPopup)
31this.featureImage.src=link.getAttribute("href")
32this.featureImage.onerror=function(){thumbnailviewer.thumbLoading.style.visibility="hidden"}},setimgopacity:function(value){var targetobject=this.featureImage
33if(targetobject.filters&&targetobject.filters[0]){if(typeof targetobject.filters[0].opacity=="number")
34targetobject.filters[0].opacity=value*100
35else
36targetobject.style.filter="alpha(opacity="+value*100+")"}
37else if(typeof targetobject.style.MozOpacity!="undefined")
38targetobject.style.MozOpacity=value
39else if(typeof targetobject.style.opacity!="undefined")
40targetobject.style.opacity=value
41else
42this.stopanimation()},opacityanimation:function(){this.setimgopacity(this.currentopacity)
43this.currentopacity+=0.1
44if(this.currentopacity>1)
45this.stopanimation()},stopanimation:function(){if(typeof this.opacitytimer!="undefined")
46clearInterval(this.opacitytimer)},closeit:function(){this.stopanimation()
47this.thumbBox.style.visibility="hidden"
48this.thumbImage.innerHTML=""
49this.thumbBox.style.left="-2000px"
50this.thumbBox.style.top="-2000px"},cleanup:function(){this.thumbLoading=null
51if(this.featureImage)this.featureImage.onload=null
52this.featureImage=null
53this.thumbImage=null
54for(var i=0;i<this.targetlinks.length;i++)
55this.targetlinks[i].onclick=null
56this.thumbBox=null},dotask:function(target,functionref,tasktype){var tasktype=(window.addEventListener)?tasktype:"on"+tasktype
57if(target.addEventListener)
58target.addEventListener(tasktype,functionref,false)
59else if(target.attachEvent)
60target.attachEvent(tasktype,functionref)},init:function(){if(!this.enableAnimation)
61this.opacitystring=""
62var pagelinks=document.getElementsByTagName("a")
63for(var i=0;i<pagelinks.length;i++){if(pagelinks[i].getAttribute("rel")&&pagelinks[i].getAttribute("rel")=="thumbnail"){pagelinks[i].onclick=function(){thumbnailviewer.stopanimation()
64thumbnailviewer.loadimage(this)
65return false}
66this.targetlinks[this.targetlinks.length]=pagelinks[i]}}
67this.dotask(window,function(){if(thumbnailviewer.thumbBox.style.visibility=="visible")thumbnailviewer.centerDiv(thumbnailviewer.thumbBox)},"resize")}}
68thumbnailviewer.createthumbBox()
69thumbnailviewer.dotask(window,function(){thumbnailviewer.init()},"load")
70thumbnailviewer.dotask(window,function(){thumbnailviewer.cleanup()},"unload")

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.