PageSourceSearch

https://static.pennergame.de/js/pv4/ajax_v4.js

js pennergame.de collected 2026-10-01 13:09:22 UTC 4,027 bytes, 100 lines download raw bytes

1function LoadAjax() {
2    http_request = false;
3    if (window.XMLHttpRequest) { 
4        http_request = new XMLHttpRequest();
5    } else if (window.ActiveXObject) { 
6        try {
7            http_request = new ActiveXObject("Msxml2.XMLHTTP");
8        } catch (e) {
9            try {
10                http_request = new ActiveXObject("Microsoft.XMLHTTP");
11            } catch (e) {}
12        }
13    }
14    if (!http_request) {
15        return false;
16    }
17    return http_request;
18}
19
20function ProvocationRequest(url) {
21    http = LoadAjax();
22    http.open('GET', url, true);
23    http.send(null);
24}
25
26function CloseProvocation(uid) {
27    document.getElementById('provocation_note').style.visibility = 'hidden';
28    document.getElementById('provocation_text').style.visibility = 'hidden';
29    if(uid){
30        ProvocationRequest("/provocation/close/" + uid + "/");
31    }
32}
33
34function ShowAlert(text){
35    if(!document.getElementById('provocation_text')){
36        document.getElementById('provocation_area').innerHTML += '<form name="prov_form"><div id="provocation_note"><a class="close" href="#" onclick="CloseProvocation();"><img src="https://static.pennergame.de/img/pv4/premiummedia/img/premium/provocation/provocation_note_close.png" border="0"></a><div id="provocation_text" class="provocation_text"><div class="prov_links"></div></div></div></form>';
37    }
38    if(text=='no_provocations'){
39        text = _("Du hast keine Provokationen mehr über!") + '<br/><a href="/itemsale/">' + _("Neue Provokationen kaufen") + '</a>'
40    }
41    document.getElementById('provocation_text').innerHTML = text;
42    document.getElementById('provocation_text').style.visibility = 'visible';
43    document.getElementById('provocation_note').style.visibility = 'visible';
44
45}
46
47function ShowPopup(text){
48    if(document.getElementById('lightbox')){
49        document.getElementById('lightbox').innerHTML = '<a class="close" onclick="CloseAlert();"><img src="https://static.pennergame.de/img/pv4/premiummedia/img/premium/provocation/provocation_note_close.png" border="0"></a><center><span class="text">' + text + '</span></center>';
50        document.getElementById('provocation_message').style.visibility = 'visible';
51        document.getElementById('lightbox').style.visibility = 'visible';
52    }else{
53    	document.getElementById('fix').innerHTML += '<div id="provocation_message"></div><div id="lightbox"><a class="close" onclick="CloseAlert();"><img src="https://static.pennergame.de/img/pv4/premiummedia/img/premium/provocation/provocation_note_close.png" border="0"></a><center>
53' + text + '</center></div>';
54    }
55}
56
57function Provoke(self,uid,item,alert){
58    if(!item){
59        item = document.prov_form.prov_selection.value;
60    }
61    http = LoadAjax();
62    http.open('GET', "/provocation/create/" + uid + "/" + item + "/", true);
63    http.send(null);
64    http.onreadystatechange = function(){
65        if(http.readyState==4){
66            var response = http.responseText;
67            if(response){
68                ProvocationRequest("/provocation/close/" + self + "/");
69                if(alert=="popup"){
70                    ShowPopup(response);
71                }else{
72                    ShowAlert(response);
73                }
74            }else{
75                alert("Error");
76            }
77        }
78    }  
79} 
80
81function ProvokeForm(self,uid,item,alert){
82    scroll(0,0);
83    http = LoadAjax();
84    http.open('GET', "/provocation/ajax/itemlist/", true);
85    http.send(null);
86    http.onreadystatechange = function(){
87    if(http.readyState==4){
88        var itemlist = http.responseText;
89        if(itemlist){
90            var text = '<select name="prov_selection">' + itemlist + '</select></div><div class="prov_links"><center><a class="prov_start" href="#" onclick="Provoke('+self+','+uid+');"></a></center>'; 
91            ShowAlert(text);
92        }
93    }
94    }
95}
96
97function CloseAlert() {
98    document.getElementById('provocation_message').style.visibility = 'hidden';
99    document.getElementById('lightbox').style.visibility = 'hidden';
100}

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.