MediaWiki:Gadget-oldeditor.js: Difference between revisions

Content deleted Content added
only fix it, if your browser supports VE to begin with
clean up: No need for ['backet'] access, not done anywhere else either
 
(3 intermediate revisions by 3 users not shown)
Line 1:
// This script fully hides the VisualEditor tool, leaving it'sits functionality inaccessible.
// It does not entirely undo the changes, but does restore old look and user-facing behavior.
 
Line 17:
var caEdit = $('#ca-edit a');
$('#ca-editsource a')
.text(caEdit.text());
.attr('title', caEdit.attr('title'));
$('#ca-edit').remove();
$('#ca-editsource').attr('id', 'ca-edit');
Line 33 ⟶ 32:
});
}
});
 
mw.loader.using('mediawiki.api', function () {
var api = new mw.Api();
api.get({ action: 'tokens', type: 'options' }).done(function (json) {
api.post({
action: 'options',
change: 'gadget-oldeditor|visualeditor-betatempdisable=1',
token: json.tokens.optionstoken
});
});
});