<commit_before>$.Redactor.prototype.WoltLabEvent = function() {
	"use strict";
	
	var _activeInstances = 0;
	
	return {
		init: function() {
			this._callbacks = [];
			this._elementId = this.$element[0].id;
			elData(this.$editor[0], 'element-id', this._elementId);
			
			require(['EventHandler'], (function(EventHandler) {
				this.WoltLabEvent._setEvents(EventHandler);
				
				EventHandler.add('com.woltlab.wcf.redactor2', 'destroy_' + this._elementId, (function () {
					EventHandler.removeAllBySuffix('com.woltlab.wcf.redactor2', this._elementId);
				}).bind(this))
			}).bind(this));
			
			this.$editor[0].addEventListener('focus', function () {
				_activeInstances++;
				
				document.documentElement.classList.add('redactorActive');
			});
			this.$editor[0].addEventListener('blur', function () {
				_activeInstances--;
				
				// short delay to prevent flickering when switching focus between editors
				window.setTimeout(function () {
					if (_activeInstances === 0) {
						document.documentElement.classList.remove('redactorActive');
					}
				}, 100);
			})
		},
		
		_setEvents: function(EventHandler) {
			var elementId = this.$element[0].id;
			
			var observeLoad = this.observe.load;
			this.observe.load = (function() {
				observeLoad.call(this);
				<commit_msg>Disable editor bar toggle on WP/Edge<commit_after>$.Redactor.prototype.WoltLabEvent = function() {
	"use strict";
	
	var _activeInstances = 0;
	
	return {
		init: function() {
			this._callbacks = [];
			this._elementId = this.$element[0].id;
			elData(this.$editor[0], 'element-id', this._elementId);
			
			require(['EventHandler'], (function(EventHandler) {
				this.WoltLabEvent._setEvents(EventHandler);
				
				EventHandler.add('com.woltlab.wcf.redactor2', 'destroy_' + this._elementId, (function () {
					EventHandler.removeAllBySuffix('com.woltlab.wcf.redactor2', this._elementId);
				}).bind(this))
			}).bind(this));
			
			var ua = window.navigator.userAgent.toLowerCase();
			if (ua.indexOf('windows phone') === -1 && ua.indexOf('edge/') === -1) {
				this.$editor[0].addEventListener('focus', function () {
					_activeInstances++;
					
					document.documentElement.classList.add('redactorActive');
				});
				this.$editor[0].addEventListener('blur', function () {
					_activeInstances--;
					
					// short delay to prevent flickering when switching focus between editors
					window.setTimeout(function () {
						if (_activeInstances === 0) {
							document.documentElement.classList.remove('redactorActive');
						}
					}, 100);
				});
			}
		},
		
		_setEvents: function(EventHandler) {
			var elementId = this.$element[0].id;
			
			var observeLoad = this.observe.load;
			this.observe.load = (function() {
				observeLoad.call(this);
				
{'fraction_non_alphanumeric': 0.15684857246114925, 'fraction_numerical': 0.0093964582580412, 'mean_word_length': 3.4789644012944985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3437042', 'n_tokens_mistral': 1082, 'n_tokens_neox': 849, 'n_words': 136}