anchor.diff:          ok.button('disable');
         }
       });
  -    var end = initialFilename.lastIndexOf('.');
  -    if (end == -1) {
  -      end = initialFilename.length;
  -    }
  +    const lastDot = initialFilename.lastIndexOf('.');
  +    const end = (lastDot != -1) ? lastDot : initialFilename.length;
       input[0].setSelectionRange(0, end);
       fileOperationDialog.dialog('open');
     };
   
     // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   
  -  var makeInput = function(name, filename) {
  -    var input = $('<input>', {
  +  const makeInput = function(name, filename) {
  +    const input = $('<input>', {
         type: 'text',
         id: name+'-filename',
         'name': name+'-filename',
  
positive.code: 
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    var renameFileFromTo = function(oldFilename, newFilename) {
      cd.saveCodeFromIndividualSyntaxHighlightEditor(oldFilename);
      var oldFile = cd.fileContentFor(oldFilename);
      var content = oldFile.val();
      var scrollTop = oldFile.scrollTop();
      var scrollLeft = oldFile.scrollLeft();
      var caretPos = oldFile.caret();
  
      cd.fileDiv(oldFilename).remove();
  
  
negative.code: 
    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  
    const isValidFilename = function(filename) {
      const contains = function(illegal) { return filename.indexOf(illegal) != -1; };
      if (cd.filenameAlreadyExists(filename)) { return false; }
      if (contains('..')) { return false; }
      if (contains('\\')) { return false; }
  