This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //инициализируем с сохраненным в UserDefaults значением | |
| //если сохраненного значения нет, то будет false | |
| var soundOnOff = NSUserDefaults.standardUserDefaults().boolForKey("soundOnOff") | |
| //нажатие кнопки переключения звука | |
| func onSoundButtonTap() | |
| { | |
| soundOnOff = !soundOnOff | |
| NSUserDefaults.standardUserDefaults().setBool(soundOnOff, forKey: "soundOnOff") | |
| updateSound() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (jQuery, window, undefined) { | |
| var matched, browser; | |
| jQuery.uaMatch = function (ua) { | |
| ua = ua.toLowerCase(); | |
| //detect browser and, if possible, browser version | |
| var match = | |
| /(opera)/.exec(ua) || | |
| /(opr)[ \/]([\w.-]+)/.exec(ua) || //opera 15+ |