PageSourceSearch

https://bacimilano.com.br/wp-content/plugins/woocommerce-products-…/url_request/js/url_parser.js?ver=3.3.4.4

js bacimilano.com.br collected 2026-10-06 04:45:56 UTC 3,267 bytes, 104 lines download raw bytes

1"use strict";
2
3function woof_get_submit_link() {
4    
5	//delete  seo text
6	jQuery('.woof_seo_text').remove();    
7    
8//filter woof_current_values values
9    if (woof_is_ajax) {
10        woof_current_values.page = woof_ajax_page_num;
11    }
12//+++
13    if (Object.keys(woof_current_values).length > 0) {
14        jQuery.each(woof_current_values, function (index, value) {
15            if (index == swoof_search_slug) {
16                delete woof_current_values[index];
17            }
18            if (index == 's') {
19                delete woof_current_values[index];
20            }
21            if (index == 'product') {
22//for single product page (when no permalinks)
23                delete woof_current_values[index];
24            }
25            if (index == 'really_curr_tax') {
26                delete woof_current_values[index];
27            }
28        });
29    }
30    //***
31    if (Object.keys(woof_current_values).length === 0) {
32        if (woof_is_ajax) {
33            history.pushState({}, "", woof_current_page_link);
34        }
35
36        let tmp_url = woof_current_page_link.split('/' + swoof_search_slug + '/');
37
38        return tmp_url[0];
39    }
40
41    let hash = window.location.hash;
42    let vars = window.location.search;
43    let url = woof_current_page_link.replace(new RegExp(/page\/(\d+)\//), "");
44    let tmp_url = url.split('/' + swoof_search_slug + '/');
45    let new_url = tmp_url[0];
46    var link = "";
47    if (new_url.slice(-1) != '/') {
48        new_url += '/';
49    }
50
51    let url_array = [];
52
53    const ordered_data = Object.keys(woof_current_values).sort().reduce(
54            (obj, key) => {
55        obj[key] = woof_current_values[key];
56        return obj;
57    }, {});
58    
59    for (let j in ordered_data) {
60        if (typeof url_parser_data.special[j] != 'undefined') {
61            url_array.push(url_parser_data.special[j]);
62        } else if (j == 'min_price' || 'max_price' == j) {
63            if (j == 'min_price') {
64                url_array.push('price-' + woof_current_values['min_price'] + '-to-' + woof_current_values['max_price']);
65            }
66        } else if (typeof url_parser_data.filters[j] != 'undefined') {
67            let request = woof_current_values[j] + '';
68            request = request.replaceAll(',', '-and-');
69            request = request.replaceAll('^', '-to-');
70            request = request.replaceAll(/\s+/g, '+');
71            url_array.push(url_parser_data.filters[j] + '-' + request);
72        }
73
74
75    }
76
77    let search_request_url = "";
78    if (url_array.length) {
79        search_request_url = swoof_search_slug + '/' + url_array.join('/') + '/';
80    }
81
82    if(typeof woof_current_values['orderby'] != 'undefined'){
83	let searchParams = new URLSearchParams(vars);
84	if (searchParams.has('orderby')) {
85	    searchParams.delete('orderby');
86	}
87	searchParams.append("orderby", woof_current_values['orderby']);
88	vars = "?" + searchParams.toString();	
89    }
90    link = new_url + search_request_url + vars + hash
91    link = link.replace(new RegExp(/page\/(\d+)\//), "");
92    if (woof_is_ajax) {
93
94        if (typeof woof_current_values.page != 'undefined' && woof_current_values.page > 1) {
95            link += 'page/' + woof_current_values.page + '/';
96        }
97
98        history.pushState({}, "", link);
99
100    }
101
102    return link;
103}
104

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.