inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Feb 24, 2016 22:15:47 GMT -8
Okay, I looked around the docs and couldn't see anything about it, so I'd like to "cover my behind" before using this (flagging Tim Camara in case there's an official view on this). Question: Is there a required minimum duration for use in the setTimeout() that is needed to remain within PB's ToS for plugin development? I haven't used this before, but I'm working on adding it to one of my plugins (Random News). I just want to make sure it's not going to be in violation. Thanks!
|
|
inherit
201984
0
Sept 11, 2023 1:23:07 GMT -8
P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓
Using My Talents Elsewhere
3,314
November 2013
pastuleo23
|
Post by P̌̓aͧś̀t̀u͒le͆o͂2̀3̃̓ on Feb 25, 2016 1:45:09 GMT -8
Okay, I looked around the docs and couldn't see anything about it, so I'd like to "cover my behind" before using this (flagging Tim Camara in case there's an official view on this). Question: Is there a required minimum duration for use in the setTimeout() that is needed to remain within PB's ToS for plugin development? I haven't used this before, but I'm working on adding it to one of my plugins (Random News). I just want to make sure it's not going to be in violation. Thanks! Nah setTimeout isn't half as bad as setInterval and that is not against ToS. As long as it doesn't generate an ajax call to proboards servers or manipulate the ads it's good to go. I've used both in my approved plugins.
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Feb 25, 2016 5:12:00 GMT -8
Nah setTimeout isn't half as bad as setInterval and that is not against ToS. As long as it doesn't generate an ajax call to proboards servers or manipulate the ads it's good to go. I've used both in my approved plugins. "setInterval" is not bad, the problem comes down to the programmer using it without understanding the problem they might cause. "setInterval" is known for UI locking, and the reason for that is down to the logic inside that takes longer then the interval time. If you think your logic will take longer than the interval, then yes, don't use it. Instead use a recursive "setTimeout" or even better "requestAnimationFrame". developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFramedeveloper.mozilla.org/en-US/docs/Web/API/WindowTimers
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Feb 25, 2016 5:24:35 GMT -8
Thanks, guys! I plan on adding it to my Random News. New option to set delay in the UI, and then using setTimeout to run a new random newsfeed item (re-executing the function). The number that was entered in the UI would be multiplied by 1000 to make it that many seconds before getting another news item to display. EDIT: Peter - what happened to your avatar and images in your sig?
|
|
inherit
2671
0
May 14, 2013 14:40:03 GMT -8
Peter
🐺
10,615
February 2002
peter3
|
Post by Peter on Feb 25, 2016 5:31:30 GMT -8
Lynx , Hosting seems to be down. Edit: Condensed posts into this one. The reason for the images "going down", is that the hosting providers firewall IP blocked me and anyone that reads this thread. LOL. Am talking to them now to resolve it. Their firewall picked up "setTimeout" as a possible XSS vector in the referrer. It's a false positive, but now it bothers me if it happens to other keywords in the referrer. So yeah, anyone that read this thread before I made this post will have been IP blocked. Am waiting to hear back if it's a temp block or not. Edit: Fixed now. Annoying though.
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,824
January 2015
msg
|
Post by Lynx on Feb 25, 2016 5:39:31 GMT -8
Lynx, Hosting seems to be down. Bummer. Hopefully it'll be back up soon. Just looks ... weird ... without the avatar.
|
|
inherit
The Dream Crusher (Ret.)
164921
0
Apr 1, 2014 11:00:25 GMT -8
Tim Camara
Teach a man to fish, etc., etc.
1,721
March 2011
tcamara
|
Post by Tim Camara on Feb 25, 2016 8:19:45 GMT -8
|
|