From 5ff250cab108306796aa4a624104fa71b9c17f68 Mon Sep 17 00:00:00 2001 From: Andrey Pissantchev Date: Wed, 5 Apr 2017 23:40:24 +0100 Subject: [PATCH] Remove use of several vars on global scope (#3363) * remove use of is_mobile and is_mobile_device globals * fix undeclared bbox variable --- share/goodie/cheat_sheets/cheat_sheets.js | 2 +- share/goodie/frequency_spectrum/frequency_spectrum.js | 2 +- share/goodie/game2048/game2048.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/goodie/cheat_sheets/cheat_sheets.js b/share/goodie/cheat_sheets/cheat_sheets.js index c42400238..eac2092d2 100644 --- a/share/goodie/cheat_sheets/cheat_sheets.js +++ b/share/goodie/cheat_sheets/cheat_sheets.js @@ -23,7 +23,7 @@ DDH.cheat_sheets.build = function(ops) { if (i === 0 ){ showhide = false; - } else if ( i === 1 && !is_mobile ){ + } else if ( i === 1 && !DDG.device.isMobile ){ showhide = false; } diff --git a/share/goodie/frequency_spectrum/frequency_spectrum.js b/share/goodie/frequency_spectrum/frequency_spectrum.js index 129122286..44c9a3d14 100644 --- a/share/goodie/frequency_spectrum/frequency_spectrum.js +++ b/share/goodie/frequency_spectrum/frequency_spectrum.js @@ -3,7 +3,7 @@ DDH.frequency_spectrum = DDH.frequency_spectrum || {}; (function(DDH) { "use strict"; // Get the marker label and tag - var markerlabel, markertag, started; + var markerlabel, markertag, started, bbox; function start() { markerlabel = document.getElementById("marker_label"); diff --git a/share/goodie/game2048/game2048.js b/share/goodie/game2048/game2048.js index 639eb178d..05f615989 100644 --- a/share/goodie/game2048/game2048.js +++ b/share/goodie/game2048/game2048.js @@ -317,7 +317,7 @@ DDH.game2048.build = function(ops) { return { onShow: function() { //Hide this goodie on mobile devices for now - if(is_mobile || is_mobile_device) { + if(DDG.device.isMobile || DDG.device.isMobileDevice) { DDH.spice_tabs.game2048.hideLink(); DDH.spice_tabs.game2048.hide(); return;