File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -44,12 +44,22 @@ klokantech.jekylledit.JekyllEdit.prototype.setAdminBtn = function(btn) {
44
44
var repo = btn . getAttribute ( 'data-jekylledit-repo' ) ;
45
45
var path = btn . getAttribute ( 'data-jekylledit-path' ) ;
46
46
var lang = btn . getAttribute ( 'data-jekylledit-lang' ) ;
47
- goog . events . listen ( btn , goog . events . EventType . CLICK , function ( e ) {
48
- klokantech . jekylledit . lang . setLanguage ( lang ) ;
47
+ klokantech . jekylledit . lang . setLanguage ( lang ) ;
48
+
49
+ var start = goog . bind ( function ( ) {
49
50
klokantech . jekylledit . utils . installStyle (
50
51
klokantech . jekylledit . BASE_URL + 'static/styles/jekylledit.css' ) ;
51
52
this . initPopup ( repo , path ) ;
52
- } , false , this ) ;
53
+ } , this ) ;
54
+
55
+ goog . events . listen ( btn , goog . events . EventType . CLICK , function ( e ) {
56
+ start ( ) ;
57
+ e . preventDefault ( ) ;
58
+ } ) ;
59
+
60
+ if ( location . hash == '#sign-in' ) {
61
+ start ( ) ;
62
+ }
53
63
} ;
54
64
55
65
You can’t perform that action at this time.
0 commit comments