1$("<img/>")[0].src = fgrAjax.loader; 2 3$(".user_vote").click(function (e) { 4 e.preventDefault(); 5 trackid = $(this).attr("data-track_id"); 6 nonce = $(this).attr("data-nonce"); 7 todo = $(this).attr("data-todo"); 8 removeText = $(this).attr("data-removetext"); 9 text = $(this).attr("data-text"); 10 $item = $(this); 11 $item.html('<img src="' + fgrAjax.loader + '" />'); 12 13 $.ajax({ 14 type: "post", 15 dataType: "json", 16 url: fgrAjax.ajaxurl, 17 data: { 18 action: "my_user_vote", 19 trackid: trackid, 20 todo: todo, 21 nonce: nonce, 22 }, 23 success: function (response) { 24 var txt; 25 if (todo == "played" && response.status == "removed") { 26 $(".sidebar_wishlist").show(); 27 } 28 if (response.status == "added") { 29 txt = removeText; 30 if (todo == "played") $(".sidebar_wishlist").hide(); 31 } else txt = text; 32 33 if (response.type == "success") { 34 $item.parent().find(".vote_counter").html(response.vote_count); 35 $item.html(txt); 36 } else { 37 alert("ATK. Joskus se toimii, joskus ei. Nyt ei. Sori."); 38 } 39 }, 40 }); 41}); 42 43if (window.location.hash && window.location.hash == "#_=_") { 44 if (window.history && history.pushState) { 45 window.history.pushState("", document.title, window.location.pathname); 46 } else { 47 // Prevent scrolling by storing the page's current scroll offset 48 var scroll = { 49 top: document.body.scrollTop, 50 left: document.body.scrollLeft, 51 }; 52 window.location.hash = ""; 53 // Restore the scroll offset, should be flicker free 54 document.body.scrollTop = scroll.top; 55 document.body.scrollLeft = scroll.left; 56 } 57}
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.