1var _____WB$wombat$assign$function_____=function(name){return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name))||self[name];};if(!self.__WB_pmw){self.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10// commentluv 2.92.8 11jQuery(document).ready(function(){ 12 // get the form object and fields 13 var formObj = jQuery('#cl_post_title').parents('form'); 14 var urlObj = cl_settings['urlObj'] = jQuery("input[name='" + cl_settings['url'] + "']",formObj); 15 var comObj = cl_settings['comObj'] = jQuery("textarea[name='" + cl_settings['comment'] + "']",formObj); 16 var autObj = jQuery("input[name='" + cl_settings['name'] + "']",formObj); 17 var emaObj = jQuery("input[name='" + cl_settings['email'] + "']",formObj); 18 // setup localized object with temporary vars 19 cl_settings['url_value'] = urlObj.val(); 20 cl_settings['fired'] = 'no'; 21 // set event listener for textarea focus 22 comObj.focus(function(){ 23 cl_dostuff(); 24 }); 25 // set the event listener for the click of the checkbox 26 jQuery('#doluv').click(function(){ 27 jQuery('#lastposts').hide(); 28 if(jQuery(this).is(":checked")){ 29 // was unchecked, now is checked 30 jQuery('#mylastpost').fadeTo("fast",1); 31 cl_settings['fired'] = 'no'; 32 cl_dostuff(); 33 } else { 34 // was checked, user unchecked it so empty hidden fields in form 35 jQuery('input[name="cl_post_title"]').val(""); 36 jQuery('input[name="cl_post_url"]').val(""); 37 jQuery('#mylastpost').fadeTo("slow",0.3); 38 jQuery('#lastposts').empty(); 39 } 40 }); 41 // click event for last blog post link 42 jQuery('.cluv a').click(function(){ 43 var data = jQuery(this).attr('class').split(' '); 44 // store click count 45 jQuery.ajax({ 46 url: cl_settings['api_url'], 47 type: 'POST', 48 data: {'action': 'cl_ajax','cid': data[1],'_ajax_nonce':data[0],'cl_prem':jQuery(this).hasClass('p'),'url': jQuery(this).attr('href'),'do':'click'} 49 }); 50 jQuery(this).attr('target','_blank'); 51 return true; 52 }); 53 // hover event on heart 54 if(cl_settings['infopanel'] == "on"){ 55 jQuery('.heart_tip_box').mouseenter(heart_big); 56 } 57 // hide/show showmore 58 jQuery(document.body).click(function(){ 59 if(cl_settings['lastposts'] == 'showing'){ 60 jQuery('#lastposts').slideUp('',function(){cl_settings['lastposts'] = 'not'}); 61 } 62 }); 63 jQuery('#showmorespan img').click(function(){ 64 if(cl_settings['lastposts'] == 'not'){ 65 jQuery('#lastposts').slideDown('',function(){cl_settings['lastposts'] = 'showing'}); 66 } 67 }); 68 // clear hidden inputs on load 69 jQuery('#cl_post_title,#cl_post_url,#cl_prem').val(''); 70 // set click on anywhere closes info box 71 jQuery(document).click(heart_small); 72 // add info panel to page 73 jQuery("body").append('<span id="heart_tip_big" style="display: none;position:absolute; z-index: 1001; background-color: ' + cl_settings['infoback'] + '; color: ' + cl_settings['infotext'] + '; width: 62px;"></span>'); 74 // hover over to see raw file wrapper open 75 //jQuery('.rawfilewrap').live('hover',function(){ 76 jQuery('#commentluv').on('hover','.rawfilewrap',function(){ 77 jQuery('.rawfile').toggle(); 78 }); 79 80}); 81 82/** 83* checks everything is in place for doing stuff 84* returns string 'ok' if, um, ok 85*/ 86function cl_docheck(){ 87 // checkbox check 88 if(!jQuery('#doluv').is(':checked')){ 89 return 'not checked'; 90 } 91 var url = cl_settings['urlObj']; 92 var msg = jQuery('#cl_messages'); 93 msg.empty(); 94 url.removeClass('cl_error'); 95 // logged in user? 96 var nourlmessage = cl_settings['no_url_message']; 97 if(cl_settings['logged_in'] == '1'){ 98 nourlmessage = cl_settings['no_url_logged_in_message']; 99 } else { 100 // check if fb connect is active 101 if(!cl_settings['urlObj'].is(':visible') && typeof FB != 'undefined'){ 102 var invisurl = cl_settings['urlObj'].remove(); 103 var invismsg = jQuery('#cl_messages').remove(); 104 cl_settings['comObj'].after('<br><span id="invisurl">').after(invismsg); 105 jQuery('#invisurl').append('URL ').after(invisurl).append('</span>'); 106 } 107 108 } 109 // check that there is a value in the url field 110 if(url.val().length > 1){ 111 // is value just http:// ? 112 if(url.val().toLowerCase() == 'http://'){ 113 url.addClass('cl_error'); 114 cl_message(nourlmessage); 115 return; 116 } 117 // is the http:// missing? 118 if(url.val().toLowerCase().substring(0,7) != 'http://'){ 119 url.addClass('cl_error'); 120 cl_message(cl_settings['no_http_message']); 121 return; 122 } 123 } else { 124 // there is no value 125 url.addClass('cl_error'); 126 cl_message(nourlmessage); 127 return; 128 } 129 // if we are here, all is cool mon 130 return 'ok'; 131} 132/** 133* tries to fetch last blog posts for a url 134*/ 135function cl_dostuff(){ 136 if(cl_docheck() != 'ok'){ 137 return; 138 } 139 var url = cl_settings['urlObj'];
140 if(cl_settings['fired'] == 'yes'){ 141 // already fired, fire again if current url is different to last fired 142 if(url.val() == cl_settings['url_value']){ 143 return; 144 } 145 jQuery('#lastposts,#mylastpost').empty(); 146 } 147 // fire the request to admin 148 jQuery('#cl_messages').append('<img src="' + cl_settings['images'] + 'loader.gif' + '"/>').show(); 149 jQuery.ajax({ 150 url: cl_settings['api_url'], 151 type: 'post', 152 dataType: 'json', 153 data: {'url':url.val(),'action':'cl_ajax','do':'fetch','_ajax_nonce':cl_settings._fetch}, 154 success: function(data){ 155 if(data.error == ''){ 156 // no error, fill up lastposts div with items returned 157 jQuery('#cl_messages').empty().hide(); 158 jQuery.each(data.items,function(j,item){ 159 var title = item.title; 160 var link = item.link; 161 var count = ''; 162 jQuery('#lastposts').append('<span id="' + item.link + '" class="choosepost ' + item.type + '">' + title + '</span>'); 163 }); 164 // setup first link and hidden fields 165 jQuery('#mylastpost').html('<a href="' + data.items[0].link +'"> ' + data.items[0]['title'] + '</a>').fadeIn(1000); 166 jQuery('#cl_post_title').val(data.items[0].title); 167 jQuery('#cl_post_url').val(data.items[0].link); 168 jQuery('#cl_prem').val(data.items[0].p); 169 // setup look and show dropdown 170 jQuery('span.message').css({'backgroundColor':'#efefef','color':'black'}); 171 jQuery('#showmorespan img').show(); 172 if(cl_settings['comObj'].width() > jQuery('#commentluv').width()){ 173 var dropdownwidth = jQuery('#commentluv').width(); 174 } else { 175 var dropdownwidth = jQuery(cl_settings['comObj']).width(); 176 } 177 jQuery('#lastposts').css('width',dropdownwidth).slideDown('',function(){ cl_settings['lastposts'] = 'showing'}); 178 // bind click action 179 jQuery('.choosepost:not(.message)').click(function(){ 180 jQuery('#cl_post_title').val(jQuery(this).text()); 181 jQuery('#cl_post_url').val(jQuery(this).attr('id')); 182 jQuery('#mylastpost').html('<a href="' + jQuery(this).attr('id') +'"> ' + jQuery(this).text() + '</a>').fadeIn(1000); 183 }); 184 } else { 185 if(typeof(data.rawfile) == 'undefined'){ 186 data.rawfile = 'no raw data sent back'; 187 } 188 cl_message(data.error,data.rawfile); 189 } 190 }, 191 error: function(x,e){ 192 jQuery('#cl_messages img').remove(); 193 if(x.status==0){ 194 if(cl_settings['api_url'].indexOf('https') == 0){ 195 cl_message('This blog has set the api url to use https , the commentluv technical settings need to be changed for the API url to use http'); 196 } else { 197 cl_message('It appears that you are offline or another error occured contacting the API url, have you set it to use www or missed the www off the api url?? check the technical settings and add or remove www from the api url.'); 198 } 199 200 }else if(x.status==404){ 201 cl_message('API URL not found.'); 202 }else if(x.status==500){ 203 cl_message('Internal Server Error.' + x.responseText); 204 }else if(e=='parsererror'){ 205 cl_message('Error.\nParsing JSON Request failed.' + x.responseText); 206 }else if(e=='timeout'){ 207 cl_message('Request Time out.'); 208 }else { 209 cl_message('Unknow Error. ' + x.statusText + ' ' + x.responseText); 210 } 211 } 212 }); 213 // save what url used and that we checked already 214 cl_settings['fired'] = 'yes'; 215 cl_settings['url_value'] = url.val(); 216 217} 218/** 219* adds a message to tell the user something in the cl_message div and then slides it down 220* @param string message - the message to show 221*/ 222function cl_message(message,rawfile){ 223 jQuery('#cl_messages').empty().hide().text(message).slideDown(); 224 if(typeof(rawfile) != 'undefined'){ 225 jQuery('#cl_messages').append('<div class="rawfilewrap"><p>Hover your mouse here to see the data that CommentLuv got back from your site..<br />If you see a warning or other error message then that might help you locate the problem (maybe another plugin is spitting out an error?)</p><div class="rawfile"><pre>
225'+rawfile+'</pre></div></div>'); 226 } 227} 228function heart_big(e){ 229 // get url and data from link 230 linkspan = jQuery(this).parents(".cluv"); 231 var link = jQuery(linkspan).find("a:first").attr("href"); 232 var linkdata = jQuery('img',this).attr('class').split(' '); 233 234 // prepare call to admin 235 var url = cl_settings['api_url']; 236 var data = {'action':'cl_ajax','cid':linkdata[2],'cl_prem':linkdata[1],'link': link,'do':'info','_ajax_nonce':cl_settings._info}; 237 cl_prem = linkdata[1]; 238 // set up position 239 var position = jQuery(this).offset(); 240 var windowwidth = jQuery(window).width(); 241 windowheight = jQuery(window).height(); 242 var xpos = position.left; 243 ypos = position.top; 244 if(xpos + 350 > windowwidth){ 245 xpos = windowwidth - 370; 246 if(xpos < 0) xpos = 0; 247 } 248 249 // setup panel and show with loading background image 250 jQuery('#heart_tip_big').empty().css({'left':xpos + "px", 'top' :ypos + "px" }); 251 jQuery('#heart_tip_big').css("width","350px"); 252 jQuery('#heart_tip_big').addClass("finalbig").show().addClass('cl_ajax'); 253 // has this been shown before on this page? 254 if(typeof cl_settings[linkdata[2]] != 'undefined'){ 255 fill_panel(cl_settings[linkdata[2]]); 256 return; 257 } 258 // execute call to admin 259 jQuery.ajax({ 260 url: cl_settings['api_url'], 261 type: 'post', 262 data: data, 263 dataType: 'json', 264 success : function(data){ 265 if(typeof(data) == 'object' && jQuery('#heart_tip_big').is(':visible')){ 266 // acceptable response, populate panel 267 cl_settings[linkdata[2]] = data.panel; 268 fill_panel(data.panel); 269 } else { 270 jQuery('#heart_tip_big').removeClass('cl_ajax').html(cl_settings['no_info_message']); 271 } 272 jQuery('#heart_tip_big').mouseleave(heart_small); 273 } 274 }); 275} 276 277function fill_panel(html){ 278 jQuery('#heart_tip_big').removeClass('cl_ajax').html(html).show(); 279 if(cl_prem == 'p'){ 280 jQuery('#heart_tip_big p.cl_title').css('backgroundColor',cl_settings['infoback']); 281 } 282 // move panel if it extends below window 283 var ely = ypos - jQuery(document).scrollTop(); 284 var poph = jQuery('#heart_tip_big').height() + 20; 285 if(ely + poph > windowheight){ 286 var invis = poph - (windowheight - ely); 287 ypos -= invis; 288 if(ypos < 0) ypos = 0; 289 jQuery('#heart_tip_big').css('top',ypos); 290 } 291 return; 292} 293 294function heart_small(){ 295 if(!jQuery('body').find('.cl_ajax').is(':visible')){ 296 jQuery("body").find("#heart_tip_big").empty().hide(); 297 } 298 299} 300function do_nowt(){ 301 return; 302} 303 304}
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.