diff options
fix(views/archive): Only increment visited counter on opened archive
1 files changed, 10 insertions, 0 deletions
| -rw-r--r-- | views/archive/topbar.php | 10 |
diff --git a/views/archive/topbar.php b/views/archive/topbar.php index b00a33d..9bf52f7 100644 --- a/views/archive/topbar.php +++ b/views/archive/topbar.php @@ -29,3 +29,13 @@ <? endif; ?> </div> </div> + +<script type="text/javascript"> +// If not in iframe +if (window.self === window.top) { + var request = new XMLHttpRequest(); + request.open("POST", "/archive/visit.php", true); + request.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); + request.send('wid=' + <?= $currentPage->WID ?>); +} +</script> |
