提交 d0d7c584 编写于 作者: K kohsuke

lazy script loading is an useful technique elsewhere

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@13531 71c3de6d-444a-0410-be80-ed276b4c234a
上级 36450dec
......@@ -1318,15 +1318,19 @@ var DragDrop = function(id, sGroup, config) {
});
})();
function loadScript(href) {
var s = document.createElement("script");
s.setAttribute("src",href);
document.getElementsByTagName("HEAD")[0].appendChild(s);
}
var updateCenter = {
postBackURL : null,
info: {},
completionHandler: null,
checkUpdates : function() {
var s = document.createElement("script");
s.setAttribute("src","https://hudson.dev.java.net/update-center.json?"+Hash.toQueryString(updateCenter.info));
document.getElementsByTagName("HEAD")[0].appendChild(s);
loadScript("https://hudson.dev.java.net/update-center.json?"+Hash.toQueryString(updateCenter.info));
},
post : function(data) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册