Skip to content

Commit dae68b6

Browse files
Gilgamesh AthorayaGilgamesh Athoraya
authored andcommitted
version specific help menu links
1 parent f8f1fc5 commit dae68b6

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

src/cmds.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ D.cmds = [
1919
['CBP','Clear stops for active object',[]],
2020
['CNC','Connect', []],
2121
['DK', 'Delete lines', []],
22+
['DHI','Dyalog Help Index', []],
2223
['DMK','Toggle key display mode', []],
2324
['DMN','Next line in demo', []],
2425
['DMP','Previous line in demo', []],
2526
['DMR','Load demo file', []],
27+
['DOX','Documentation Centre', []],
2628
['DO', 'Uncomment lines', []],
2729
['ED', 'Edit', ['Shift-Enter']],
2830
['EP', 'Exit (and save changes)', ['Escape']],

src/hlp.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
// D.hlp[')vars'] -> 'http://help.dyalog.com/17.0/Content/Language/System%20Commands/vars.htm'
55
function initHelp(version) {
66
const v = version ? version.slice(0, 4) : '17.0';
7-
const p = `https://help.dyalog.com/${v}/Content/`;
7+
const v3 = v.replace(/\./,'');
8+
const helpUri = `https://help.dyalog.com/${v}/`;
9+
const p = `${helpUri}Content/`;
810
const q = '.htm'; // prefix and suffix
911
const h = {
12+
DOX: `https://www.dyalog.com/documentation_${v3}${q}`,
13+
INDEX: `${helpUri}index${q}`,
1014
WELCOME: `${p}MiscPages/HelpWelcome${q}`,
1115
UCMDS: `${p}UserGuide/The APL Environment/User Commands${q}`,
1216
LANGELEMENTS: `${p}Language/Introduction/Language Elements${q}`,

src/km.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@
5353
});
5454
if (D.ide.dead) window.close();
5555
},
56+
DHI() {
57+
D.openExternal(D.hlp.INDEX);
58+
},
59+
DOX() {
60+
D.openExternal(D.hlp.DOX);
61+
},
5662
OWS() {
5763
if (D.el && D.ide.floating) {
5864
D.ipc.of.ride_master.emit('OWS');

src/prf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ D.prf = {};
113113
+ '\n Weak Interrupt =WI'
114114
+ '\n Strong Interrupt =SI'
115115
+ '\n&Help'
116-
+ '\n Dyalog Help =http://help.dyalog.com/'
117-
+ '\n Documentation Centre =http://dyalog.com/documentation.htm'
116+
+ '\n Dyalog Help =DHI'
117+
+ '\n Documentation Centre =DOX'
118118
+ '\n -'
119119
+ '\n Dyalog Website =http://dyalog.com/'
120120
+ '\n MyDyalog =https://my.dyalog.com/'

0 commit comments

Comments
 (0)