PageSourceSearch

https://www.growcfo.net/wp-content/plugins/if-so-geolocation/assets/js/if-so-geolocation-public.js?ver=7.1.2

js growcfo.net collected 2026-10-02 15:07:31 UTC 1,978 bytes, 58 lines download raw bytes

1
2(function( $ ) {
3    $(document).ready(function () {
4        checkForLocationRequests();
5        document.addEventListener('ifso_ajax_content_loaded',checkForLocationRequests);
6    })
7
8    function checkForLocationRequests(){
9        if(typeof(ifso_scope.getCookie)==='undefined') return;
10        var getLocationTags = $('IfsoGetBrowserLocation');
11        if(getLocationTags.length>0){
12            for(tag of getLocationTags){
13                if(tag.getAttribute('ignore_cache')==='true' || (!hasAnyOverrideData()) ){
14                    getBrowserGeolocation();
15                    return;
16                }
17            }
18        }
19        if(ifso_scope.getCookie(requestBrowserLocCookieName)!==null && !hasAnyOverrideData()){
20            getBrowserGeolocation();
21            ifso_scope.createCookie(requestBrowserLocCookieName,'',-1);
22            return;
23        }
24
25    }
26
27    function getBrowserGeolocation() {
28        if (navigator.geolocation) {
29            navigator.geolocation.getCurrentPosition(rememberPosition);
30        }
31    }
32
33    function hasAnyOverrideData(){
34        return (hasGeoOverrideData(geoOverrideCookieName) || hasGeoOverrideData(browserLocationCookieName));
35    }
36
37    function hasGeoOverrideData(cname){
38        if(ifso_scope.getCookie(cname)){
39            try{
40                var geoOverrideObj = JSON.parse(ifso_scope.getCookie(cname));
41                //if(typeof(geoOverrideObj.lat)!=='undefined' && typeof(geoOverrideObj.lat)!=='undefined')
42                return true;
43            }
44            catch {
45                return false;
46            }
47        }
48        return false;
49    }
50
51    function rememberPosition(position) {
52        var coordsString = position.coords.latitude + ',' + position.coords.longitude;
53        var geoObject = {lat:position.coords.latitude,long:position.coords.longitude};
54        ifso_scope.createCookie(browserLocationCookieName,JSON.stringify(geoObject),0);
55        window.location.reload();
56    }
57})(jQuery);
58

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.