/usr/share/mediawiki-extensions/collection/js/suggest.js is in mediawiki-extensions-collection 3.7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | (function($) {
var script_url = wgServer +
((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript);
function set_status(html) {
if (html) {
$('#collectionSuggestStatus').css('visibility', 'visible').html(html);
} else {
$('#collectionSuggestStatus').css('visibility', 'hidden').html(' ');
}
}
function collectionSuggestCall(func, args) {
set_status('...');
$.post(script_url, {
'action': 'ajax',
'rs': 'wfAjaxCollectionSuggest' + func,
'rsargs[]': args
}, function(result) {
wfCollectionSave(result.collection);
if (func == 'undo') {
set_status(false);
} else {
set_status(result.last_action);
}
$('#collectionSuggestions').html(result.suggestions_html);
$('#collectionMembers').html(result.members_html);
$('#coll-num_pages').text(result.num_pages);
$.getJSON(script_url, {
'action': 'ajax',
'rs': 'wfAjaxCollectionGetBookCreatorBoxContent',
'rsargs[]': ['suggest', null, wgPageName]
}, function(result) {
$('#coll-book_creator_box').html(result.html);
});
}, 'json');
}
window.collectionSuggestCall = collectionSuggestCall;
})(jQuery);
|