aboutsummaryrefslogtreecommitdiffstats
path: root/src/service/sniffer.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/sniffer.js')
-rw-r--r--src/service/sniffer.js20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/service/sniffer.js b/src/service/sniffer.js
index ed6d688d..8f6efeef 100644
--- a/src/service/sniffer.js
+++ b/src/service/sniffer.js
@@ -11,13 +11,15 @@
* @description
* This is very simple implementation of testing browser's features.
*/
-angularServiceInject('$sniffer', function($window) {
- if ($window.Modernizr) return $window.Modernizr;
+function $SnifferProvider(){
+ this.$get = ['$window', function($window){
+ if ($window.Modernizr) return $window.Modernizr;
- return {
- history: !!($window.history && $window.history.pushState),
- hashchange: 'onhashchange' in $window &&
- // IE8 compatible mode lies
- (!$window.document.documentMode || $window.document.documentMode > 7)
- };
-}, ['$window']);
+ return {
+ history: !!($window.history && $window.history.pushState),
+ hashchange: 'onhashchange' in $window &&
+ // IE8 compatible mode lies
+ (!$window.document.documentMode || $window.document.documentMode > 7)
+ };
+ }];
+}