![]() |
how can i edit the frecuency of this pop under?
hi this is a java cookie ublockable pop unders it opens once a day
how can i change the frecuency to open every 10 minutes? hope you guys can help me, i have change the 1 days to many things without luck... var stagedPopFrequency = "1 days"; var stagedCookieName = "__name"; if (!document.currentStage) document.currentStage = 0; document.currentStage++; if (document.currentStage == 1) { function stagedGetCookie(Name) { var search = Name + "="; var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search); if (offset != -1) { // if cookie exists offset += search.length; // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = document.cookie.length; returnvalue = unescape(document.cookie.substring(offset, end)); } } return returnvalue; } function stagedSetCookie(Name, Value, Expire) { if (Expire != null) { var expireDate = new Date(); expireDate.setDate(expireDate.getDate() + parseInt(Expire)); document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString(); } else { document.cookie = Name+"="+Value+";path=/"; } } function stagedResetCookie(Name) { var expireDate = new Date(); expireDate.setDate(expireDate.getDate() - 10); document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString(); } function stagedPopUnder() { if (stagedGetCookie(stagedCookieName) == '') { var thisStage = 1; var stageFunc = eval('window.popUnderStage'+thisStage); if (stageFunc != undefined) { stageFunc(); stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency); } } else { var thisStage = parseInt(stagedGetCookie(stagedCookieName)); var stageFunc = eval('window.popUnderStage'+thisStage); if (stageFunc != undefined) { stageFunc(); stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency); } } } function stagedAttachBody() { if (document.body) { if (document.all) { document.body.attachEvent('onclick', stagedPopUnder); } else { document.body.addEventListener('click', stagedPopUnder, false); } } else { setTimeout('stagedAttachBody()', 200); } } stagedAttachBody(); } if( parseInt(navigator.appVersion) > 3 ) { winWidth = screen.availWidth; winHeight = screen.availHeight; } else { winWidth = "1024"; winHeight = "768"; } var stagedTmpFunc = function() { var pu = window.open("https://youtube.com/watch?v=BRdq0GdkqlE", "_blank", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=1,resizable=1,menubar=1"); pu.blur(); window.focus(); } eval('window.popUnderStage'+document.currentStage+ ' = stagedTmpFunc;'); stagedTmpFunc = null; |
:pimp no one knows about java? :pimp
|
Quote:
|
Quote:
Code:
var stagedPopFrequency = "1 days"; Code:
var stagedPopFrequency = "10 mins"; |
Quote:
|
Quote:
|
Quote:
Um, nope, that's not gonna work. The set expire date is using getdate() which returns the day of the month PLUS the integer value in the frequency string to compute the new expire date. It is pretty much hard coded to use a days value. Quote:
|
Where you have this:
Quote:
Change to: Quote:
You do not need to say days or minutes or anything in there actually, the script is only using the integer part. The code is also using toGMTString which is deprecated and should be changed to toUTCString This is still not a wonderful solution in my mind because now it is hardcoded for minutes instead of days as it was before. If you truly wanted this to use the passed in value 1 days, 1 hours, 1 minutes,.... where you could set it however you wanted on the fly it would take some additional work. . |
Quote:
please help me out i just want to promote a music video of my daugther with this pop. thanks! var stagedPopFrequency = "1 minutes"; var stagedCookieName = "__name"; if (!document.currentStage) document.currentStage = 0; document.currentStage++; if (document.currentStage == 1) { function stagedGetCookie(Name) { var search = Name + "="; var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search); if (offset != -1) { // if cookie exists offset += search.length; // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = document.cookie.length; returnvalue = unescape(document.cookie.substring(offset, end)); } } return returnvalue; } function stagedSetCookie(Name, Value, Expire) { if (Expire != null) { var expireDate = new Date(); expireDate.setMinutes(expireDate.getMinutes() + parseInt(Expire)); document.cookie = Name+"="+Value+";path=/;expires=" + expireDate.toGMTString(); } else { document.cookie = Name+"="+Value+";path=/"; } } function stagedResetCookie(Name) { var expireDate = new Date(); expireDate.setMinutes(expireDate.getMinutes() - 10); document.cookie = Name+"=;path=/;expires=" + expireDate.toGMTString(); } function stagedPopUnder() { if (stagedGetCookie(stagedCookieName) == '') { var thisStage = 1; var stageFunc = eval('window.popUnderStage'+thisStage); if (stageFunc != undefined) { stageFunc(); stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency); } } else { var thisStage = parseInt(stagedGetCookie(stagedCookieName)); var stageFunc = eval('window.popUnderStage'+thisStage); if (stageFunc != undefined) { stageFunc(); stagedSetCookie(stagedCookieName, thisStage + 1, stagedPopFrequency); } } } function stagedAttachBody() { if (document.body) { if (document.all) { document.body.attachEvent('onclick', stagedPopUnder); } else { document.body.addEventListener('click', stagedPopUnder, false); } } else { setTimeout('stagedAttachBody()', 200); } } stagedAttachBody(); } if( parseInt(navigator.appVersion) > 3 ) { winWidth = screen.availWidth; winHeight = screen.availHeight; } else { winWidth = "1024"; winHeight = "768"; } var stagedTmpFunc = function() { var pu = window.open("https://youtube.com/watch?v=BRdq0GdkqlE", "_blank", "width=" + winWidth + ",height=" + winHeight + ",scrollbars=1,resizable=1,menubar=1"); pu.blur(); window.focus(); } eval('window.popUnderStage'+document.currentStage+ ' = stagedTmpFunc;'); stagedTmpFunc = null; |
Quote:
. |
I have set up a test page and the script appears to work as expected to me.
You have the interval set for 1 minute and I am seeing a popunder that triggers if I wait a minute between and does not trigger if less than a minute between. The popunder is triggered by the first click into the page. That is how your script is set up so it does not happen on page load but rather one click in. My testpage is at http://www.madspiders.com/testpop.htm I have it spitting out some debug code showing what is going on in the script. It may change some because I am still screwing around mapping the whole mess out. |
Quote:
how you did it dude? |
Quote:
. |
maybe i am doing something wrong... i save the script as pop.js i upload the file to my root directory and them embed the pop in my website like this <script type="text/javascript" src="http://www.blapage.com/pop.js"></script>
are you doing it in a diferent way? |
Quote:
I changed my test page around and it is now set up just the way you described and it still seems to work. If you post the url of the page you are trying to make work I can take a look. Or send it to me in icq, I saw you added me. I always show as offline so just send it if you don't want to post it. . |
Quote:
|
Quote:
. |
Incredible. How about "10 minutes" vs "10 mins".
I was trying to give a lesson. Depressing. :( |
Quote:
. |
Bumping this because you are just what your user title says (sarettah)...everyone here needs to be somewhat of a web person...programmer, whatever. It's for the best. Can't believe it took me this long to see your BS comment. You are depressing and lost here.
|
depressing and lost are synonyms for witty, smart as hell and incredibly helpful/generous with his time, right? :)
|
Quote:
Quote:
Quote:
|
Quote:
Quote:
The code needed to change before you could use anything other than a day or(days) value, as I said in the discussion. If your solution had been correct I would probably have left this thread alone, I had bypassed it several times prior to answering. I answered because i saw bad info being given. Now, go fuck yourself you stupid little assfuck. . |
Quote:
;p |
All times are GMT -7. The time now is 03:45 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc