aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--assets/js/ps-app.js14
1 files changed, 4 insertions, 10 deletions
diff --git a/assets/js/ps-app.js b/assets/js/ps-app.js
index 2007469..5e5af7e 100644
--- a/assets/js/ps-app.js
+++ b/assets/js/ps-app.js
@@ -3,18 +3,12 @@
$(document).ready(function() {
// Make each .media section clickable to reach ./<id>/
- $('.media section').each(function(_, e) {
- e.onclick = function(e) {
- var id = false
- e.path.forEach(function(e) {
- if (e.id) id = e.id
- if (id !== false) return id
- })
- if (id !== false)
- window.location = './' + id + '/'
+ [ 'gfx', 'txt', 'vdo' ].forEach(function(id) {
+ $('#' + id).onclick = function() {
+ window.location = '/' + id + '/';
return false
}
- })
+ }
});