fix merge conflicts
This commit is contained in:
parent
085ffcf09d
commit
133abb1d2d
2 changed files with 21 additions and 22 deletions
41
demo/demo.js
41
demo/demo.js
|
|
@ -677,27 +677,26 @@ define(function(require, exports, module) {
|
|||
session.addFold(placeHolder, range);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var themes = {};
|
||||
function loadTheme(name, callback) {
|
||||
if (themes[name])
|
||||
return;
|
||||
|
||||
themes[name] = 1;
|
||||
var base = name.split("/").pop();
|
||||
var fileName = "src/theme-" + base + ".js";
|
||||
loadScriptFile(fileName, callback)
|
||||
}
|
||||
|
||||
function loadScriptFile(path, callback) {
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var s = document.createElement('script');
|
||||
|
||||
s.src = path;
|
||||
head.appendChild(s);
|
||||
|
||||
s.onload = callback;
|
||||
}
|
||||
var themes = {};
|
||||
function loadTheme(name, callback) {
|
||||
if (themes[name])
|
||||
return;
|
||||
|
||||
themes[name] = 1;
|
||||
var base = name.split("/").pop();
|
||||
var fileName = "src/theme-" + base + ".js";
|
||||
loadScriptFile(fileName, callback)
|
||||
}
|
||||
|
||||
function loadScriptFile(path, callback) {
|
||||
var head = document.getElementsByTagName('head')[0];
|
||||
var s = document.createElement('script');
|
||||
|
||||
s.src = path;
|
||||
head.appendChild(s);
|
||||
|
||||
s.onload = callback;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue