diff --git a/effects/frozenapp/package/contents/code/main.js b/effects/frozenapp/package/contents/code/main.js --- a/effects/frozenapp/package/contents/code/main.js +++ b/effects/frozenapp/package/contents/code/main.js @@ -17,31 +17,29 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . *********************************************************************/ -/*global effect, effects, animate, animationTime, Effect*/ + +"use strict"; + var frozenAppEffect = { inDuration: animationTime(1500), outDuration: animationTime(250), loadConfig: function () { - "use strict"; frozenAppEffect.inDuration = animationTime(1500); frozenAppEffect.outDuration = animationTime(250); }, windowAdded: function (window) { - "use strict"; if (!window || !window.unresponsive) { return; } frozenAppEffect.windowBecameUnresponsive(window); }, windowBecameUnresponsive: function (window) { - "use strict"; if (window.unresponsiveAnimation) { return; } frozenAppEffect.startAnimation(window, frozenAppEffect.inDuration); }, startAnimation: function (window, duration) { - "use strict"; if (!window.visible) { return; } @@ -58,15 +56,13 @@ }); }, windowClosed: function (window) { - "use strict"; frozenAppEffect.cancelAnimation(window); if (!window.unresponsive) { return; } frozenAppEffect.windowBecameResponsive(window); }, windowBecameResponsive: function (window) { - "use strict"; if (!window.unresponsiveAnimation) { return; } @@ -88,40 +84,33 @@ }); }, cancelAnimation: function (window) { - "use strict"; if (window.unresponsiveAnimation) { cancel(window.unresponsiveAnimation); window.unresponsiveAnimation = undefined; } }, desktopChanged: function () { - "use strict"; - var windows = effects.stackingOrder; for (var i = 0, length = windows.length; i < length; ++i) { var window = windows[i]; frozenAppEffect.cancelAnimation(window); frozenAppEffect.restartAnimation(window); } }, unresponsiveChanged: function (window) { - "use strict"; if (window.unresponsive) { frozenAppEffect.windowBecameUnresponsive(window); } else { frozenAppEffect.windowBecameResponsive(window); } }, restartAnimation: function (window) { - "use strict"; if (!window || !window.unresponsive) { return; } frozenAppEffect.startAnimation(window, 1); }, init: function () { - "use strict"; - effects.windowAdded.connect(frozenAppEffect.windowAdded); effects.windowClosed.connect(frozenAppEffect.windowClosed); effects.windowMinimized.connect(frozenAppEffect.cancelAnimation);