1 2window._taboola = window._taboola || []; 3_taboola.push({article:'auto'}) 4; 5!function (e, f, u, i 6) { 7 if (!document.getElementById(i)){ 8 e.async = 1; 9 e.src = u; 10 e.id = i; 11 f.parentNode.insertBefore(e, f); 12 } 13}(document.createElement('script'), 14 document.getElementsByTagName('script')[0], 15 '//cdn.taboola.com/libtrc/montanaoutdoor/loader.js', 16 'tb_loader_script' 17) 18; 19if (window.performance && typeof window.performance.mark == 'function' 20) 21{window.performance.mark('tbl_ic');} 22 23jQuery(document).ready(function () { 24 $ = jQuery; 25 $('body').addClass('test'); 26 (function (i, s, o, g, r, a, m) { 27 i['GoogleAnalyticsObject'] = r; 28 i[r] = i[r] || function () { 29 (i[r].q = i[r].q || []).push(arguments) 30 }, i[r].l = 1 * new Date(); 31 a = s.createElement(o), 32 m = s.getElementsByTagName(o)[0]; 33 a.async = 1; 34 a.src = g; 35 m.parentNode.insertBefore(a, m) 36 })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); 37 38 function getUrlVars() { 39 var vars = {}; 40 var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) { 41 vars[key] = value; 42 }); 43 return vars; 44 } 45 46 ga('create', 'UA-23373718-2', 'auto'); 47 // ga('send', { 48 // 'hitType': 'event', // Required. 49 // 'eventCategory': 'Popularity', // Required. 50 // 'eventAction': 'NEW WEBSITE', 51 // 'eventLabel': 'NEW WEBSITE VISITOR', 52 // 'eventValue': 1 53 // }); 54 55 // let indicatorPosition = $('#more-posts').offset().top -500; 56 // console.log("indicators initial position:", indicatorPosition); 57 // 58 // var myFunction = function(){ 59 // 60 // load_posts('',1,0) 61 // console.log("call me only once"); 62 // 63 // 64 // 65 // } 66 // let check = 1 67 // $(window).scroll(function(){ 68 // var totalScroll = $(window).scrollTop(); 69 // if (totalScroll > indicatorPosition) { 70 // if(check === 1){ 71 // myFunction(); 72 // check++ 73 // } 74 // // if(check === 2){ 75 // // myFunction(); 76 // // check++ 77 // // } 78 // // if(check === 3){ 79 // // myFunction(); 80 // // check++ 81 // // } 82 // }}) 83 84 85 86 let page = 0; 87 88 load_posts = function (category_name, page, ppp) { 89 page++; 90 var str = '&category_name=' + category_name + '&page_number=' + page + '&ppp=' + ppp + '&action=more_post_ajax'; 91 $.ajax({
92 type: "POST", 93 dataType: "html", 94 url: '/wp-admin/admin-ajax.php', 95 data: str, 96 success: function (data) { 97 var $data = $(data); 98 if ($data.length) { 99 ga('send', 'pageview'); 100 ga('send', { 101 'hitType': 'event', // Required. 102 'eventCategory': 'Popularity', // Required. 103 'eventAction': 'more posts ajax', // Required. 104 'eventLabel': 'more posts ajax', 105 'eventValue': 1 106 }); 107 $("#ajax-posts").append($data); 108 $("#more_posts").attr("disabled", false); 109 } else { 110 $("#more_posts").attr("disabled", true); 111 } 112 113 // $('.anotherPost:last-child').after('<div class="adSpot new" data-placement="top-right-tile"></div>'); 114 115 setTimeout(function(){ 116 morsAds("https://ads.montanaoutdoor.com/"); 117 },100) 118 119 }, 120 error: function (jqXHR, textStatus, errorThrown) { 121 // $("#ajax-posts").before(jqXHR + " :: " + textStatus + " :: " + errorThrown); 122 } 123 124 }); 125 126 127 128 129 return false; 130 131 } 132 133 let thePage = 2 134 $(".loadMorePosts").on("click", function () { // When btn is pressed. 135 $(".loadMorePosts").attr("disabled", true); // Disable the button, temp. 136 137 load_posts('', thePage, 5); 138 thePage++ 139 140 console.log('load posts'); 141 ga('send', { 142 'hitType': 'event', // Required. 143 'eventCategory': 'Popularity', // Required. 144 'eventAction': 'more posts BUTTON', // Required. 145 'eventLabel': 'more posts BUTTON', 146 'eventValue': 1 147 }); 148 }); 149 150 morsAds = function (url) { 151 var adUrl = url 152 $.each($('.adSpot.new,.morsAdSpot.new'), function (a, b) { 153 $(this).removeClass('new'); 154 var thePlacement = $(b).attr('data-placement'); 155 lastclient = 'none'; 156 157 $.get(adUrl + 'api/placements/' + thePlacement, function (resp) { 158 //console.log(resp.adImage || false) 159 if (resp) { 160 var AdImage = resp.adImage.location 161 162 AdImage = '<a class=' + thePlacement + ' href="' + resp.url + '"><img src="' + AdImage + '"></a>' 163 $(b).addClass(resp.ad.placements).html(AdImage) 164 //console.error('same image',resp.ad.client); 165 } 166 }) 167 168 }) 169 } 170//oldAdServer(); 171 // morsAds('https://morsads6.meteorapp.com/'); 172 173 174 175// featuredAgent = function () { 176// $.get('https://www.montanaoutdoor.com/wp-json/mas/v1/agent', function (agent) { 177// var htmlObj = '<div class="col-xs-12 sfAgent text-center"><div class="panel panel-default"><div class="panel-heading"><img src="https://static1.st8fm.com/en_US/content_pages/1/img/navigation/img_sfus_primary-nav-logo.png" alt=""/> <div class="agentF">Featured Agent</div></div><div class="panel-body"><p class="agentImage"><img src="' + agent.image + '"></p><h4><b>' + agent.name + '</b></h4><p class="lead">' + agent.city + '</p><p>' + agent.phone + '</p></div><div class="panel-footer"><a target="_blank" class="btn btn-danger btn-block" href="' + agent.url + '">Open Agent Page</a><a class="btn btn-default btn-block" href="/state-farm-featured-agents">View All Agents <i class="fa fa-users"></i></a></div></div></div>' 178// //$('.statefarm-widgeter').html(htmlObj); 179// console.log(agent) 180 181// $('.sfImage').attr('src', agent.image) 182// $('.sfName').text(agent.name) 183// $('.sfCity').text(agent.city) 184// $('.sfPhone').text(agent.phone) 185// $('.sfLink').attr('href', agent.url); 186// $('.sfButton').attr('href', agent.url); 187// // console.log(agent) 188// }) 189// } 190// featuredAgent(); 191//morsAds('http://localhost:9400/'); 192 193 194}) 195; 196 197 198// test 199 200 201 202 203 204 205
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.