├── CHANGELOG.md
├── LICENSE
├── README.md
├── bower.json
├── demo
├── default-pt.html
├── default.html
├── design.html
├── index.html
├── jquery.html
└── noajax-fr.html
├── outdatedbrowser
├── lang
│ ├── ar.html
│ ├── cs.html
│ ├── da.html
│ ├── de.html
│ ├── el.html
│ ├── en.html
│ ├── es-pe.html
│ ├── es.html
│ ├── et.html
│ ├── fa.html
│ ├── fi.html
│ ├── fr.html
│ ├── hr.html
│ ├── hu.html
│ ├── hy.html
│ ├── id.html
│ ├── it.html
│ ├── ja.html
│ ├── ko.html
│ ├── lt.html
│ ├── nb.html
│ ├── nl.html
│ ├── pl.html
│ ├── pt-br.html
│ ├── pt.html
│ ├── ro.html
│ ├── ru.html
│ ├── sk.html
│ ├── sl.html
│ ├── sv.html
│ ├── tr.html
│ ├── uk.html
│ ├── zh-cn.html
│ └── zh-tw.html
├── outdatedbrowser.css
├── outdatedbrowser.js
├── outdatedbrowser.min.css
├── outdatedbrowser.min.js
└── outdatedbrowser.scss
└── package.json
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 |
2 | # Outdated Browser — Changelog
3 |
4 | ## v1.1.3
5 | Date: 2016-03-07
6 |
7 | * New naming system for language files using the IETF language tags.
8 | * Changed urls to http://outdatedbrowser.com according to the new language naming system
9 |
10 | ## v1.1.2
11 | Date: 2015-09-10
12 |
13 | * @alexprg: Add Traditional Chinese
14 |
15 | ## v1.1.1
16 | Date: 2015-08-21
17 |
18 | * @alexprg: Bower support
19 | * @alexprg: New languages
20 |
21 |
22 | ## v1.1.0
23 | Date: 2014-08-05
24 |
25 | * @alexprg: Support Languages
26 | * @alexprg: Ajax and no Ajax Support
27 |
28 |
29 | ## v1.0.2
30 | Date: 2014-07-03
31 |
32 | * @alexprg: Inline colors for all elements (override page styles)
33 | * @alexprg: /demo - jquery demo, more info how to use
34 | * @alexprg: update instructions & link for notice image
35 |
36 |
37 | [Bürocratik](http://burocratik.com)
38 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 burocratik
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Outdated Browser v1.1.5
2 |
3 | ### A time saving tool for developers. It detects outdated browsers and advises users to upgrade to a new version.
4 |
5 | So, you're tired of people visiting your modern website with an outdated browser and not doing anything about it.
6 | 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.
7 |
8 | With this solution you can check if the user’s browser can handle your website. If not, it will show a cool [looking notice](http://d.pr/i/Xhf) advising the user to update the browser. It’ll be up to the user to upgrade or not. Don't force the user!
9 |
10 | That's it! As simple as it can get.
11 |
12 | ## How to use it
13 | **Important:** Because of old browsers (e.g. IE6, IE7), we recommend:
14 |
15 |
16 | * Implement this plugin before any other javascripts (plugins or your own scripts);
17 | * Although we tested the AJAX approach, and it's easier to implement, we recommend to use the plugin without AJAX calls (5.).
18 |
19 | 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!
20 |
21 | 1. Include the CSS located in the HTML head:
22 |
23 | ```html
24 |
25 | ```
26 |
27 | 2. Include plugin's script at the bottom of the HTML body:
28 |
29 | ```html
30 |
31 | ```
32 |
33 | 3. Paste the required HTML at the end of your document (see demo examples):
34 |
35 | ```html
36 |
Update your browser to view this website correctly. Outdated Browser
87 | 88 |Remember: If you can't see the message, it's a good thing! You are using a modern browser :D
29 |bgColor: '#f25648', color: '#ffffff', lowerThan: 'transform' (<IE10), languagePath: 'your_path/outdatedbrowser/lang/pt.html'
31 |by Bürocratik
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 69 | 70 | -------------------------------------------------------------------------------- /demo/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Remember: If you can't see the message, it's a good thing! You are using a modern browser :D
29 |bgColor: '#f25648', color: '#ffffff', lowerThan: 'transform' (<IE10), languagePath: 'your_path/outdatedbrowser/lang/en.html'
31 |by Bürocratik
39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /demo/design.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras eu accumsan nisi. Aenean consequat, metus faucibus commodo tristique, quam lorem porta eros, fermentum commodo dolor arcu nec est. Vivamus commodo, eros vel accumsan tempus, nisl lorem lobortis nisl, rhoncus pretium odio ligula quis arcu. Praesent eget sapien mattis, aliquam velit ut, hendrerit dui. Aliquam eget sapien erat. Vestibulum tristique tempor dolor. Vestibulum pulvinar condimentum nibh, id cursus massa faucibus vitae.
33 |bgColor: '#f25648', color: '#ffffff', lowerThan: 'transform' (<IE10), languagePath: ''
35 |DO NOT USE THIS HTML! It's just to show off the design!
37 |by Bürocratik
38 | 39 | 40 | 41 |Update your browser to view this website correctly. Update my browser now
44 | 45 | </body>
by Bürocratik
43 | 44 | 45 | -------------------------------------------------------------------------------- /demo/jquery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |Remember: If you can't see the message, it's a good thing! You are using a modern browser :D
30 |bgColor: '#f25648', color: '#ffffff', lowerThan: 'transform' (<IE10), languagePath: 'your_path/outdatedbrowser/lang/en.html'
32 |by Bürocratik
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /demo/noajax-fr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Remember: If you can't see the message, it's a good thing! You are using a modern browser :D
29 |bgColor: '#f25648', color: '#ffffff', lowerThan: 'transform' (<IE10), languagePath: ''
31 |by Bürocratik
36 | 37 | 38 |Mettez à jour votre navigateur pour afficher correctement ce site Web. Mettre à jour maintenant
41 | 42 |الرجاء تحديث متصفحك لمشاهدة الموقع بشكل جيد۔ تحديث المتصفح الآن
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/cs.html: -------------------------------------------------------------------------------- 1 |Pro správné zobrazení těchto stránek aktualizujte svůj prohlížeč. Aktualizovat prohlížeč nyní
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/da.html: -------------------------------------------------------------------------------- 1 |Opdatér din browser for at få vist denne hjemmeside ordentligt. Opdater min browser nu
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/de.html: -------------------------------------------------------------------------------- 1 |Bitte aktualisieren Sie Ihren Browser, um diese Website korrekt darzustellen. Den Browser jetzt aktualisieren
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/el.html: -------------------------------------------------------------------------------- 1 |Ενημερωσε το προγραμμα περιηγησης για να δεις αυτη την ιστοσελιδα σωστα. Ενημερωση του προγραμματος περιηγησης τωρα
3 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/en.html: -------------------------------------------------------------------------------- 1 |Update your browser to view this website correctly. Update my browser now
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/es-pe.html: -------------------------------------------------------------------------------- 1 |Actualiza tu navegador para visualizar esta página correctamente. Actualizar mi navegador ahora!
3 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/es.html: -------------------------------------------------------------------------------- 1 |Actualiza tu navegador para ver esta página correctamente. Actualizar mi navegador ahora
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/et.html: -------------------------------------------------------------------------------- 1 |Palun uuenda oma veebilehitsejat, et näha lehekülge korrektselt. Uuenda oma veebilehitsejat kohe
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/fa.html: -------------------------------------------------------------------------------- 1 |جهت مشاهده صحیح این وبسایت، مرورگرتان را بروز رسانی نمایید. همین حالا مرورگرم را بروز کن
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/fi.html: -------------------------------------------------------------------------------- 1 |Lataa ajantasainen selain nähdäksesi tämän sivun oikein. Päivitä selaimeni nyt
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/fr.html: -------------------------------------------------------------------------------- 1 |Mettez à jour votre navigateur pour afficher correctement ce site Web. Mettre à jour maintenant
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/hr.html: -------------------------------------------------------------------------------- 1 |Ažurirajte Vaš preglednik za ispravan prikaz ove stranice. Ažuriraj odmah
3 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/hu.html: -------------------------------------------------------------------------------- 1 |Frissítse vagy cserélje le a böngészőjét. A böngészőm frissítése
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/hy.html: -------------------------------------------------------------------------------- 1 |Թարմացրեք այն, որպեսզի տեսնեք այս կայքը ճշգրիտ։ Թարմացնել իմ բրոուզերը հիմա։
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/id.html: -------------------------------------------------------------------------------- 1 |Perbaharuilah browser Anda agar bisa menjelajahi website ini dengan nyaman. Perbaharui browser sekarang
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/it.html: -------------------------------------------------------------------------------- 1 |Aggiornalo per vedere questo sito correttamente. Aggiorna ora
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/ja.html: -------------------------------------------------------------------------------- 1 |こちらのサイトを閲覧するためには、ブラウザをアップグレードしてください。 ブラウザをアップグレードする
3 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/ko.html: -------------------------------------------------------------------------------- 1 |이 웹 페이지가 현재 브라우저에서는 정상적으로 보이지 않을 수 있습니다. 지금 브라우저를 업그레이드하세요!
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/lt.html: -------------------------------------------------------------------------------- 1 |Atnaujinkite savo naršyklę, kad galėtumėte peržiūrėti šią svetainę tinkamai. Atnaujinti naršyklę
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/nb.html: -------------------------------------------------------------------------------- 1 |Oppdater nettleseren din for å oppleve nettstedet riktig. Oppdater nettleseren min nå
3 | 4 | 5 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/nl.html: -------------------------------------------------------------------------------- 1 |Update je browser om deze website correct te bekijken. Update mijn browser nu
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/pl.html: -------------------------------------------------------------------------------- 1 |Zaktualizuj swoją przeglądarkę, aby poprawnie wyświetlić tę stronę. Zaktualizuj przeglądarkę już teraz
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/pt-br.html: -------------------------------------------------------------------------------- 1 |Atualize o seu navegador para ter uma melhor experiência e visualização deste site. Atualize o seu navegador agora
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/pt.html: -------------------------------------------------------------------------------- 1 |Atualize o seu browser para ter uma melhor experiência e visualização deste site. Atualize o seu browser agora
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/ro.html: -------------------------------------------------------------------------------- 1 |Actualizați navigatorul pentru a vizualiza corect acest site. Actualizați navigatorul acum!
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/ru.html: -------------------------------------------------------------------------------- 1 |Обновите ваш браузер для правильного отображения этого сайта. Обновить мой браузер
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/sk.html: -------------------------------------------------------------------------------- 1 |Pre správne zobrazenie tejto webstránky aktualizujte svoj prehliadač. Aktualizovať prehliadač teraz
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/sl.html: -------------------------------------------------------------------------------- 1 |Za pravilen prikaz spletne strani posodobite vaš brskalnik. Posodobi brskalnik
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/sv.html: -------------------------------------------------------------------------------- 1 |Uppdatera din webbläsare för att webbplatsen ska visas korrekt. Uppdatera min webbläsare nu
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/tr.html: -------------------------------------------------------------------------------- 1 |Web sitemizi düzgün görüntülemek için tarayıcınızı güncelleyin.Şimdi güncelle
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/uk.html: -------------------------------------------------------------------------------- 1 |Оновіть ваш браузер для правильного відображення цього сайта. Оновити мій браузер
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/zh-cn.html: -------------------------------------------------------------------------------- 1 |要正常浏览本网站请升级您的浏览器。现在升级
3 | 4 | -------------------------------------------------------------------------------- /outdatedbrowser/lang/zh-tw.html: -------------------------------------------------------------------------------- 1 |要正常瀏覽本網站請升級您的瀏覽器。 現在升級
3 | -------------------------------------------------------------------------------- /outdatedbrowser/outdatedbrowser.css: -------------------------------------------------------------------------------- 1 | /*!-------------------------------------------------------------------- 2 | STYLES "Outdated Browser" 3 | Version: 1.1.2 - 2015 4 | author: Burocratik 5 | website: http://www.burocratik.com 6 | * @preserve 7 | -----------------------------------------------------------------------*/ 8 | #outdated{ 9 | display: none; position: fixed; top: 0; left: 0; width: 100%; height: 170px; 10 | text-align: center; text-transform: uppercase; z-index:1500; 11 | background-color: #f25648; color: #ffffff; 12 | } 13 | * html #outdated{position: absolute;} 14 | #outdated h6{font-size: 25px; line-height: 25px; margin: 30px 0 10px;} 15 | #outdated p{font-size: 12px; line-height: 12px; margin: 0;} 16 | #outdated #btnUpdateBrowser{ 17 | display: block; position: relative; padding: 10px 20px; margin: 30px auto 0; width: 230px; /*need for IE*/ 18 | color: #ffffff; text-decoration: none; border: 2px solid #ffffff; cursor: pointer; 19 | } 20 | #outdated #btnUpdateBrowser:hover{color: #f25648; background-color:#ffffff;} 21 | #outdated .last{position: absolute; top: 10px; right: 25px; width: 20px; height: 20px;} 22 | #outdated .last[dir='rtl']{right: auto !important; left: 25px !important;} 23 | #outdated #btnCloseUpdateBrowser{ 24 | display: block; position: relative; width: 100%; height: 100%; 25 | text-decoration: none; color: #ffffff; font-size: 36px; line-height: 36px; 26 | } 27 | -------------------------------------------------------------------------------- /outdatedbrowser/outdatedbrowser.js: -------------------------------------------------------------------------------- 1 | /*!-------------------------------------------------------------------- 2 | JAVASCRIPT "Outdated Browser" 3 | Version: 1.1.2 - 2015 4 | author: Burocratik 5 | website: http://www.burocratik.com 6 | * @preserve 7 | -----------------------------------------------------------------------*/ 8 | var outdatedBrowser = function(options) { 9 | 10 | //Variable definition (before ajax) 11 | var outdated = document.getElementById("outdated"); 12 | 13 | // Default settings 14 | this.defaultOpts = { 15 | bgColor: '#f25648', 16 | color: '#ffffff', 17 | lowerThan: 'transform', 18 | languagePath: '../outdatedbrowser/lang/en.html' 19 | } 20 | 21 | if (options) { 22 | //assign css3 property or js property to IE browser version 23 | if (options.lowerThan == 'IE8' || options.lowerThan == 'borderSpacing') { 24 | options.lowerThan = 'borderSpacing'; 25 | } else if (options.lowerThan == 'IE9' || options.lowerThan == 'boxShadow') { 26 | options.lowerThan = 'boxShadow'; 27 | } else if (options.lowerThan == 'IE10' || options.lowerThan == 'transform' || options.lowerThan == '' || typeof options.lowerThan === "undefined") { 28 | options.lowerThan = 'transform'; 29 | } else if (options.lowerThan == 'IE11' || options.lowerThan == 'borderImage') { 30 | options.lowerThan = 'borderImage'; 31 | } else if (options.lowerThan == 'Edge' || options.lowerThan == 'js:Promise') { 32 | options.lowerThan = 'js:Promise'; 33 | } 34 | 35 | //all properties 36 | this.defaultOpts.bgColor = options.bgColor; 37 | this.defaultOpts.color = options.color; 38 | this.defaultOpts.lowerThan = options.lowerThan; 39 | this.defaultOpts.languagePath = options.languagePath; 40 | 41 | bkgColor = this.defaultOpts.bgColor; 42 | txtColor = this.defaultOpts.color; 43 | cssProp = this.defaultOpts.lowerThan; 44 | languagePath = this.defaultOpts.languagePath; 45 | } else { 46 | bkgColor = this.defaultOpts.bgColor; 47 | txtColor = this.defaultOpts.color; 48 | cssProp = this.defaultOpts.lowerThan; 49 | languagePath = this.defaultOpts.languagePath; 50 | } //end if options 51 | 52 | 53 | //Define opacity and fadeIn/fadeOut functions 54 | var done = true; 55 | 56 | function function_opacity(opacity_value) { 57 | outdated.style.opacity = opacity_value / 100; 58 | outdated.style.filter = 'alpha(opacity=' + opacity_value + ')'; 59 | } 60 | 61 | // function function_fade_out(opacity_value) { 62 | // function_opacity(opacity_value); 63 | // if (opacity_value == 1) { 64 | // outdated.style.display = 'none'; 65 | // done = true; 66 | // } 67 | // } 68 | 69 | function function_fade_in(opacity_value) { 70 | function_opacity(opacity_value); 71 | if (opacity_value == 1) { 72 | outdated.style.display = 'block'; 73 | } 74 | if (opacity_value == 100) { 75 | done = true; 76 | } 77 | } 78 | 79 | //check if element has a particular class 80 | // function hasClass(element, cls) { 81 | // return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; 82 | // } 83 | 84 | var supports = ( function() { 85 | var div = document.createElement('div'); 86 | var vendors = 'Khtml Ms O Moz Webkit'.split(' '); 87 | var len = vendors.length; 88 | 89 | return function(prop) { 90 | if (prop in div.style) return true; 91 | 92 | prop = prop.replace(/^[a-z]/, function(val) { 93 | return val.toUpperCase(); 94 | }); 95 | 96 | while (len--) { 97 | if (vendors[len] + prop in div.style) { 98 | return true; 99 | } 100 | } 101 | return false; 102 | }; 103 | } )(); 104 | 105 | var validBrowser = false; 106 | 107 | // browser check by js props 108 | if(/^js:+/g.test(cssProp)) { 109 | var jsProp = cssProp.split(':')[1]; 110 | if(!jsProp) 111 | return; 112 | 113 | switch (jsProp) { 114 | case 'Promise': 115 | validBrowser = window.Promise !== undefined && window.Promise !== null && Object.prototype.toString.call(window.Promise.resolve()) === '[object Promise]'; 116 | break; 117 | default: 118 | validBrowser = false; 119 | } 120 | } else { 121 | // check by css3 property (transform=default) 122 | validBrowser = supports('' + cssProp + ''); 123 | } 124 | 125 | 126 | if (!validBrowser) { 127 | if (done && outdated.style.opacity !== '1') { 128 | done = false; 129 | for (var i = 1; i <= 100; i++) { 130 | setTimeout((function (x) { 131 | return function () { 132 | function_fade_in(x); 133 | }; 134 | })(i), i * 8); 135 | } 136 | } 137 | } else { 138 | return; 139 | } //end if 140 | 141 | 142 | //Check AJAX Options: if languagePath == '' > use no Ajax way, html is needed insideUpdate your browser to view this website correctly. Update my browser now
' 190 | + ''; 191 | 192 | 193 | //** AJAX FUNCTIONS - Bulletproof Ajax by Jeremy Keith ** 194 | function getHTTPObject() { 195 | var xhr = false; 196 | if (window.XMLHttpRequest) { 197 | xhr = new XMLHttpRequest(); 198 | } else if (window.ActiveXObject) { 199 | try { 200 | xhr = new ActiveXObject("Msxml2.XMLHTTP"); 201 | } catch ( e ) { 202 | try { 203 | xhr = new ActiveXObject("Microsoft.XMLHTTP"); 204 | } catch ( e ) { 205 | xhr = false; 206 | } 207 | } 208 | } 209 | return xhr; 210 | }//end function 211 | 212 | function grabFile(file) { 213 | var request = getHTTPObject(); 214 | if (request) { 215 | request.onreadystatechange = function() { 216 | displayResponse(request); 217 | }; 218 | request.open("GET", file, true); 219 | request.send(null); 220 | } 221 | return false; 222 | } //end grabFile 223 | 224 | function displayResponse(request) { 225 | var insertContentHere = document.getElementById("outdated"); 226 | if (request.readyState == 4) { 227 | if (request.status == 200 || request.status == 304) { 228 | insertContentHere.innerHTML = request.responseText; 229 | } else { 230 | insertContentHere.innerHTML = ajaxEnglishDefault; 231 | } 232 | startStylesAndEvents(); 233 | } 234 | return false; 235 | }//end displayResponse 236 | 237 | ////////END of outdatedBrowser function 238 | }; 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | -------------------------------------------------------------------------------- /outdatedbrowser/outdatedbrowser.min.css: -------------------------------------------------------------------------------- 1 | /*!-------------------------------------------------------------------- 2 | STYLES "Outdated Browser" 3 | Version: 1.1.2 - 2015 4 | author: Burocratik 5 | website: http://www.burocratik.com 6 | * @preserve 7 | -----------------------------------------------------------------------*/ 8 | #outdated{display:none;position:fixed;top:0;left:0;width:100%;height:170px;text-align:center;text-transform:uppercase;z-index:1500;background-color:#f25648;color:#fff}* html #outdated{position:absolute}#outdated h6{font-size:25px;line-height:25px;margin:30px 0 10px}#outdated p{font-size:12px;line-height:12px;margin:0}#outdated #btnUpdateBrowser{display:block;position:relative;padding:10px 20px;margin:30px auto 0;width:230px;color:#fff;text-decoration:none;border:2px solid #fff;cursor:pointer}#outdated #btnUpdateBrowser:hover{color:#f25648;background-color:#fff}#outdated .last{position:absolute;top:10px;right:25px;width:20px;height:20px}#outdated #btnCloseUpdateBrowser{display:block;position:relative;width:100%;height:100%;text-decoration:none;color:#fff;font-size:36px;line-height:36px} -------------------------------------------------------------------------------- /outdatedbrowser/outdatedbrowser.min.js: -------------------------------------------------------------------------------- 1 | /*!-------------------------------------------------------------------- 2 | JAVASCRIPT "Outdated Browser" 3 | Version: 1.1.2 - 2015 4 | author: Burocratik 5 | website: http://www.burocratik.com 6 | * @preserve 7 | -----------------------------------------------------------------------*/ 8 | var outdatedBrowser=function(t){function o(t){s.style.opacity=t/100,s.style.filter="alpha(opacity="+t+")"}function e(t){o(t),1==t&&(s.style.display="block"),100==t&&(u=!0)}function r(){var t=document.getElementById("btnCloseUpdateBrowser"),o=document.getElementById("btnUpdateBrowser");s.style.backgroundColor=bkgColor,s.style.color=txtColor,s.children[0].style.color=txtColor,s.children[1].style.color=txtColor,o.style.color=txtColor,o.style.borderColor&&(o.style.borderColor=txtColor),t.style.color=txtColor,t.onmousedown=function(){return s.style.display="none",!1},o.onmouseover=function(){this.style.color=bkgColor,this.style.backgroundColor=txtColor},o.onmouseout=function(){this.style.color=txtColor,this.style.backgroundColor=bkgColor}}function l(){var t=!1;if(window.XMLHttpRequest)t=new XMLHttpRequest;else if(window.ActiveXObject)try{t=new ActiveXObject("Msxml2.XMLHTTP")}catch(o){try{t=new ActiveXObject("Microsoft.XMLHTTP")}catch(o){t=!1}}return t}function a(t){var o=l();return o&&(o.onreadystatechange=function(){n(o)},o.open("GET",t,!0),o.send(null)),!1}function n(t){var o=document.getElementById("outdated");return 4==t.readyState&&(o.innerHTML=200==t.status||304==t.status?t.responseText:d,r()),!1}var s=document.getElementById("outdated");this.defaultOpts={bgColor:"#f25648",color:"#ffffff",lowerThan:"transform",languagePath:"../outdatedbrowser/lang/en.html"},t?("IE8"==t.lowerThan||"borderSpacing"==t.lowerThan?t.lowerThan="borderSpacing":"IE9"==t.lowerThan||"boxShadow"==t.lowerThan?t.lowerThan="boxShadow":"IE10"==t.lowerThan||"transform"==t.lowerThan||""==t.lowerThan||"undefined"==typeof t.lowerThan?t.lowerThan="transform":("IE11"==t.lowerThan||"borderImage"==t.lowerThan)&&(t.lowerThan="borderImage"),this.defaultOpts.bgColor=t.bgColor,this.defaultOpts.color=t.color,this.defaultOpts.lowerThan=t.lowerThan,this.defaultOpts.languagePath=t.languagePath,bkgColor=this.defaultOpts.bgColor,txtColor=this.defaultOpts.color,cssProp=this.defaultOpts.lowerThan,languagePath=this.defaultOpts.languagePath):(bkgColor=this.defaultOpts.bgColor,txtColor=this.defaultOpts.color,cssProp=this.defaultOpts.lowerThan,languagePath=this.defaultOpts.languagePath);var u=!0,i=function(){var t=document.createElement("div"),o="Khtml Ms O Moz Webkit".split(" "),e=o.length;return function(r){if(r in t.style)return!0;for(r=r.replace(/^[a-z]/,function(t){return t.toUpperCase()});e--;)if(o[e]+r in t.style)return!0;return!1}}();if(!i(""+cssProp)){if(u&&"1"!==s.style.opacity){u=!1;for(var c=1;100>=c;c++)setTimeout(function(t){return function(){e(t)}}(c),8*c)}" "===languagePath||0==languagePath.length?r():a(languagePath);var d='Update your browser to view this website correctly. Update my browser now
'}}; -------------------------------------------------------------------------------- /outdatedbrowser/outdatedbrowser.scss: -------------------------------------------------------------------------------- 1 | /*!-------------------------------------------------------------------- 2 | STYLES "Outdated Browser" 3 | Version: 1.1.2 - 2015 4 | author: Burocratik 5 | website: http://www.burocratik.com 6 | * @preserve 7 | -----------------------------------------------------------------------*/ 8 | #outdated { 9 | display: none; 10 | position: fixed; 11 | top: 0; 12 | left: 0; 13 | width: 100%; 14 | height: 170px; 15 | text-align: center; 16 | text-transform: uppercase; 17 | z-index:1500; 18 | background-color: #f25648; 19 | color: #ffffff; 20 | h6 { 21 | font-size: 25px; 22 | line-height: 25px; 23 | margin: 30px 0 10px; 24 | } 25 | p { 26 | font-size: 12px; 27 | line-height: 12px; 28 | margin: 0; 29 | } 30 | #btnUpdateBrowser { 31 | display: block; 32 | position: relative; 33 | padding: 10px 20px; 34 | margin: 30px auto 0; 35 | width: 230px; /*need for IE*/ 36 | color: #ffffff; 37 | text-decoration: none; 38 | border: 2px solid #ffffff; 39 | cursor: pointer; 40 | &:hover { 41 | color: #f25648; 42 | background-color:#ffffff; 43 | } 44 | } 45 | .last { 46 | position: absolute; 47 | top: 10px; 48 | right: 25px; 49 | width: 20px; 50 | height: 20px; 51 | &[dir='rtl'] { 52 | right: auto !important; 53 | left: 25px !important; 54 | } 55 | } 56 | #btnCloseUpdateBrowser{ 57 | display: block; 58 | position: relative; 59 | width: 100%; 60 | height: 100%; 61 | text-decoration: none; 62 | color: #ffffff; 63 | font-size: 36px; 64 | line-height: 36px; 65 | } 66 | * html & { 67 | position: absolute; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "outdatedbrowser", 3 | "version": "1.1.5", 4 | "description": "A time saving tool for developers. It detects outdated browsers and advises users to upgrade to a new version.", 5 | "main": "outdatedbrowser/outdatedbrowser.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/burocratik/outdated-browser.git" 9 | }, 10 | "author": "Bürocratik