Giter Site home page Giter Site logo

outdated-browser's Introduction

Outdated Browser v1.1.5

A time saving tool for developers. It detects outdated browsers and advises users to upgrade to a new version.

So, you're tired of people visiting your modern website with an outdated browser and not doing anything about it. Maybe they aren't "power" users, maybe it's your auntie running a last century browser trying to see awesome CSS3 animations and transforms. Let the user know that’s an outdated browser, and advise them on a better one.

With this solution you can check if the user’s browser can handle your website. If not, it will show a cool looking notice advising the user to update the browser. It’ll be up to the user to upgrade or not. Don't force the user!

That's it! As simple as it can get.

How to use it

Important: Because of old browsers (e.g. IE6, IE7), we recommend:

  • Implement this plugin before any other javascripts (plugins or your own scripts);
  • Although we tested the AJAX approach, and it's easier to implement, we recommend to use the plugin without AJAX calls (5.).

With these points in consideration is less prone to have conflicts with your code. These browsers have "strange" js errors and the plugin may not be working as intended. So keep it simple!

  1. Include the CSS located in the HTML head:

    <link rel="stylesheet" href="your_path/outdatedbrowser/outdatedbrowser.min.css">
  2. Include plugin's script at the bottom of the HTML body:

    <script src="your_path/outdatedbrowser/outdatedbrowser.min.js"></script>
  3. Paste the required HTML at the end of your document (see demo examples):

    <div id="outdated"></div>
  4. Call the plugin by placing the following at the bottom of the HTML body:

    // Plain Javascript
    //event listener: DOM ready
    function addLoadEvent(func) {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') {
            window.onload = func;
        } else {
            window.onload = function() {
                if (oldonload) {
                    oldonload();
                }
                func();
            }
        }
    }
    //call plugin function after DOM ready
    addLoadEvent(function(){
        outdatedBrowser({
            bgColor: '#f25648',
            color: '#ffffff',
            lowerThan: 'transform',
            languagePath: 'your_path/outdatedbrowser/lang/en.html'
        })
    });
    // Using jQuery (version that supports IE < 9)
    $( document ).ready(function() {
        outdatedBrowser({
            bgColor: '#f25648',
            color: '#ffffff',
            lowerThan: 'transform',
            languagePath: 'your_path/outdatedbrowser/lang/en.html'
        })
    })
  5. Using the plugin without AJAX calls:

    <!-- Paste the required HTML at the end of your document (see demo examples) -->
    <div id="outdated">
        <h6>Your browser is out-of-date!</h6>
        <p>Update your browser to view this website correctly. <a id="btnUpdateBrowser" href="https://bestvpn.org/outdatedbrowser/"> Outdated Browser </a></p>
        <p class="last"><a href="#" id="btnCloseUpdateBrowser" title="Close">&times;</a></p>
    </div>
    // Call the plugin (see 4.) but with the variable languagePath empty: 
    // DOM ready or jQuery
    
    outdatedBrowser({
        bgColor: '#f25648',
        color: '#ffffff',
        lowerThan: 'transform',
        languagePath: ''
    })
  6. Targeting browsers:

    You can do it in one of two ways: using Internet Explorer browsers as reference or specifying a CSS property. The outcome is the same, choose what is easier for you (for Edge vs IE11 check issue #198).

    Lower Than (<):

    • "IE11","borderImage"
    • "IE10", "transform" (Default property)
    • "IE9", "boxShadow"
    • "IE8", "borderSpacing"
  7. Choose the language:

    Download the “lang" folder: If you have the language you want, just write the correct path for the language file in your project; If you don’t have your language, you can write your own html file, and please share it with us.

And you're done!

PS: check the "demo" folder, it may help you.


How to install

You have several options: you can download the repository manually or you can use a package manager to do that work for you.

# NPM
$ npm install outdatedbrowser

# Yarn
$ yarn add outdatedbrowser

# Bower
$ bower install outdated-browser

FAQ

Before opening a new issue please check our FAQ page

Contributing

  • Fork the project.
  • Read through the issues or report new ones.
  • Write some tests to make sure we don't accidentally break each other's code.
  • Send a pull request.

Note: mind that this is NOT a plugin for the latest browsers, but the complete opposite! The html, css and javascript must work properly in very old browsers (IE6, IE7, etc), so there is no point to use the latest recommendations. It must work properly at least on IE6, so please double test it before sending a pull request.

TRANSLATIONS Rename with a proper language abbreviation using the IETF language tags: two-letter language (ISO 639-1) — two-letter country code (ISO 3166-1). For simplicity we are using all lower case and country code can be omitted if there is no regional variation. Links with language-country codes: ISO Language Code Table, Windows Locale Codes.

Current available languages: ar, cs, da, de, el, en, es, es-pe, et, fa, fi, fr, hr, hu, hy, id, it, ja, ko, lt, nb, nl, pl, pt, pt-br, ro, ru, sk, sl, sv, tr, uk, zh-cn, zh-tw

CMS, Frameworks, etc

Wordpress Plugin by Deblyn Prado — Ruby Gem by Luisa Lima — Yii2 widgetDrupal Plugin by Mag. Andreas Mayr — Magento Extension by Joey Hoer — Contao Open Source CMS Module by Lucas Gehin

Team

Made with love at Bürocratik 2014—2019.
Outdated Browser was acquired on June 2019.

License

MIT License

outdated-browser's People

Contributors

alexprg avatar anacamacho avatar blackfyre avatar brunoamorim avatar danvaz avatar deadload avatar isaniomoraes avatar kempu avatar kum0ri avatar luis-carvalho avatar mareksuscak avatar mathieulavigne avatar mattiaaccornero avatar mqchen avatar mrgeneric avatar obahareth avatar ondoheer avatar outdatedbrowser avatar pabloleban avatar perseusthegreat avatar pryx avatar purpleweb avatar racztiborzoltan avatar rejas avatar romanlex avatar rrelmy avatar santiespada avatar xdqi avatar xxmuaddib avatar zone-live 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  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

outdated-browser's Issues

L10n ?

It would be great to have localized version of the website :)

