Skip to content

Commit 21c3b8e

Browse files
committed
Adds samples.
1 parent 633c946 commit 21c3b8e

File tree

3 files changed

+102
-4
lines changed

3 files changed

+102
-4
lines changed

samples/mathjax2_test.html

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2+
<html> <head>
3+
<title></title>
4+
5+
<script type="text/x-mathjax-config">
6+
MathJax.Hub.Config({
7+
tex2jax: {
8+
inlineMath: [['$', '$'], ["\\(", "\\)"]],
9+
processEscapes: true
10+
},
11+
AssistiveMML: {disabled: true},
12+
MathMenu: {
13+
showFontMenu: true
14+
},
15+
menuSettings: {
16+
inTabOrder: true
17+
},
18+
showMathMenu: false
19+
});
20+
</script>
21+
<script id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@2.7.8/MathJax.js?config=TeX-MML-AM_HTMLorMML-full"></script>
22+
<script src="../dist/ContextMenu.js"></script>
23+
<script src="mathjaxmenu.js"></script>
24+
<!-- <script src="annotation_menu.js"></script> -->
25+
</head>
26+
27+
<body>
28+
<h1 id="header">MathJax 2 with context menu</h1>
29+
<script>document.getElementById('header').innerHTML = document.getElementById('header').innerHTML + ' ' + ContextMenu.version;</script>
30+
31+
$x^1$
32+
$x^2$
33+
$x^3$
34+
$x^4$
35+
36+
\[x^5\]
37+
\[x^6\]
38+
\[x^7\]
39+
\[x^8\]
40+
\[x^9\]
41+
\[x^{10}\]
42+
\[x^{11}\]
43+
\[x^{12}\]
44+
\[x^{13}\]
45+
\[x^{14}\]
46+
\[x^{15}\]
47+
\[x^{16}\]
48+
\[x^{17}\]
49+
\[x^{18}\]
50+
\[x^{19}\]
51+
\[x^{20}\]
52+
\[x^{21}\]
53+
\[x^{22}\]
54+
\[x^{23}\]
55+
\[x^{24}\]
56+
\[x^{25}\]
57+
\[x^{26}\]
58+
\[x^{27}\]
59+
\[x^{28}\]
60+
\[x^{29}\]
61+
\[x^{30}\]
62+
\[x^{31}\]
63+
\[x^{32}\]
64+
\[x^{33}\]
65+
\[x^{34}\]
66+
\[x^{35}\]
67+
\[x^{36}\]
68+
\[x^{37}\]
69+
\[x^{38}\]
70+
\[\int_{x=n}^{100} x^{39}\]
71+
\[\frac{1}\]
72+
73+
74+
<hr>
75+
<address></address>
76+
<!-- hhmts start -->
77+
Last modified: Wed May 20 11:53:28 BST 2020
78+
<!-- hhmts end -->
79+
</body> </html>

samples/menu.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
var MENU = {};
1212
MENU.ShowSource = function() {};
1313
MENU.isMac = function() {};
14-
MENU.Zoom = function() {console.log("Trying!")};
14+
MENU.Zoom = function() {console.log("Zooming!")};
1515
MENU.Id = function(x) {return x};
1616
MENU.About = function() {
1717
dialog.post(0, 0);
@@ -243,7 +243,8 @@
243243

244244
</script>
245245
<body>
246-
<h1>Testing the context menu</h1>
246+
<h1 id="header">Testing the context menu</h1>
247+
<script>document.getElementById('header').innerHTML = document.getElementById('header').innerHTML + ' ' + ContextMenu.version;</script>
247248

248249
<button onclick=cc.post(50,50)>here</button>
249250

@@ -269,10 +270,10 @@ <h1>Testing the context menu</h1>
269270
<hr>
270271
<address></address>
271272
<!-- hhmts start -->
272-
Last modified: Tue May 19 17:40:00 BST 2020
273+
Last modified: Wed May 20 11:52:41 BST 2020
273274
<!-- hhmts end -->
274275
</body>
275-
<script>cc.getStore().insert(document.getElementsByClassName("test"));
276+
<script>cc.store.insert(document.getElementsByClassName("test"));
276277
</script>
277278

278279
</html>

samples/mini.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2+
<html> <head>
3+
<title>Testing the context menu</title>
4+
5+
</head>
6+
<script src="../dist/ContextMenu.js" async></script>
7+
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
8+
<body>
9+
<h1>Just Loading...</h1>
10+
11+
12+
13+
<hr>
14+
<address></address>
15+
<!-- hhmts start -->
16+
Last modified: Mon May 18 23:58:59 BST 2020
17+
<!-- hhmts end -->
18+
</body> </html>

0 commit comments

Comments
 (0)