PageSourceSearch

https://www.compagniaitalianalubrificanti.com/view/js/products.js

js compagniaitalianalubrificanti.com collected 2026-10-07 20:44:49 UTC 1,975 bytes, 52 lines download raw bytes

1$(document).ready(function($) {
2
3    //when we came from search on home page we get the parameter from url
4    //If the parameter is present we load the product detail and exit.
5    //There's no need to do other action, as we don' have a list of filters
6    //and products.
7    var productCode = getParameterByName('productCode');
8
9    if(productCode){
10        loadDetailProduct(productCode);
11        return;
12    }
13
14    //when we came from home and we load the product controller
15    //we get the $_POST parameter received and saved in the input
16    //field activeMenuSection and activeMenuSubsection (on products.php).
17    //With this we can set the productsmenu opened, launch the pagination
18    //and attach the click event on filters and products
19    var sectionMenuSelected = "#" + $("#activeMenuSection").val();
20    var subsectionMenuSelected = "#" + $("#activeMenuSubsection").val();
21
22    $(sectionMenuSelected).addClass('dcjq-current-parent');
23    if(subsectionMenuSelected == "#" && sectionMenuSelected != "#"){
24        $(sectionMenuSelected + ' a:first').addClass('active');
25    }
26    $(sectionMenuSelected + ' a:first').addClass('selected');
27    $(subsectionMenuSelected).addClass('selected');
28
29    $('ul.pagination1').quickPagination({pagerLocation:"bottom",pageSize:"5"});
30    attachFiltersClick();
31    attachProductDetailClick();
32});
33
34
35
36//function used to get query string parameter.
37//With void PHP $_GET and echo. With this method we can
38//get the parameter for the search using, when we came from home,
39//and we don't mix javascript and PHP.
40function getParameterByName(name)
41{
42    name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
43    var regexS = "[\\?&]" + name + "=([^&#]*)";
44    var regex = new RegExp(regexS);
45    var results = regex.exec(window.location.search);
46
47    if (results === null)
48        return "";
49    else
50        return decodeURIComponent(results[1].replace(/\+/g, " "));
51}
52

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.