forked from gm9/ingress-glyph-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-glyph-list.html
72 lines (63 loc) · 3.27 KB
/
example-glyph-list.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
<!DOCTYPE html>
<html lang="ja" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />
<!--meta name="viewport" content="width=302" /-->
<meta name="viewport" id="viewport" content="width=device-width initial-scale=1 maximum-scale=1 user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link rel="shortcut icon" href="icon.png" />
<link rel="apple-touch-icon" href="icon.png" />
<link rel="apple-touch-icon" sizes="76x76" href="icon_76.png" />
<link rel="apple-touch-icon" sizes="120x120" href="icon_120.png" />
<link rel="apple-touch-icon" sizes="152x152" href="icon_152.png" />
<!-- open links in webapp -->
<script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script>
<link rel="stylesheet" href="black.css" />
<script type="text/javascript" src="glyph-tools.js" charset="utf-8"></script>
<script type="text/javascript" src="glyph-dic.js" charset="utf-8"></script>
<title>Glyph List - Ingress Glyph Tools</title>
<style>
a { color: white;}
</style>
</head>
<body>
<a href="index.html">Ingress Glyph Tools</a>
<script>
(function(){
var gm9igt = gm9.IngressGlyphTools;
var listDiv = document.createElement("div");
var arrWordGlyph = [];
for(var key in gm9igt.glyphtionaryIndex){
var glyphs = gm9igt.glyphtionaryIndex[key];
for(var gi = 0; gi < glyphs.length; ++gi){
arrWordGlyph.push({word:key, glyph:glyphs[gi]});
}
}
arrWordGlyph.sort(function(a,b){return a.word.localeCompare(b.word);});
for(var i = 0; i < arrWordGlyph.length; ++i){
var entry = arrWordGlyph[i];
var entryDiv = document.createElement("div");
entryDiv.style.display = "inline-block";
entryDiv.style.margin = "8px";
entryDiv.style.textAlign = "center";
var glyphUrl = "input-pad-example.html?c=" + entry.glyph.toString();
var glyphLink = document.createElement("a");
glyphLink.setAttribute("href", glyphUrl);
glyphLink.appendChild(gm9igt.createGlyphImage(entry.glyph, 64, {color: "white", grid:{visible:true,stroke:"none",fill:"white",nodeRadiusRate:0.01},hexagon:{visible:true}}));
entryDiv.appendChild(glyphLink);
var wordLink = document.createElement("a");
wordLink.setAttribute("href", glyphUrl);
wordLink.appendChild(document.createTextNode(entry.word.toUpperCase()));
var wordDiv = document.createElement("div");
wordDiv.appendChild(wordLink);
entryDiv.appendChild(wordDiv);
listDiv.appendChild(entryDiv);
}
gm9igt.getLastScriptNode().parentNode.appendChild(listDiv);
})();
</script>
</body>
</html>