<commit_before>/*
 * @file Configuration helper plugin for CKEditor
 * Copyright (C) 2012 <NAME>
 *
 */
(function() {
"use strict";

// Check if the browser supports the placeholder attribute on textareas natively.
var supportsPlaceholder = ('placeholder' in document.createElement( 'textarea' ) );

// If the data is "empty" (BR, P) or the placeholder then return an empty string.
// Otherwise return the original data
function dataIsEmpty( data )
{
	if ( data.length > 20 )
		return false;

	var value = data.replace( /[\n|\t]*/g, '' ).toLowerCase();
	if ( !value || value == '<br>' || value == '<p>&nbsp;<br></p>' || value == '<p><br></p>' || value == '<p>&nbsp;</p>' || value == '&nbsp;' || value == ' ' || value == '&nbsp;<br>' || value == ' <br>' )
		return true;

	return false;
}

function addPlaceholder(ev) {
	var editor = ev.editor;
	var root = (editor.editable ? editor.editable() : (editor.mode == 'wysiwyg' ? editor.document && editor.document.getBody() : editor.textarea  ) );
	var placeholder = ev.listenerData;

	if (editor.mode =='wysiwyg' )
	{
		// If the blur is due to a dialog, don't apply the placeholder
		if ( CKEDITOR.dialog._.currentTop )
			return;

		if ( !root )
			return;<commit_msg>IE8 confighelper fix<commit_after>/*
 * @file Configuration helper plugin for CKEditor
 * Copyright (C) 2012 <NAME>
 *
 */
(function() {
"use strict";

// Check if the browser supports the placeholder attribute on textareas natively.
var supportsPlaceholder = ('placeholder' in document.createElement( 'textarea' ) );

// If the data is "empty" (BR, P) or the placeholder then return an empty string.
// Otherwise return the original data
function dataIsEmpty( data )
{
    if ( ! data ) {
        return true;
    }

	if ( data.length > 20 )
		return false;

	var value = data.replace( /[\n|\t]*/g, '' ).toLowerCase();
	if ( !value || value == '<br>' || value == '<p>&nbsp;<br></p>' || value == '<p><br></p>' || value == '<p>&nbsp;</p>' || value == '&nbsp;' || value == ' ' || value == '&nbsp;<br>' || value == ' <br>' )
		return true;

	return false;
}

function addPlaceholder(ev) {
	var editor = ev.editor;
	var root = (editor.editable ? editor.editable() : (editor.mode == 'wysiwyg' ? editor.document && editor.document.getBody() : editor.textarea  ) );
	var placeholder = ev.listenerData;

	if (editor.mode =='wysiwyg' )
	{
		// If the blur is due to a dialog, don't apply the placeholder
		if ( CKEDITOR.dialog._.currentTop )
			return;

		if ( !root )
			return;
{'fraction_non_alphanumeric': 0.1778672032193159, 'fraction_numerical': 0.005231388329979879, 'mean_word_length': 3.629422718808194, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 29, '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': '1885965', 'n_tokens_mistral': 842, 'n_tokens_neox': 791, 'n_words': 251}