PluginProbe ʕ •ᴥ•ʔ
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) / 9.5.9
Really Simple Security – Simple and Performant Security (formerly Really Simple SSL) v9.5.9
9.5.11 9.5.10.1 9.5.10 trunk 9.4.0 9.4.1 9.4.2 9.4.3 9.5.0 9.5.0.1 9.5.0.2 9.5.1 9.5.2 9.5.2.2 9.5.2.3 9.5.3 9.5.3.1 9.5.3.2 9.5.4 9.5.5 9.5.6 9.5.7 9.5.8 9.5.9
really-simple-ssl / upgrade / ajax.js
really-simple-ssl / upgrade Last commit date
img 2 months ago ajax.js 2 months ago ajax.min.js 2 months ago index.php 2 months ago upgrade-to-pro.css 2 months ago upgrade-to-pro.css.map 2 months ago upgrade-to-pro.js 2 months ago upgrade-to-pro.less 2 months ago upgrade-to-pro.min.css 2 months ago upgrade-to-pro.min.js 2 months ago upgrade-to-pro.php 2 months ago
ajax.js
52 lines
1
2 var rsp_ajax = {};
3
4 rsp_ajax.x = function () {
5 if (typeof XMLHttpRequest !== 'undefined') {
6 return new XMLHttpRequest();
7 }
8 var versions = [
9 "MSXML2.XmlHttp.6.0",
10 "MSXML2.XmlHttp.5.0",
11 "MSXML2.XmlHttp.4.0",
12 "MSXML2.XmlHttp.3.0",
13 "MSXML2.XmlHttp.2.0",
14 "Microsoft.XmlHttp"
15 ];
16
17 var xhr;
18 for (var i = 0; i < versions.length; i++) {
19 try {
20 xhr = new ActiveXObject(versions[i]);
21 break;
22 } catch (e) {
23 }
24 }
25 return xhr;
26 };
27
28 rsp_ajax.send = function (url, callback, method, data, async) {
29 if (async === undefined) {
30 async = true;
31 }
32 var x = rsp_ajax.x();
33 x.open(method, url, async);
34 x.onreadystatechange = function () {
35 if (x.readyState == 4) {
36 callback(x.responseText)
37 }
38 };
39 if (method == 'POST') {
40 x.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
41 }
42 x.send(data)
43 };
44
45 rsp_ajax.get = function (url, data, callback, async) {
46 var query = [];
47 for (var key in data) {
48 query.push(encodeURIComponent(key) + '=' + encodeURIComponent(data[key]));
49 }
50 rsp_ajax.send(url + (query.length ? '?' + query.join('&') : ''), callback, 'GET', null, async)
51 };
52