更换编辑器

This commit is contained in:
2020-04-03 11:36:07 +08:00
parent 9dafceb2eb
commit 743d429bb8
591 changed files with 20918 additions and 99838 deletions

View File

@@ -426,4 +426,46 @@ function go_to_top(obj){
}else{
$("#"+obj).fadeOut("slow");
}
}
var load = {
script: function(xyUrl, callback){
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = xyUrl;
//借鉴了jQuery的script跨域方法
script.onload = script.onreadystatechange = function() {
if ((!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
callback && callback();
// Handle memory leak in IE
script.onload = script.onreadystatechange = null;
if (head && script.parentNode) {
head.removeChild(script);
}
}
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
head.insertBefore(script, head.firstChild);
},
css: function(xyUrl, callback){
var head = document.getElementsByTagName('head')[0];
var link = document.createElement('link');
link.type = 'text/css';
link.rel = 'stylesheet';
link.src = xyUrl;
//借鉴了jQuery的script跨域方法
link.onload = link.onreadystatechange = function() {
if ((!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) {
callback && callback();
// Handle memory leak in IE
link.onload = link.onreadystatechange = null;
if (head && link.parentNode) {
head.removeChild(link);
}
}
};
// Use insertBefore instead of appendChild to circumvent an IE6 bug.
head.insertBefore(link, head.firstChild);
}
}