Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #1829 from Solution4Future/old_browsers
Browse files Browse the repository at this point in the history
Fixed #1709 and added information for not supported old browsers
  • Loading branch information
seanlinsley committed Jan 8, 2014
2 parents 0464c57 + 4472dc0 commit bbbf9d5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
21 changes: 21 additions & 0 deletions js/gittip/upgrade.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Gittip.upgrade = {};

Gittip.upgrade.init = function () {

var userAgent = navigator.userAgent.toLowerCase();
var browser = (userAgent.indexOf('msie') != -1) ? parseInt(userAgent.split('msie')[1]) : -1;

if(browser != -1 && browser < 9) {
var message = '' +
'<div id="upgrade_browser">' +
' <div class="container">' +
'This browser isn\'t supported by GitTip.com. ' +
'We encourage You to upgrade or change browser. ' +
'<a href="http://browsehappy.com">Learn more</a>' +
' </div>' +
'</div>';
$("body").prepend(message);
}
};

$(document).ready(Gittip.upgrade.init);
2 changes: 1 addition & 1 deletion scss/gittip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@import "lib/dropdown"; // You guessed it... dropdowns.
@import "lib/chart";

@import "lib/upgrade";

// Page layout styles

Expand Down
6 changes: 6 additions & 0 deletions scss/lib/upgrade.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#upgrade_browser {
background: #FFFE26;
width: 100%;
height: auto;
padding: 5px;
}

0 comments on commit bbbf9d5

Please sign in to comment.