Skip to content

Commit d64fb64

Browse files
committed
Update a11y extension
1 parent 0778f4a commit d64fb64

File tree

84 files changed

+49700
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+49700
-135
lines changed

unpacked/extensions/a11y/accessibility-menu.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@
4141
if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y";
4242

4343
var Accessibility = EXTENSIONS["accessibility-menu"] = {
44-
version: '1.2.2',
44+
version: '1.2.3',
4545
prefix: '', //'Accessibility-',
46-
default: {},
46+
defaults: {},
4747
modules: [],
4848
MakeOption: function(name) {
4949
return Accessibility.prefix + name;
@@ -52,11 +52,11 @@
5252
return SETTINGS[Accessibility.MakeOption(option)];
5353
},
5454
AddDefaults: function() {
55-
var keys = KEYS(Accessibility.default);
55+
var keys = KEYS(Accessibility.defaults);
5656
for (var i = 0, key; key = keys[i]; i++) {
5757
var option = Accessibility.MakeOption(key);
5858
if (typeof(SETTINGS[option]) === 'undefined') {
59-
SETTINGS[option] = Accessibility.default[key];
59+
SETTINGS[option] = Accessibility.defaults[key];
6060
}
6161
}
6262
},
@@ -87,7 +87,7 @@
8787
}
8888
},
8989
Register: function(module) {
90-
Accessibility.default[module.option] = false;
90+
Accessibility.defaults[module.option] = false;
9191
Accessibility.modules.push(module);
9292
},
9393
Startup: function() {
@@ -98,7 +98,7 @@
9898
},
9999
LoadExtensions: function () {
100100
var extensions = [];
101-
for (var i = 0, mpdule; module = this.modules[i]; i++) {
101+
for (var i = 0, module; module = this.modules[i]; i++) {
102102
if (SETTINGS[module.option]) extensions.push(module.module);
103103
}
104104
return (extensions.length ? HUB.Startup.loadArray(extensions) : null);
@@ -172,10 +172,12 @@
172172
},5); // run before other extensions' menu hooks even if they are loaded first
173173
},5);
174174

175-
MathJax.Callback.Queue(
176-
["LoadExtensions",Accessibility],
177-
["loadComplete",MathJax.Ajax,"[a11y]/accessibility-menu.js"]
178-
);
175+
MathJax.Hub.Register.StartupHook("End Cookie", function () {
176+
MathJax.Callback.Queue(
177+
["LoadExtensions",Accessibility],
178+
["loadComplete",MathJax.Ajax,"[a11y]/accessibility-menu.js"]
179+
);
180+
});
179181

180182
})(MathJax.Hub,MathJax.Extension);
181183

unpacked/extensions/a11y/auto-collapse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y";
3434

3535
var Collapse = MathJax.Extension["auto-collapse"] = {
36-
version: "1.2.2",
36+
version: "1.2.3",
3737
config: HUB.CombineConfig("auto-collapse",{
3838
disabled: false
3939
}),

unpacked/extensions/a11y/collapsible.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
if (!PATH.a11y) PATH.a11y = HUB.config.root + "/extensions/a11y";
4242

4343
var Collapsible = MathJax.Extension.collapsible = {
44-
version: "1.2.2",
44+
version: "1.2.3",
4545
config: HUB.CombineConfig("collapsible",{
4646
disabled: false
4747
}),
@@ -94,7 +94,7 @@
9494
punctuated: {
9595
endpunct: NOCOLLAPSE,
9696
startpunct: NOCOLLAPSE,
97-
default: 12
97+
value: 12
9898
}
9999
},
100100
//
@@ -108,7 +108,7 @@
108108
text: "...",
109109
appl: {
110110
"limit function": "lim",
111-
default: "f()"
111+
value: "f()"
112112
},
113113
fraction: "/",
114114
sqrt: "\u221A",
@@ -119,26 +119,26 @@
119119
vector: {
120120
binomial: "(:)",
121121
determinant: "|:|",
122-
default: "\u27E8:\u27E9"
122+
value: "\u27E8:\u27E9"
123123
},
124124
matrix: {
125125
squarematrix: "[::]",
126126
rowvector: "\u27E8\u22EF\u27E9",
127127
columnvector: "\u27E8\u22EE\u27E9",
128128
determinant: "|::|",
129-
default: "(::)"
129+
value: "(::)"
130130
},
131131
cases: "{:",
132132
infixop: {
133133
addition: "+",
134134
subtraction: "\u2212",
135135
multiplication: "\u22C5",
136136
implicit: "\u22C5",
137-
default: "+"
137+
value: "+"
138138
},
139139
punctuated: {
140140
text: "...",
141-
default: ","
141+
value: ","
142142
}
143143
},
144144

@@ -224,10 +224,10 @@
224224
maction.attr[COMPLEXATTR] = maction.complexity;
225225
if (mml.type === "math") {
226226
var mrow = MML.mrow().With({
227-
data: mml.data,
228227
complexity: mml.complexity,
229228
attrNames: [], attr: {}
230229
});
230+
mrow.Append.apply(mrow,mml.data);
231231
for (var i = mml.attrNames.length-1, name; name = mml.attrNames[i]; i--) {
232232
if (name.substr(0,14) === "data-semantic-") {
233233
mrow.attr[name] = mml.attr[name];
@@ -265,10 +265,10 @@
265265
else if (this.COLLAPSE[type] && this.MARKER[type]) {
266266
var role = mml.attr["data-semantic-role"];
267267
var complexity = this.COLLAPSE[type];
268-
if (typeof(complexity) !== "number") complexity = complexity[role] || complexity.default;
268+
if (typeof(complexity) !== "number") complexity = complexity[role] || complexity.value;
269269
if (mml.complexity > complexity) {
270270
var marker = this.MARKER[type];
271-
if (typeof(marker) !== "string") marker = marker[role] || marker.default;
271+
if (typeof(marker) !== "string") marker = marker[role] || marker.value;
272272
mml = this.MakeAction(this.Marker(marker),mml);
273273
}
274274
}
@@ -348,7 +348,7 @@
348348
Collapse_appl: function (mml) {
349349
if (this.UncollapseChild(mml,2,2)) {
350350
var marker = this.MARKER.appl;
351-
marker = marker[mml.attr["data-semantic-role"]] || marker.default;
351+
marker = marker[mml.attr["data-semantic-role"]] || marker.value;
352352
mml = this.MakeAction(this.Marker(marker),mml);
353353
}
354354
return mml;

unpacked/extensions/a11y/explorer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ MathJax.Hub.Register.StartupHook('Sre Ready', function() {
3232
});
3333

3434
var Assistive = MathJax.Extension.explorer = {
35-
version: '1.2.2',
35+
version: '1.2.3',
3636
dependents: [], // the extensions that depend on this one
3737
//
3838
// Default configurations.
3939
//
40-
default: {
40+
defaults: {
4141
walker: 'syntactic',
4242
highlight: 'none',
4343
background: 'blue',
@@ -56,7 +56,7 @@ MathJax.Hub.Register.StartupHook('Sre Ready', function() {
5656
},
5757

5858
addDefaults: function() {
59-
var defaults = MathJax.Hub.CombineConfig('explorer', Assistive.default);
59+
var defaults = MathJax.Hub.CombineConfig('explorer', Assistive.defaults);
6060
var keys = Object.keys(defaults);
6161
for (var i = 0, key; key = keys[i]; i++) {
6262
if (typeof(SETTINGS[Assistive.prefix + key]) === 'undefined') {

0 commit comments

Comments
 (0)