Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 345 Bytes

File metadata and controls

11 lines (8 loc) · 345 Bytes

JavaScript fixes

window.location.origin

This object exists in the most browsers, but doesn't in older IE browsers. Here's a fix for that:

if(!window.location.origin) {
    window.location.origin = window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
}