Commit 10b2c212 by ichuang

fix javascript for signup modal .click() in index.html for safari

parent 46bc7bc4
......@@ -148,7 +148,26 @@
% if show_signup_immediately is not UNDEFINED:
<script type="text/javascript">
function dosignup(){
document.getElementById('signup').click();
comp = document.getElementById('signup');
try { //in firefox
comp.click();
return;
} catch(ex) {}
try { // in old chrome
if(document.createEvent) {
var e = document.createEvent('MouseEvents');
e.initEvent( 'click', true, true );
comp.dispatchEvent(e);
return;
}
} catch(ex) {}
try { // in IE, safari
if(document.createEventObject) {
var evObj = document.createEventObject();
comp.fireEvent("onclick", evObj);
return;
}
} catch(ex) {}
}
$(window).load(dosignup);
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment