Index: trunk/extensions/Narayam/ext.narayam.core.js |
— | — | @@ -225,7 +225,6 @@ |
226 | 226 | function updateSchemeFromSelect() { |
227 | 227 | var scheme = $( this ).val(); |
228 | 228 | that.setScheme( scheme ); |
229 | | - $.cookie( 'narayam-scheme', scheme, { 'path': '/', 'expires': 30 } ); |
230 | 229 | } |
231 | 230 | |
232 | 231 | /* Public functions */ |
— | — | @@ -305,6 +304,7 @@ |
306 | 305 | this.setScheme = function( name ) { |
307 | 306 | if ( name in schemes ) { |
308 | 307 | currentScheme = schemes[name]; |
| 308 | + $.cookie( 'narayam-scheme', scheme, { 'path': '/', 'expires': 30 } ); |
309 | 309 | $select.val( name ); |
310 | 310 | } |
311 | 311 | }; |
— | — | @@ -372,6 +372,11 @@ |
373 | 373 | if ( enabledCookie == '1' || ( mw.config.get( 'wgNarayamEnableByDefault' ) && enabledCookie !== '0' ) ) { |
374 | 374 | that.enable(); |
375 | 375 | } |
| 376 | + // Renew the narayam-enabled cookie. naraym-scheme is renewed by setScheme() |
| 377 | + if ( enabledCookie ) { |
| 378 | + $.cookie( 'narayam-enabled', enabledCookie, { 'path': '/', 'expires': 30 } ); |
| 379 | + } |
| 380 | + |
376 | 381 | }; |
377 | 382 | |
378 | 383 | } )(); |