app/assets/javascripts/kf5.js in kf5-0.3.2 vs app/assets/javascripts/kf5.js in kf5-0.3.3
- old
+ new
@@ -1,5 +1,7 @@
+//= require kf5.turbolinks
+
(function(window, config)
{
"use strict";
var
@@ -224,14 +226,14 @@
};
var supportbox;
function onload()
{
- // if(supportbox)
- // {
- // return;
- // }
+ if(supportbox)
+ {
+ return;
+ }
var script = window.document.createElement('script'),
configURL = supportboxConfigURL;
embed(configURL, function(win)
@@ -247,10 +249,9 @@
// }, 30 * 1000);
}
});
}
- document.addEventListener('page:load', onload, false);
window.addEventListener('load', onload, false);
if(!window.initializeKF5SupportBox)
{
// 暴露初始化方法,以解决特殊情况下load事件无法触发