PageSourceSearch

https://www.natqc.com/wp-content/plugins/ecwid-shopping-cart/js/dynamic-title.js?ver=1788358939

js natqc.com collected 2026-09-24 09:56:33 UTC 1,420 bytes, 41 lines download raw bytes

1jQuery(document).ready(function() {
2    if ( jQuery( '.entry-title, .wp-block-post-title' ).length > 0 && typeof Ecwid !== 'undefined' ) {
3        Ecwid.OnPageLoaded.add(function(page) {
4            
5            var alreadyFoundEl = jQuery('h1[data-ecwid-found-title]');
6            var el = false;
7            
8            if ( alreadyFoundEl .length > 0 ) {
9                el = alreadyFoundEl;
10            } else {
11                el = jQuery('h1').filter(
12                    function(idx, el) {
13                        if ( el.innerText == ecwidOriginalTitle.initialTitle ) 
14                            return true; 
15                    }
16                );
17                
18                if ( el.length > 0 ) {
19                    el.attr('data-ecwid-found-title', 'true');
20                }
21            }
22            
23            if ( el.length === 0 ) return;
24            
25            var isCategory = page.type === 'CATEGORY';
26            var isProduct = page.type === 'PRODUCT';
27
28            var isNotPbPage = !isCategory && !isProduct;
29            var isHomePage = isCategory && page.categoryId === 0;
30            
31            var newTitle = '';
32            if ( isNotPbPage || isHomePage ) {
33                newTitle = ecwidOriginalTitle.mainPageTitle;
34            } else {
35                newTitle = jQuery('title').html();
36            }
37            
38            el.html( newTitle );
39        });
40    }
41});

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.