Browse Source

Port IE bugfix to latest (was 0.6.3)

master 0.7.2
Kegan Myers 8 years ago
parent
commit
0a0645518c
  1. 2
      bower.json
  2. 3
      build/typertext.js
  3. 2
      build/typertext.js.map
  4. 2
      build/typertext.min.js
  5. 2
      build/typertext.min.js.map
  6. 5
      lib/Typertext/Http/HttpUrl.ts
  7. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{
"name": "Typertext",
"version": "0.7.1",
"version": "0.7.2",
"homepage": "https://github.com/terribleplan/Typertext",
"authors": [
"Kegan Myers <kegan@keganmyers.com>"

3
build/typertext.js

@ -206,6 +206,9 @@ var Typertext;
HttpUrl.FromUrl = function (location) {
var l = document.createElement("a");
l.href = location;
if (!l.hostname || !l.protocol || !l.pathname || !l.search || !l.port) {
l.href = l.href;
}
return new HttpUrl(l.hostname, Typertext.Http.HttpProtocol[l.protocol.slice(0, -1)], l.pathname, HttpUrl.DecodeQueryString(l.search), parseInt(l.port));
};

2
build/typertext.js.map
File diff suppressed because it is too large
View File

2
build/typertext.min.js
File diff suppressed because it is too large
View File

2
build/typertext.min.js.map
File diff suppressed because it is too large
View File

5
lib/Typertext/Http/HttpUrl.ts

@ -35,6 +35,11 @@ module Typertext.Http {
public static FromUrl(location:string):HttpUrl {
var l = document.createElement("a");
l.href = location;
if (!l.hostname || !l.protocol || !l.pathname || !l.search || !l.port) {
//This may seem silly, but it is serious business for IE and relative URLs
//noinspection SillyAssignmentJS
l.href = l.href;
}
return new HttpUrl(l.hostname, HttpProtocol[l.protocol.slice(0,-1)], l.pathname, HttpUrl.DecodeQueryString(l.search), parseInt(l.port))
}

2
package.json

@ -5,7 +5,7 @@
"type": "git",
"url": "https://github.com/terribleplan/Typertext.git"
},
"version": "0.7.1",
"version": "0.7.2",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-cli": "~0.1.13",