Giter Site home page Giter Site logo

Minimal example does not work about clientjs HOT 4 OPEN

jackspirou avatar jackspirou commented on August 22, 2024 1
Minimal example does not work

from clientjs.

Comments (4)

bugolina avatar bugolina commented on August 22, 2024

Up! I've encountered same issue. Tks

from clientjs.

s-chris avatar s-chris commented on August 22, 2024

Your example is not working because you have placed the JS before the body tag. The script requires the body tag in code as it references it and then does an 'appendChild' on this object.

Move your script tag and script code to the bottom of the body and it should work.

<!DOCTYPE html>
<html lang="en">
<head>
    
</head>

<body>
test

<script src="https://clientjs.org/js/client.min.js"></script>
<script>
    var client = new ClientJS(); // Create A New Client Object
    var fingerprint = client.getFingerprint(); // Calculate Device/Browser Fingerprint
    alert( fingerprint );
</script>
</body>
</html>

from clientjs.

araad1992 avatar araad1992 commented on August 22, 2024

Hi, this example work correctly @s-chris I'd the same error. Thanks you!

from clientjs.

Maykonn avatar Maykonn commented on August 22, 2024

But I'm using require('clientjs'); to import the lib. Not the js scritp tag to include. Works only with html include <script>?

from clientjs.

Related Issues (20)

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.