CoreFiles by mySites.guru
admin-article-readmore.js27 lines, 873 bytes, from Joomla_4.0.0-alpha3-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha2
md5
fb78df000d6ff95fb3b10e85fc2fbf6a
sha1
24434681c4463ecc0d7c257408e6ccbb96b4d143
sha256
7b519684968a4a76a9e8e652b7c146448e8e5b3a1a44a1979e9684328cc46280
/**
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

window.insertReadmore = function(editor) {
	"use strict";
	if (!Joomla.getOptions('xtd-readmore')) {
		// Something went wrong!
		return false;
	}

	var content, options = window.Joomla.getOptions('xtd-readmore');

	if (window.Joomla && window.Joomla.editors && window.Joomla.editors.instances && window.Joomla.editors.instances.hasOwnProperty(editor)) {
		content = window.Joomla.editors.instances[editor].getValue();
	} else {
		content = (new Function('return ' + options.editor))();
	}

	if (content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
		alert(options.exists);
		return false;
	} else {
		Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">');
	}
};

No other release has this exact content. See every version of this file.