/* Methods */
+ /**
+ * @param $context ResourceLoaderContext
+ * @return array|int|Mixed
+ */
public function getModifiedTime( ResourceLoaderContext $context ) {
$hash = $context->getHash();
if ( isset( $this->modifiedTime[$hash] ) ) {
}
}
+ /**
+ * @param $context ResourceLoaderContext
+ * @return string
+ */
public function getScript( ResourceLoaderContext $context ) {
return Xml::encodeJsCall( 'mw.user.options.set',
array( $this->contextUserOptions( $context ) ) );
}
+ /**
+ * @param $context ResourceLoaderContext
+ * @return array
+ */
public function getStyles( ResourceLoaderContext $context ) {
+ // FIXME: This stuff should really be in its own module, because it gets double-loaded otherwise
+ // (once through a <link>, once when embedded as JS)
global $wgAllowUserCssPrefs;
if ( $wgAllowUserCssPrefs ) {
// Build CSS rules
$rules = array();
+
+ // Underline: 2 = browser default, 1 = always, 0 = never
if ( $options['underline'] < 2 ) {
$rules[] = "a { text-decoration: " .
( $options['underline'] ? 'underline' : 'none' ) . "; }";
return array();
}
+ /**
+ * @return string
+ */
public function getGroup() {
return 'private';
}
+
+ public function getDependencies() {
+ return array( 'mediawiki.user' );
+ }
}