GithubHelp home page GithubHelp logo

urosg80 / yii2-outdatedbrowser-rework Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 8 KB

YII2 Widget implementing outdated-browser-rework package for better detection

License: BSD 3-Clause "New" or "Revised" License

PHP 100.00%

yii2-outdatedbrowser-rework's Introduction

yii2-outdatedbrowser-rework

YII2 Widget implementing outdated-browser-rework package for browser better detection

About

This widget was inspired by the mdscomp/yii2-outdated-browser-widget which uses the Outdated Browser script by Bürocratik.

This widget on the other hand uses the Outdated Browser Rework script made by the Mike MacCana.

Installation

The preferred way to install this extension is through composer. Check the composer.json for this extension's requirements and dependencies. Read this web tip /wiki on setting the minimum-stability settings for your application's composer.json.

To install, either run

$ php composer.phar require urosg/yii2-outdated-browser-rework "~1.0"

or add

"urosg/yii2-outdated-browser-rework": "~1.0"

to the require section of your composer.json file.

Refer to the CHANGELOG for details of release changes.

Usage

use urosg\widget\OutdatedBrowserRework;

// To use default configuration
echo OutdatedBrowserRework::widget();

// To specify custom configuration - listed are default settings
echo OutdatedBrowserReword::widget([
    'requiredCssProperty' => '',
    'language' => 'en',
    'isUnknownBrowserOK' => false,
    'requireChromeOnAndroid' => false,
    'messages' => [
        'outOfDate' => 'Your browser is out of date!',
        'updateWeb' => 'Update your browser to view this website correctly.',
        'updateGooglePlay' => 'Please install Chrome from Google Play',
        'updateAppStore' => 'Please update iOS from the Settings',
        'webUpdateUrl' => 'http://outdatedbrowser.com',
        'callToAction' => 'Update my browser now',
        'close' => 'Close'
    ],
    'browserSupport' => [
        'Chrome' => 57,
        'Edge' => 39,
        'Safari' => 10,
        'MobileSafari' => 10,
        'Firefox' => 50,
        'Opera' => 50,
        'Vivaldi' => 1,
        'IE' => false
    ]
]);

License

yii2-outdated-browser-rework is released under the BSD-3 Clause license. See the bundled LICENSE file for details.

yii2-outdatedbrowser-rework's People

Contributors

urosg80 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.