GithubHelp home page GithubHelp logo

nuxt-user-agent's People

Contributors

andoshin11 avatar fukuiretu avatar mogaming217 avatar mp3 avatar pi0 avatar rchl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nuxt-user-agent's Issues

ReferenceError: exports is not defined

Hi there,

I updated the package today and my application isn't working anymore (on Nuxt 2.6.1).
Here's what I got in the console:

Capture d’écran 2019-04-16 à 05 11 58

References to:

Capture d’écran 2019-04-16 à 05 12 08

Thanks :)

Is there any support for UA-CH?

With Google Chrome's plan to deprecate or freeze the UserAgent string, it will no longer be possible to accurately obtain information such as browser version from the UserAgent string in the future.
There is an alternative method, User-Agent Client Hints, is there any plan to support it?

Samsung Internet returns Chrome

Hi,

I used Samsung Galaxy Note 10 with the latest Samsung Internet to test the module. This is what user-agent returns by Samsung Internet:

Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-N970F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/13.0 Chrome/83.0.4103.106 Mobile Safari/537.36

This is what nuxt-user-agent returns:
this.$ua.browser(): 'Chrome'
this.$ua.browserVersion(): '83.0.4103.106'
this.$ua.browserVendor(): 'Google'

Is it possible to detect Samsung Internet and its version? (11.2, 12.0, 13.0, etc.)

Thank you.

Avoid errors when executing the generate command.

Hi.
I appreciate your great product :)

When building with the generate command, an error appears.

Cannot read property 'headers' of undefined

To avoid this error, change the reference to ctx.req as follows.

export default (ctx, inject) => {
  let userAgent = "";
  if (typeof ctx.req !== "undefined") {
    userAgent = ctx.req.headers["user-agent"]
  } else if (typeof navigator !== "undefined") {
    userAgent = navigator.userAgent
  }

  ctx.$ua = detector(userAgent);
  inject("ua", detector(userAgent));
};

If you make this correction, the command will execute correctly.

Thanks !!

Property '$ua' does not exist on type 'UseContextReturn'.

Module works but getting error :

 ERROR  ERROR in components/HeaderConsole.vue:164:13                                                                                                      11:50:25
TS2339: Property '$ua' does not exist on type 'UseContextReturn'.
    162 |   },
    163 |   setup() {
  > 164 |     const { $ua } = useContext();

Are there any Types setup?

import { defineComponent, ref, useContext } from '@nuxtjs/composition-api';
import { useActions } from 'vuex-composition-helpers';

import ButtonTest from '~/components/ButtonTest.vue';
import useAuth from '~/composables/auth/useAuth';

export default defineComponent({
  name: 'HeaderConsole',
  components: { ButtonTest },
  props: {
    user: {
      required: true,
    },
    navigationItems: {
      required: false,
      type: Array,
    },
  },
  setup() {
    const { $ua } = useContext();

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.