CoreFiles by mySites.guru
admin-article-readmore.js32 lines, 1,152 bytes, from Joomla_3.8.3-Stable-Full_Package.zip
Raw History Compare with 3.8.2
md5
3ff3434de7b6c12db707ef19f6a9b340
sha1
4da7e79d7622e6a45de2429a04ee29b06e8878d5
sha256
47834dd427534242309e6bc6494ef664b10d7e59db7db377be0110952d6a8f5b
/**
 * @copyright  Copyright (C) 2005 - 2017 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 {
		/** Use the API, if editor supports it **/
		if (window.Joomla && window.Joomla.editors && window.Joomla.editors.instances && window.Joomla.editors.instances.hasOwnProperty(editor)) {
			window.Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore" />');
		} else {
			window.jInsertEditorText('<hr id="system-readmore" />', editor);
		}
	}
};

The same content is in 24 releases, Joomla 3.7.1-rc1 to 3.8.3. See them all, or every version of this file.