aboutsummaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorhellekin <hellekin@cepheide.org>2018-01-06 11:54:12 +0100
committerhellekin <hellekin@cepheide.org>2018-01-06 11:54:12 +0100
commitb8bfc43a9f6c5e5fbfdf28045e406e94eff74875 (patch)
treeb337b02eb295c9e301174818bc3de193b30c0335 /assets
parent449f0eae51823f32ea5b165af333f979d852f170 (diff)
downloadlesoiseaux.io-b8bfc43a9f6c5e5fbfdf28045e406e94eff74875.tar.gz
Add lang switch support to all ps.lesoiseaux.io
Diffstat (limited to 'assets')
-rw-r--r--assets/js/ps-app.js42
1 files changed, 22 insertions, 20 deletions
diff --git a/assets/js/ps-app.js b/assets/js/ps-app.js
index 7bb4b9c..c599cf2 100644
--- a/assets/js/ps-app.js
+++ b/assets/js/ps-app.js
@@ -2,26 +2,28 @@
$(document).ready(function() {
- // Make each .media section clickable to reach ./<id>/
- [ 'gfx', 'txt', 'vdo' ].forEach(function(id) {
- $('#' + id)
- .click(function(e) {
- window.location = `/${id}/`;
- return false
- })
- .mouseover(function(e) {
- e.target.style.cursor = 'pointer'
- return false
- })
- .mouseout(function(e) {
- e.target.style.cursor = 'not-allowed'
- return false
- })
- })
- $('.media').mouseout(function(e) {
- e.target.style.cursor = 'auto'
- return false
- })
+ if ($('body.ps.home')) {
+ // Make each .media section clickable to reach ./<id>/
+ [ 'gfx', 'txt', 'vdo' ].forEach(function(id) {
+ $('#' + id)
+ .click(function(e) {
+ window.location = `/${id}/`;
+ return false
+ })
+ .mouseover(function(e) {
+ e.target.style.cursor = 'pointer'
+ return false
+ })
+ .mouseout(function(e) {
+ e.target.style.cursor = 'not-allowed'
+ return false
+ })
+ })
+ $('.media').mouseout(function(e) {
+ e.target.style.cursor = 'auto'
+ return false
+ })
+ }
// EN/FR switch
$('footer')