Skip to content

Commit

Permalink
Fix reload function
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmckinsey1 committed Dec 29, 2023
1 parent a17fb27 commit 16d1d29
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<script type="text/javascript">
/**
* Script to refresh the page one time on load to temporarily fix bug with the portfolio section being displayed incorrectly in Chrome.
*/
(function () {
if (window.localStorage) {
if (!localStorage.getItem("firstLoad")) {
localStorage["firstLoad"] = true;
window.location.reload();
} else localStorage.removeItem("firstLoad");
}
})();
</script>

<head>
<title>Michael McKinsey</title>
Expand Down Expand Up @@ -356,6 +343,22 @@ <h2>My <strong>Resume</strong></h2>
<script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.min.js"></script>
<script src="https://unpkg.com/imagesloaded@4/imagesloaded.pkgd.min.js"></script>
<script src="js/custom.js"></script>
<script type="text/javascript">
/**
* Script to refresh the page one time on load to temporarily fix bug with the portfolio section being displayed incorrectly in Chrome.
*/
function reload() {
if (window.localStorage) {
if (!localStorage.getItem("firstLoad")) {
localStorage["firstLoad"] = true;
window.location.reload();
} else {
localStorage.removeItem("firstLoad");
}
}
}
window.onload = reload();
</script>
</body>

</html>

0 comments on commit 16d1d29

Please sign in to comment.