Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge branch 'ie10-support' of https://github.com/humphd/brackets int…
Browse files Browse the repository at this point in the history
…o humphd/ie10-support
  • Loading branch information
redmunds committed Jul 25, 2014
2 parents 5825ee7 + b8b8ef1 commit f4b9c33
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
define(function (require, exports, module) {
"use strict";

// Load dependent non-module scripts
require("widgets/bootstrap-dropdown");
require("widgets/bootstrap-modal");
Expand All @@ -59,7 +59,7 @@ define(function (require, exports, module) {
require("thirdparty/CodeMirror2/addon/search/match-highlighter");
require("thirdparty/CodeMirror2/addon/search/searchcursor");
require("thirdparty/CodeMirror2/keymap/sublime");

// Load dependent modules
var Global = require("utils/Global"),
AppInit = require("utils/AppInit"),
Expand Down
11 changes: 7 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,12 @@ require.config({
locale: window.localStorage.getItem("locale") || (typeof (brackets) !== "undefined" ? brackets.app.language : navigator.language)
});

define(function (require, exports, module) {
define(function (require) {
"use strict";

// Load the brackets module. This is a self-running module that loads and runs the entire application.
require("brackets");

// Load compatibility shims--these need to load early, be careful moving this
require(["utils/Compatibility"], function () {
// Load the brackets module. This is a self-running module that loads and runs the entire application.
require(["brackets"]);
});
});
42 changes: 42 additions & 0 deletions src/utils/Compatibility.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
*
* 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:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*/


/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */
/*global define */

/**
* Compatibility shims for running Brackets in various environments, browsers.
*/
define(function () {
"use strict";

// [IE10] String.prototype missing trimRight() and trimLeft()
if (!String.prototype.trimRight) {
String.prototype.trimRight = function () { return this.replace(/\s+$/, ""); };
}
if (!String.prototype.trimLeft) {
String.prototype.trimLeft = function () { return this.replace(/^\s+/, ""); };
}

});

0 comments on commit f4b9c33

Please sign in to comment.