Created
July 6, 2016 00:48
-
-
Save Danyboy/298e134cdee40499d8c0e58b64f0eaf4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function libRB(libnow) { | |
| cnt++; | |
| var tm = new Date; tm = tm.getTime(); | |
| if (libnow != 1 && tm - ltm < 1555) { setTimeout(libRB, 333); return; } //были недавно, зайдите попозже. | |
| ltm = tm; | |
| var par = ""; | |
| if (page) par = "page="+page+"&"; | |
| var a = ["t", "g", "ln", "fn", "mn", "s1", "s2", "e", "lng"]; | |
| for (var i in a) { | |
| var q = jQuery("#"+a[i]).val(); | |
| if (q) par += a[i] + "=" + encodeURI(q) + "&"; | |
| } | |
| jQuery("input[@type=radio][@checked]").each(function(i){par += this.value + "=1&"}); | |
| if (jQuery("#sa[@checked]").val()) par += "sa=1&"; | |
| if (jQuery("#rd[@checked]").val()) par += "rd=1&"; | |
| if (libnow != 1 && lp1 != par) {//прошлый раз просили не это. Еще не определились. Зайдите попозже. | |
| lp1 = par; | |
| setTimeout(libRB, 1111); | |
| return; | |
| } | |
| if (lp != par) { | |
| jQuery("#books").html("<p>грузим...</p>"); | |
| jQuery.get("/makebooklist?"+par+"'.$ab.'", function(r){ jQuery("#books").html(t1+r+t2); } ) | |
| lp = par; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment