Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Refactor to Styleguide.

Peter van der Doesac7ace77dbdb
diff --git a/wger/core/static/js/wger-core-mobile.js b/wger/core/static/js/wger-core-mobile.js
index e54026431..e2cb083e2 100644
--- a/wger/core/static/js/wger-core-mobile.js
+++ b/wger/core/static/js/wger-core-mobile.js
@@ -1,33 +1,30 @@
/*
- *
- *
- * Custom JS code for the mobile version
- *
- *
+ Custom JS code for the mobile version
*/
-"use strict";
-
+'use strict';
/*
* Handle external links with a Web Activity when in Firefox OS
*/
-$(document).ready(function() {
- if (typeof MozActivity != 'undefined') {
- /*
- * External links
- */
- $('a[href^=http]').click(function (e) {
- e.preventDefault();
+$(document).ready(function () {
+ if (typeof MozActivity !== 'undefined') {
+ /*
+ * External links
+ */
+ $('a[href^=http]').click(function (e) {
+ /* eslint no-unused-vars: ["error", { "varsIgnorePattern": "activity" }] */
+ var activity;
+ e.preventDefault();
- var activity = new MozActivity({
- name: "view",
- data: {
- type: "url",
- url: $(this).attr("href")
- }
- });
- });
- } else {
- console.debug('MozActivity not available, opening links as usual.');
- }
-});
\ No newline at end of file
+ activity = new MozActivity({
+ name: 'view',
+ data: {
+ type: 'url',
+ url: $(this).attr('href')
+ }
+ });
+ });
+ } else {
+ console.debug('MozActivity not available, opening links as usual.');
+ }
+});