Grunt and minification

It seems that you use some kind of engine to minify your css and javascript (Grunt mayhaps?). Why don't you commit that instead of the *.min-files? Or you put it in a dist-folder for easy access.

README small correction

How to use it

Include plugin's script at the bottom of the HTML body:
<-script src="outdatedBrowser.min.js"-><-/script->

Include the CSS located in the HTML head:
<-link rel="stylesheet" href="outdatedBrowser.min.css"->

Translations

Any plan to translate the content to other languages? Maybe a json file with all required strings, so people can create diff pull requests with json files for you guys?

Congrats, awesome project.

Cheers

Mauricio Wolff

Script error

Hi,

there's an issue with your script. The console say the following:
Uncaught TypeError: Cannot read property 'style' of null

It's on line 125.

Safari for Apple only?

Hello, cool project, I'd like to point out that there's Safari for windows as well...

Shouldn't you update your website and update the Safari session?

Remove percent and put browsers randomly

Web Browsers should appear randomly and you could remove % of use.

If you want to keep % it's fine but put more details about the web browser (for example better user privacy for Firefox, Touch/Metro interface for IE etc.)

safari for windows

The website says that safari is only available for os x but it's also available for windows

contrast

the contrast for most of the site is to low.

chrome: white on #f2b635
etc

http://outdatedbrowser.com/ is unusable in IE9

We really like the idea of this project, however sending our old IE users to a site that is unusable with their browser is a deal breaker.

For this project to be of use to web authors it needs to shoulder the burden of working optimally for the outdated browsers it's encouraging users to move away from.

Create a Changelog

You can be create a Changelog.md to list the diferences between versions.

An error in the js

Hi there,
I think this one of the most elegant way to incite people update their browser.
Unfortunately, I ran into a bug in your script.

Uncaught TypeError: Cannot read property 'style' of null - outdatedBrowser.min.js:128
Using Chrome Version 35.0.1916.153 m, under Win7 Pro

I'm using jQuery to add animations on the click and the error in your script blocks my script.
Any idea?

Thanks.

Add informations about compatibility

Hello,

Thanks for this great tool. I'm gonna use it for my projects.

I think some informations are missing on your README about browser's compatibility.

Does outdated-browser works below IE8 ? IE7 ?

Clarify browser message at http://outdatedbrowser.com/

It is unclear whether or not http://outdatedbrowser.com/ is a landing page for users linked from the outdated banner message (i.e only ever intended to be seen by those using an outdated browser), or a project landing page.

As far as i can tell the outdated browser message is currently shown to all users regardless of browser version. If it is a project landing page, people may get turned off by the incorrect browser message. I know I was initially, as I knew my browser(s) were up to date. A better solution would be for http://outdatedbrowser.com/ to display a message either telling the visitor;

A) Their browser is up to date
B) Their browser is out of date

Latest Opera versions are not available on Linux

Opera 12 is the last version on Linux. All newer versions are only available for Windows and MacOs. The provided information on the side are not really helpful for an average user in the current form.

Google Indexing Issues / One File

Hey,

Inserting that text in the header will make Google index it and present it as a default snippet for the site.
The text should be injected via JS. That's rather easy to do.

There should be really just one JS that injects all the required content and CSS.

Zeno.

Add i18n support

It's good to have different language support for my Taiwanese auntie! (or for aunties all over the world)

Google Chromium

It says my Google Chromium browser was outdated, though I just updated it to the latest version. I generally I use this over Google Chrome. Why? I don't know.

Would it be possible to add this to the list of browsers you accept as "newer"?

New languages

Hi there!

Would it be possible to translate the webpage and the js to other languages?
I would also like to help you to publish a German "outdatedbrowser.com"

Best regards
krautnerds

Bower (feature/languages)

  • create release
  • test
  • register

$ bower register
for example
$ bower register example git://github.com/user/example.git

Warning not show in IE7?

I tried set the lowerThan: 'IE8' and check on IE7, but the warning message didn't show, any idea?

ID/Class names too common

All the ID/Class names used for the required HTML are far too common. For example, I can see a LOT of people using #btnClose on quite a few places on their site. Also why are these IDs instead of classes?

Don't show IE to macs

I love this idea, and hope it simply becomes the defacto way of letting people know they are using an out of date browser. My only question is can you hide IE from mac users, since that is not a viable browser for them to download?

Versioning

Since there's people working on alternative versions of this plugin (wordpress and whatnot) it wouldn't be a bad idea if you guys create actual releases. Specially if the roadmap is to support bower or other service providers.

So, instead of just updating the version number in the files, it would be better to create actual releases with a tagging system.

People using git submodules shouldn't have a problem using the current system, because they can just point it to a branch. However, service providers normally point to a tag.

Keep up!

Default Colors

Change default colors to:
bgColor: '#f25648,
color: '#ffffff,

Wordpress

Hi,
Is there any plans to turn this into a wordpress plugin?
If not would you be happy for me to do so?

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.