Skip to content

Commit

Permalink
Fixed IE browser compatibles mode
Browse files Browse the repository at this point in the history
  • Loading branch information
devote committed Apr 29, 2014
1 parent 1e6b0de commit f015410
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 37 deletions.
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License (MIT)

Copyright (c) 2010-2013 Dmitrii Pakhtinov
Copyright (c) 2010-2014 Dmitrii Pakhtinov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "history",
"repo": "devote/HTML5-History-API",
"description": "HTML5 History API expansion for browsers not supporting pushState, replaceState",
"version": "4.1.0",
"version": "4.1.1",
"keywords": ["history", "pushState", "replaceState"],
"main": "history.js",
"scripts": ["history.js"],
Expand Down
7 changes: 4 additions & 3 deletions history.iegte8.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
/*!
* History API JavaScript Library v4.1.0
* History API JavaScript Library v4.1.1
*
* Support: IE8+, FF3+, Opera 9+, Safari, Chrome and other
*
* Copyright 2011-2013, Dmitrii Pakhtinov ( spb.piksel@gmail.com )
* Copyright 2011-2014, Dmitrii Pakhtinov ( spb.piksel@gmail.com )
*
* http://spb-piksel.ru/
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Update: 2014-03-24 13:14
* Update: 2014-04-29 15:22
*/
(function(window) {
// Prevent the code from running if there is no window.history object
Expand Down Expand Up @@ -511,6 +511,7 @@
* the same names.
*/
window['execScript']('Public ' + prop, 'VBScript');
window['execScript']('var ' + prop + ';', 'JavaScript');
} else {
try {
/**
Expand Down
16 changes: 8 additions & 8 deletions history.iegte8.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions history.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* History API JavaScript Library v4.1.0
* History API JavaScript Library v4.1.1
*
* Support: IE6+, FF3+, Opera 9+, Safari, Chrome and other
*
Expand All @@ -11,7 +11,7 @@
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* Update: 2014-03-24 13:14
* Update: 2014-04-29 15:22
*/
(function(window) {
// Prevent the code from running if there is no window.history object
Expand Down Expand Up @@ -511,6 +511,7 @@
* the same names.
*/
window['execScript']('Public ' + prop, 'VBScript');
window['execScript']('var ' + prop + ';', 'JavaScript');
} else {
try {
/**
Expand Down Expand Up @@ -1052,7 +1053,7 @@

// testing IE browser
var msie = window['eval'] && eval("/*@cc_on 1;@*/");
if (!msie || +((/msie (\d+)/i.exec(navigator.userAgent) || [, 8])[1]) > 7) {
if (!msie || (document.documentMode && document.documentMode > 7)) {
// If it is not IE or a version greater than seven
return;
}
Expand Down Expand Up @@ -1175,6 +1176,8 @@
if (prop === 'state') {
locationObject = createVBObjects(locationObject);
window.history = historyObject = createVBObjects(historyObject);
// hack for IE7
window['execScript']('var history = window.history;', 'JavaScript');
}
} else {
object[prop] = descriptor.get && descriptor.get();
Expand Down
Loading

0 comments on commit f015410

Please sign in to comment.