PageSourceSearch

https://www.die-contra.de/wp-content/plugins/dbtr_integration/assets/js/ajax.js?ver=1.0.0

js die-contra.de collected 2026-09-25 05:16:48 UTC 2,986 bytes, 105 lines download raw bytes

1
2jQuery(document).ready(function() {
3    let urlParams = new URLSearchParams(window.location.search);
4
5
6
7    
8    
9    
10
11    // Wenn 'dbtr' in der URL ist, speichern Sie es im Local Storage und Session Storage
12if (urlParams.has('dbtr')) {
13    var newDbtrValue = urlParams.get('dbtr');
14    
15    // Alten Wert im Local Storage und Session Storage löschen
16    localStorage.removeItem('dbtr');
17    sessionStorage.removeItem('dbtr');
18    
19    // Neuen Wert setzen
20    localStorage.setItem('dbtr', newDbtrValue);
21    sessionStorage.setItem('dbtr', newDbtrValue);
22
23    jQuery('a').each(function(){
24        this.href = this.href.replace('dbtr_shortcode', newDbtrValue);
25    });
26
27
28} else if (localStorage.getItem('dbtr')) {
29    var localDbtr = localStorage.getItem('dbtr');
30    var sessionDbtr = sessionStorage.getItem('dbtr');
31    console.log(localDbtr);
32    console.log(sessionDbtr);
33    console.log(my_ajax_object['ajax_url']);
34    if (localDbtr) {
35        console.log("TEST 1");
36        // Hier AJAX verwenden, um den Wert von localDbtr an PHP zu senden
37        jQuery.ajax({
38            url: my_ajax_object['ajax_url'], // AJAX-URL in WordPress
39            type: 'POST',
40            dataType: 'json',
41            data: {
42                action: 'save_dbtr_as_cookie', // Der Name des AJAX-Handlers
43                dbtr: localDbtr // Der Wert, den Sie senden möchten
44            },
45            success: function(response) {
46                // Verarbeiten Sie die Antwort von PHP hier
47                console.log(response);
48            },
49            error: function(error) {
50                console.error('Fehler beim Senden von dbtr an PHP:', error);
51            }
52        });
53    } else {
54
55        console.log("TEST 2");
56        // Hier AJAX verwenden, um den Wert von localDbtr an PHP zu senden
57        jQuery.ajax({
58            url: my_ajax_object['ajax_url'], // AJAX-URL in WordPress
59            type: 'POST',
60            dataType: 'json',
61            data: {
62                action: 'save_dbtr_as_cookie', // Der Name des AJAX-Handlers
63                dbtr: sessionDbtr // Der Wert, den Sie senden möchten
64            },
65            success: function(response) {
66                // Verarbeiten Sie die Antwort von PHP hier
67                console.log(response);
68            },
69            error: function(error) {
70                console.error('Fehler beim Senden von dbtr an PHP:', error);
71            }
72        });
73    }
74}
75
76
77    if (localDbtr) {
78        jQuery('a').each(function(){
79            this.href = this.href.replace('dbtr_shortcode', localDbtr);
80        });
81    }else{
82    }
83
84    if(sessionDbtr){
85        jQuery('a').each(function(){
86            this.href = this.href.replace('dbtr_shortcode', sessionDbtr);
87        });
88    }
89    else{
90
91    }
92
93
94    
95    if(typeof localDbtr === "undefined" && typeof sessionDbtr === "undefined"){
96        jQuery('a').each(function(){
97            this.href = this.href.replace('dbtr_shortcode', '');
98        });
99    }
100
101    
102
103    
104    
105})

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.