Skip to content

Avoid reloading when already on homepage #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Avoid reloading if on homepage already
  • Loading branch information
ohsayan authored Mar 1, 2019
commit c7bb99cd663576f6e2ebd5fdccfb2a68ea960c31
11 changes: 10 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css">
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="static/cpp-netlib.css">
<script>
click = () => {
if (window.location.href="https://cpp-netlib.org/") {
// Don't do anything
} else {
window.open("https://cpp-netlib.org/","_self")
}
}
</script>
</head>

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