xqisie

0.0.8 • Public • Published

isie

This check browser type and go link tip page plugin.

View Chinese documents

Install

Browser:

import cdn

<!-- Browser -->
<script src="https://xqgj.cc/xqcdn/libs/xqisie/xqisie.min.js"></script>
<!-- es module -->
<script type="module">
    import isie from '../lib/isie-esm.min.js';
</script>

Node:

npm install isie
const isie = require('isie');

Usage

  • check browser
const browser = isie.check();
console.log('Browser is:', browser);
  • go link
isie.goLink('./page/index.html');
  • node
const http = require('http');
const isie = require('../lib/isie');

const server = http.createServer((req, res) => {
    
    if (req.url === '/') {
        const ua = req.headers['user-agent'];
        const browser = isie.check(ua);
        if (browser) {
            res.end('browser is:'+browser);
        } else {
            res.end('thanks.');
        }
    }
});

server.listen(3000, 'localhost', () => {
    console.log('isie server is running on http://localhost:3000 !');
});

View isie

Run this script to view the demonstration case: npm run test:node, npm run test:browser.

ask questions

submit your question

Author

@gitguanqi

Readme

Keywords

Package Sidebar

Install

npm i xqisie

Weekly Downloads

2

Version

0.0.8

License

MIT

Unpacked Size

127 kB

Total Files

21

Last publish

Collaborators

  • ioguanqi