From 36aa3e8385fd0c34b415ce7bd7659eb87b99731f Mon Sep 17 00:00:00 2001 From: Irfaq Syed Date: Thu, 15 Oct 2020 04:00:06 +0530 Subject: [PATCH] Refactor --- geoip-target-filter.html | 62 ++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/geoip-target-filter.html b/geoip-target-filter.html index af2ee00..07a2275 100644 --- a/geoip-target-filter.html +++ b/geoip-target-filter.html @@ -1,39 +1,39 @@ - - Redirecting... - + // ------------------------------------------------------ + // DON'T EDIT THE BELOW CODE UNLESS REQUIRED + // ------------------------------------------------------ + /** + * Check if the visitor is from targeted country, Redirect to target URL. + * Otherwise to non-target URL. + */ + function geoip(g){window.top.location.href=inArray(g.country,filter)?targetVisitorsUrl:allVisitorsUrl} + function inArray(r,n){for(var t=n.length,e=0;t>e;e++)if(n[e]==r)return!0;return!1} + +

Please wait...