*/
Title.exists = function ( title ) {
var match,
- type = $.type( title ),
obj = Title.exist.pages;
- if ( type === 'string' ) {
+ if ( typeof title === 'string' ) {
match = obj[ title ];
- } else if ( type === 'object' && title instanceof Title ) {
+ } else if ( title instanceof Title ) {
match = obj[ title.toString() ];
} else {
throw new Error( 'mw.Title.exists: title must be a string or an instance of Title' );
}
- if ( typeof match === 'boolean' ) {
- return match;
+ if ( typeof match !== 'boolean' ) {
+ return null;
}
- return null;
+ return match;
};
/**
@import 'mediawiki.ui/variables';
+// Increase the area of the button, so that the user can move the mouse cursor
+// to the popup without the popup disappearing. (T157544)
+.mediawiki-filewarning-anchor {
+ padding-bottom: 10px;
+ margin-bottom: -10px;
+}
+
.mediawiki-filewarning {
visibility: hidden;