CoreFiles by mySites.guru
admin-article-readmore-es5.js30 lines, 993 bytes, from Joomla_4.4.13-Stable-Full_Package.zip
Raw History Compare with 4.4.12
md5
16720e8810a20a9b2c66911ee3048dcb
sha1
35e80dc1cfd81c07a9b51857ed96234f707f49e0
sha256
2dcf1979e573087ef464dd7cd6d632aa33fa819c98b32b76c25fa7ebd23a04bb
(function () {
  'use strict';

  /**
   * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
   * @license    GNU General Public License version 2 or later; see LICENSE.txt
   */
  (function () {
    var options = window.Joomla.getOptions('xtd-readmore');
    window.insertReadmore = function (editor) {
      if (!options) {
        // Something went wrong!
        throw new Error('XTD Button \'read more\' not properly initialized');
      }
      var content = window.Joomla.editors.instances[editor].getValue();
      if (!content) {
        Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">');
      } else if (content && !content.match(/<hr\s+id=("|')system-readmore("|')\s*\/*>/i)) {
        Joomla.editors.instances[editor].replaceSelection('<hr id="system-readmore">');
      } else {
        Joomla.renderMessages({
          error: [options.exists]
        });
        return false;
      }
      return true;
    };
  })();

})();

The same content is in 55 releases, Joomla 4.3.0-alpha3 to 5.0.0-alpha1. See them all, or every version of this file.