Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js |
— | — | @@ -1152,8 +1152,9 @@ |
1153 | 1153 | |
1154 | 1154 | /** |
1155 | 1155 | * Only certain users can see the expertise checkboxes and email |
| 1156 | + * (bucketed on init) |
1156 | 1157 | */ |
1157 | | - showOptions: 'show' === mw.user.bucket( 'ext.articleFeedbackv5-options', mw.config.get( 'wgArticleFeedbackv5Options' ) ), |
| 1158 | + showOptions: false, |
1158 | 1159 | |
1159 | 1160 | /** |
1160 | 1161 | * Whether we need to load the aggregate ratings the next time the button is |
— | — | @@ -1247,6 +1248,17 @@ |
1248 | 1249 | }, |
1249 | 1250 | |
1250 | 1251 | // }}} |
| 1252 | + // {{{ init |
| 1253 | + |
| 1254 | + /** |
| 1255 | + * Initializes the bucket |
| 1256 | + */ |
| 1257 | + init: function () { |
| 1258 | + var opt = mw.user.bucket( 'ext.articleFeedbackv5-options', mw.config.get( 'wgArticleFeedbackv5Options' ) ) |
| 1259 | + $.articleFeedbackv5.currentBucket().showOptions = ( 'show' === opt ); |
| 1260 | + }, |
| 1261 | + |
| 1262 | + // }}} |
1251 | 1263 | // {{{ getTitle |
1252 | 1264 | |
1253 | 1265 | /** |
— | — | @@ -1867,6 +1879,10 @@ |
1868 | 1880 | $.articleFeedbackv5.debug = mw.config.get( 'wgArticleFeedbackv5Debug' ) ? true : false; |
1869 | 1881 | // Go ahead and bucket right away |
1870 | 1882 | $.articleFeedbackv5.selectBucket(); |
| 1883 | + // Anything the bucket needs to do? |
| 1884 | + if ( 'init' in $.articleFeedbackv5.currentBucket() ) { |
| 1885 | + $.articleFeedbackv5.currentBucket().init(); |
| 1886 | + } |
1871 | 1887 | // When the tool is visible, load the form |
1872 | 1888 | $.articleFeedbackv5.$holder.appear( function () { |
1873 | 1889 | if ( !$.articleFeedbackv5.isLoaded ) { |
Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.startup.js |
— | — | @@ -26,11 +26,6 @@ |
27 | 27 | // Not viewing the printable version |
28 | 28 | && mw.util.getParamValue( 'printable' ) != 'yes' |
29 | 29 | ) { |
30 | | - // Assign a tracking bucket using options from wgArticleFeedbackv5Tracking |
31 | | - mw.user.bucket( |
32 | | - 'ext.articleFeedbackv5-tracking', mw.config.get( 'wgArticleFeedbackv5Tracking' ) |
33 | | - ); |
34 | | - |
35 | 30 | // Collect categories for intersection tests |
36 | 31 | var categories = { |
37 | 32 | 'include': mw.config.get( 'wgArticleFeedbackv5Categories', [] ), |