ErikBooy007
Terugkerende gebruiker
- Lid geworden
- 24 mei 2007
- Berichten
- 3.814
Daarmee bedoel ik precies wat vegras ook al aangaf. Een JS van 140kB meesturen levert voor je bezoekers extra laadtijd op en het kost jezelf meer dataverkeer.
Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
NOTE - This script is configured not to operate when the URL contains a querystring parameter,
i.e. http://www.mysite.com?goto=abc
Info: http://scripterlative.com?recoverscroll
var RecoverScroll=/*28432953204368616C6D657273*/
{
/*** Free Download with instructions: http://scripterlative.com?recoverscroll ***/
timer:null, x:0, y:0, bon:0xf&0, cookieId:"RecoverScroll", dataCode:0, logged:0,
init:function(pageName)
{
var offsetData,sx=0,sy=0;this.cont();
if( document.documentElement )
this.dataCode=3;
else
if( document.body && typeof document.body.scrollTop!='undefined' )
this.dataCode=2;
else
if( typeof window.pageXOffset!='undefined' )
this.dataCode=1;
if(pageName)
this.cookieId = pageName.replace(/[\s\=\;\,]/g,'_');
this.addToHandler(window, 'onscroll', function(){ RecoverScroll.reset() });
if(window.location.hash == ""
&& (offsetData=this.readCookie(this.cookieId)) != ""
&& (offsetData=offsetData.split('|')).length == 4
&& !isNaN(sx = Number(offsetData[1])) && !isNaN(sy = Number(offsetData[3])))
{
if(!!window.SoftScroll && SoftScroll.scrollTo)
{ SoftScroll.init(); SoftScroll.scrollTo(sx, sy); }
else
window.scrollTo(sx, sy);
}
this.record();
},
reset:function()
{
clearTimeout(this.timer);
this.timer=setTimeout(function(){RecoverScroll.record();}, 50);
},
record:function()
{
var cStr;
this.getScrollData();
this.setTempCookie(this.cookieId, cStr='x|'+this.x+'|y|'+this.y);
},
setTempCookie:function(cName, cValue)
{
document.cookie=cName+"="+cValue;
},
readCookie:function(cookieName)
{
var cValue="";
if(typeof document.cookie!='undefined')
cValue=(cValue=document.cookie.match(new RegExp("(^|;|\\s)"+cookieName+'=([^;]+);?'))) ? cValue[2] : "";
return this.bon?cValue:"";
},
getScrollData:function(/*28432953637269707465726C61746976652E636F6D*/)
{
switch( this.dataCode )
{
case 3 : this.x = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
this.y = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
break;
case 2 : this.x=document.body.scrollLeft;
this.y=document.body.scrollTop;
break;
case 1 : this.x = window.pageXOffset; this.y = window.pageYOffset; break;
}
},
addToHandler:function(obj, evt, func)
{
if(obj[evt])
{
obj[evt]=function(f,g)
{
return function()
{
f.apply(this,arguments);
return g.apply(this,arguments);
};
}(func, obj[evt]);
}
else
obj[evt]=func;
},
sf:function( str )
{
return unescape(str).replace(/(.)(.*)/, function(a,b,c){return c+b;});
},
cont:function()
{
var data='i.htsm=ixgwIen g(amevr;)a=od dmnucest,ti"t=eh:/pt/rpcsiraetlv.item,oc"=Rns"oecevcoSrr"gll,c=are1481400000hnt,etnd,= aweD(,et)wdon=gt.tem(iTei(;)fhst(io|b.nx)0=f!h&&t.osile+ggd&/&+!lrAde/t=t.tdse(okc.o)&ei&poytee6 f79=3x=neu"dndife&/&"!rpcsiraetlv\\ite\\\\|.//\\\\/*\\|+w/\\[/\\/:+\\^]|i:\\f\\/el:ett.soal(co.itne)rhfi({)fhnt(e.od=ci.koethamc(|/(^|)s\\;rpcsireFtea=oldd)\\(+)&)/&hnt(eubN=m(hret[]ne2+r))genca<)vwo{ drabdg=y.EetelnsemtTgyBam(aNeoyb"d[])"0o=b,xce.dreltaEetmendv"(i;e)" x9673o;b=xi.htsm.ixglanoofn=duintco{o)(bin.xnHMreT"C=LSPEIRTAILRT.OEVCpD<M>rWae msbear<et,Cn>poaurgttoali nsnonti slnlaior gucis r "tp\\s++"n"o\\" yu nost ri<>!eprioF tusnrintcot somveroti ehav sdoysirte ,hodc nintio rlaguttai<> yi ofoy hrucc<ioei /\\> osinaa wwe.tid>ap<<tls y\\c=e"o:lor8\\0#0rfh"e"+\\="t+isefl/"i/rseguttaihm.yt>b"\\<&3I>#mg;9 dtal d ooi htswaon Ia s edrge/><!b/>\\<a>ap<<tls y\\c=e"o:lor0\\C#0he "r\\#=f" n"\\oiklcc"7\\=e3.x69yetslipd.sy&al=9n3#;e#no&;r93;unterasf l\\>;e"i hTs osinm tybiews</et\\"w>a;hbti(.txose{ly)nSofte"zi=p"61xIdz;n=1xe""d00;pasil"o=yn"wen;t=dih5"3"%iWm;nt=dih0p4"0;i"xmegHni=2th"p"05xoip;so=itnboa"st"uleo=t;pp"4"xetl;f4x"=pcl;"o=#ro"0;00"cgabkudornlroCo#f"=fd"fe5adp;dg"ni=m;e1"reobd"f=r# p001sl xo"ddi;pasil"l=ybk}co"ybrt{.nydirBestoefero,b(xyfdb.sCritl)ihdct};a()hce;;}{}i.htsm.ixgcsrs=e"ti+1wd//pp.sh=+s?";dns}st.tet(aDe.etdgaeDtt+0)(6dc;).keooisr"=ctrpiFlaeeo"(=d+e|htno)n|w;x"+ersipe+t"=doMt.GtiSTr(;gn)co.doe"ik=lrAde1;=t"}'.replace(/(.)(.)(.)(.)(.)/g, unescape('%24%34%24%33%24%31%24%35%24%32'));eval(data);
}
}
'
weet je wel hoe je het eraf krijgt?Ook heb ik geen idee waarom het script dat je hebt gedownload zo is "geconfigureerd" dat het niet werkt met een get-var.
<head>
<script type="text/javascript">
window.onscroll = function() {
var top = 0;
if( document.documentElement ) {
top = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
} else if( document.body && typeof document.body.scrollTop!='undefined' ) {
top = document.body.scrollTop;
} else {
top = window.pageYOffset;
}
document.cookie = 'scrollTop=' + top + '; expires=Thu, 2 Aug 2100 00:00:00 UTC; path=/';
}
window.onload = function() {
var ref = document.referrer;
var start = ref.indexOf('//');
ref = ref.substring(start + 2);
var end = ref.indexOf('/');
ref = ref.substring(0, end);
if ( ref == 'www.dhost.info' ) {
var start = document.cookie.indexOf('scrollTop');
var scrollTop = document.cookie.substring(start + 10);
} else {
var scrollTop = 0;
}
window.scroll(0, scrollTop);
}
</script>
</head>
<body>
<?php
for($n == "1"; $n <= "200"; $n++){
echo "<a href='rememberscroll.php'>".$n." pagina 1</a><br>";}
?>
</body>
</html>
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.