[Geomoose-users] bypassing disclaimer.js

Dan Little theduckylittle at gmail.com
Fri Jun 23 08:10:17 PDT 2017


I get what you're going for but the original idea was to make it so that
Dialog was not by-passable. Right now the disclaimer shows up everytime a
user reloads the page (assuming you're using the built-in disclaimer
extension).  You could add a line of code that checks either cookies or
localStorage to see if the dialog has been shown before and if so, do not
show the dialog.

- https://developer.mozilla.org/en-US/docs/Web/API/Storage/LocalStorage

so...

var seen_it = localStorage.getItem('seen_it');
if(seen_it != 'yup') {
 alert(...);
 localStorage.setItem('seen_it', 'yup');
}

That would at least mean all first time users and outside users are forced
to agree to the dialog.  And when you update the disclaimer or just want to
make sure people have looked at the disclaimer recently, you change "yup"
to "definitely" or some other value as it would invalidate the test even
for those who have "seen_it" set.


On Fri, Jun 23, 2017 at 8:39 AM, Mark Volz <MarkVolz at co.lyon.mn.us> wrote:

> Hello,
>
>
>
> We currently are using disclaimer.js.  Recently one of our cities asked if
> there is a way to hide the disclaimer from displaying to certain users.  Is
> there a way to hide the disclaimer from some users such as:
> http://mygeomoosesite.com/geomoose.html?showdisclaimer=false
>
>
>
> Some thoughts I had:
>
> ·         I wonder if I can do this through javascript (and if so what
> would be the best approach)
>
> ·         If not I could possibly just copy the html file and hack off
> the reference to disclaimer.js
>
> Please let me know if you have any suggestions on how I can bypass
> disclaimer.js for certain users.
>
>
>
> Thank You!
>
>
>
> Sincerely,
>
> *Mark Volz, GISP*
>
> *Lyon County GIS Coordinator*
>
> 504 Fairgrounds Rd
> <https://www.google.com/maps/?daddr=504%20Fairgrounds%20Rd,%20Marshall,%20MN%2056258?z=6>
>
> Marshall, MN 56258
> <https://www.google.com/maps/?daddr=504%20Fairgrounds%20Rd,%20Marshall,%20MN%2056258?z=6>
>
> Ph:  (507) 532-8218
>
> Fax: (507) 532-8217
>
> http://lyonco.org/
>
> http://geomoose.lyonco.org/
>
>
>
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20170623/904dc731/attachment-0001.html>


More information about the Geomoose-users mailing list