User:Cacycle/wikEd.js: Difference between revisions

Content deleted Content added
0.9.147 (August 4, 2016) add a small bit of code for phab:T135747
Undid revision 733009953 by Alex Monk (WMF) (talk): Possibly causing issues, see phab:T142137
Line 14:
// ==UserScript==
// @name wikEd
// @version 0.9.147146
// @date AugustJuly 410, 2016
// @namespace https://en.wikipedia.org/wiki/User:Cacycle/
// @description A full-featured in-browser editor for Wikipedia and other MediaWikis
Line 3,827:
}
 
// hook wikEd into the enhanced new edit toolbar, not Greasemonkey compatible
if (typeof jQuery == 'function') {
// hook wikEd into the enhanced new edit toolbar, not Greasemonkey compatible
jQuery('#wpTextbox1').bind('encapsulateSelection', function (e, before, inside, after) {
if (wikEd.useWikEd === true) {
Line 3,834:
}
});
// allow other code to cause us to update the textarea via textSelection( 'getContents' )
$( '#wpTextbox1' ).textSelection(
'register',
{
getContents: function () {
wikEd.UpdateTextarea();
return $( this ).val();
}
}
);
}