Skip to content

Commit 7568463

Browse files
ohsayandeanberris
authored andcommitted
Avoid reloading when already on homepage (#13)
* Avoid reloading if on homepage already * Add files via upload * Checked, don't need this anymore
1 parent 319cf28 commit 7568463

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎index.html

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
77
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap-theme.min.css">
88
<link rel="stylesheet" href="static/cpp-netlib.css">
9+
<script>
10+
click = () => {
11+
if (window.location.href="https://cpp-netlib.org/") {
12+
// Don't do anything
13+
} else {
14+
window.open("https://cpp-netlib.org/","_self")
15+
}
16+
}
17+
</script>
918
</head>
1019

1120
<body data-spy="scroll" data-target="#cpp-netlib-docs-sidebar">
@@ -18,7 +27,7 @@
1827
</div>
1928
<div>
2029
<ul class="nav navbar-nav">
21-
<li class="active"><a href="index.html">Home</a></li>
30+
<li class="active"><a onclick="check()">Home</a></li>
2231
<li><a href="process.html">Development Process</a></li>
2332
<li><a href="style-guide.html">Style Guide</a></li>
2433
<li><a href="proposals.html">Proposals</a></li>

0 commit comments

Comments
 (0)