(function() { var temp = '[[169912,"homedepot.com",156074,8154],[189823,"containerstore.com",156074,24840],[201918,"www.joann.com/",156085,101106235],[156813,"walmart.com",156074,9383],[161558,"acehardware.com",156074,9988],[225583,"petsmart.com/",156074,11083],[234985,"www.bighammerwines.com/",24,234985]]'; if (temp.length != 0) { var text = temp.replace(/"/g, '\"'); text = text.replace(/\s/g, ''); text = JSON.parse(text); var flex_convert_domains = text; var flex_user_id = 1222879; var fcd_len = flex_convert_domains.length; var atags = document.getElementsByTagName("a"), len = atags.length; while (len--) { for (i = 0; i < fcd_len; i++) { var do_break = false; var domains = flex_convert_domains[i][1].split("|"); for ( j = 0; j < domains.length; j++ ) { var du = new URL("http://" + domains[j]); if ((atags[len].host == du.host || atags[len].host == 'www.' + du.host ) && (du.pathname.length <= 1 || atags[len].pathname.startsWith(du.pathname))) { atags[len]["href"] = "https://track.flexlinks.com/g.ashx?foid=" + flex_convert_domains[i][2]+ "." + flex_convert_domains[i][3] +"&trid="+flex_user_id+"."+flex_convert_domains[i][0] + "&foc=19&fot=9999&fos=6" + "&url=" + encodeURIComponent(atags[len]["href"]); do_break = true; break; } } if (do_break) { break; } } } } })();