[PrivacyBadger] Need help to retrieve element

Aditi Bhatnagar aditi24.bhatnagar at gmail.com
Fri Nov 13 23:18:48 PST 2015


Hi !

I need to do updateOrigin without actually moving the slider, as in , I am
identifying what all origins are green (noaction) presently and then
setting cookieblock for them that is turning them yellow.Since no event is
externally  caused, I need to pick up the right element which is done like *var
$elm= $('label[for="' + event.currentTarget.id
<http://event.currentTarget.id> + '"]'); *in updateOrigin.
What would be a good way to retrieve this element in this case? Given that
I have list of the all the allowed origins that need to be turned yellow.

I tried code like the one below, so as to get the right element from which
corresponding switchContainer and clicker can be retrieved, but it does not
seems  to work.




* var elms = document.getElementsByClassName("clicker tooltip
noaction"); console.log(elms[0].getAttribute("data-origin")) var on=
elms[0].getAttribute("data-origin").replace(".","-") var $elm =
$('label[for=" noaction-' + on + '"]');*


Any suggestions?

Thanks
Aditi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.eff.org/pipermail/privacybadger/attachments/20151114/328acc34/attachment.html>


More information about the PrivacyBadger mailing list