|
14 | 14 | <a href="/">Introduction</a> |
15 | 15 |
|
16 | 16 | <div class="group"> |
17 | | - <a href="/ws-about-ext.html">WebSockets</a> |
18 | | - <a href="/ws-echo-ext.html">Echo</a> |
19 | | - <a href="/ws-heartbeat-ext.html">Heartbeat</a> |
| 17 | + <a href="/ws-about.html">WebSockets</a> |
| 18 | + <a href="/ws-echo.html">Echo</a> |
| 19 | + <a href="/ws-heartbeat.html">Heartbeat</a> |
20 | 20 | </div> |
21 | 21 |
|
22 | 22 | <div class="group"> |
23 | | - <a href="/sse-about-ext.html">Server Sent Events</a> |
24 | | - <a href="/sse-simple-ext.html">Simple</a> |
25 | | - <a href="/sse-multiple-ext.html">Multiple</a> |
26 | | - <a href="/sse-multichannel-ext.html">Multi-Channel</a> |
27 | | - <a href="/sse-triggers-ext.html">Event Trigger</a> |
28 | | - <a href="/sse-target-ext.html">Event Target</a> |
29 | | - <a href="/sse-settle-ext.html">Settling</a> |
| 23 | + <a href="/sse-about.html">Server Sent Events</a> |
| 24 | + <a href="/sse-simple.html">Simple</a> |
| 25 | + <a href="/sse-multiple.html">Multiple</a> |
| 26 | + <a href="/sse-multichannel.html">Multi-Channel</a> |
| 27 | + <a href="/sse-triggers.html">Event Trigger</a> |
| 28 | + <a href="/sse-target.html">Event Target</a> |
| 29 | + <a href="/sse-settle.html">Settling</a> |
30 | 30 | </div> |
31 | 31 | </div> |
32 | 32 |
|
|
35 | 35 | // Obviously you could do this with a template engine instead but I'm not using a template engine |
36 | 36 | const navlinks = document.querySelectorAll("#navigation a"); |
37 | 37 | navlinks.forEach((link) => { |
38 | | - const locWithoutExt = window.location.toString().replace("-ext", ""); |
39 | | - if (link.href === locWithoutExt) link.classList.add("selected"); |
| 38 | + if (link.href === window.location.toString()) link.classList.add("selected"); |
40 | 39 | }); |
41 | 40 | </script> |
0 commit comments