MediaWiki:Gadget-MobileScript.js: Difference between revisions

m
no edit summary
No edit summary
mNo edit summary
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Any JavaScript here will be loaded for users of the mobile site */
/* Any JavaScript here will be loaded for users of the mobile site */


/* Fix search back button issue */
/* Expand single talk section */
$('body.anon').on('click', '.cancel', function(e) {
$(function() {
console.log('aaaa');
setTimeout(function() {
e.preventDefault();
if ($('.ns-talk .collapsible-heading').length === 1)
e.stopPropagation();
$('.collapsible-heading:not(.open-block)').click();
e.stopImmediatePropagation();
}, 100);
console.log('gggg');
});
});


Line 24: Line 23:
var optionsLink = '/Special:MobileOptions';
var optionsLink = '/Special:MobileOptions';
var optionsDesc = 'Settings for the mobile site';
var optionsDesc = 'Settings for the mobile site';
mediaWiki.util.addPortletLink('p-tb', optionsLink, 'Mobile options', 't-options', optionsDesc);
mw.util.addPortletLink('p-tb', optionsLink, 'Mobile options', 't-options', optionsDesc);
}
}
});
});