You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
560 B

4 years ago
  1. 'use strict';
  2. module.exports = {
  3. isOpera: function() {
  4. return global.navigator &&
  5. /opera/i.test(global.navigator.userAgent);
  6. }
  7. , isKonqueror: function() {
  8. return global.navigator &&
  9. /konqueror/i.test(global.navigator.userAgent);
  10. }
  11. // #187 wrap document.domain in try/catch because of WP8 from file:///
  12. , hasDomain: function () {
  13. // non-browser client always has a domain
  14. if (!global.document) {
  15. return true;
  16. }
  17. try {
  18. return !!global.document.domain;
  19. } catch (e) {
  20. return false;
  21. }
  22. }
  23. };