function lock_file_loc()
{
    if(is_file_locked_loc())
    {
        ta.readOnly = "true";
        pagelocked = true;
        let flocked = document.getElementById('filelocked');
        flocked.style.display = "inline";
        minutesLabel.style.display = "none";
        secondsLabel.style.display = "none";
        savedLabel.style.display = "none";
        cachedLabel.style.display = "none";
        flocked.style.visibility = 'visible';
        alert("This file can only be edited once you steal the lock on it. Refresh to have option to steal the lock. *NOTE* Your last keypress or paste operation was not cached or saved remotely.");
        return -1;
    }
    else
    {
        //localStorage.setItem(open_file + ".lock", sessionid);
        //ta.removeAttribute('readonly');
        //ta.readOnly = "false";
    }
    return 200;
}
//old name, this should really be "check lock" to see if another tab has opened
old name, this should really be "check lock" to see if another tab has opened
old name this should really be " check lock " to see if another tab has opened
function lock_file_loc()
{
    if(is_file_locked_loc())
    {
        ta.readOnly = "true";
        pagelocked = true;
        let flocked = document.getElementById('filelocked');
        flocked.style.display = "inline";
        minutesLabel.style.display = "none";
        secondsLabel.style.display = "none";
        savedLabel.style.display = "none";
        cachedLabel.style.display = "none";
        flocked.style.visibility = 'visible';
        alert("This file can only be edited once you steal the lock on it. Refresh to have option to steal the lock. *NOTE* Your last keypress or paste operation was not cached or saved remotely.");
        return -1;
    }
    else
    {
    }
    return 200;
}
function lock_file_loc ( ) { if ( is_file_locked_loc ( ) ) { ta . readOnly = "true" ; pagelocked = true ; let flocked = document . getElementById ( 'filelocked' ) ; flocked . style . display = "inline" ; minutesLabel . style . display = "none" ; secondsLabel . style . display = "none" ; savedLabel . style . display = "none" ; cachedLabel . style . display = "none" ; flocked . style . visibility = 'visible' ; alert ( "This file can only be edited once you steal the lock on it. Refresh to have option to steal the lock. *NOTE* Your last keypress or paste operation was not cached or saved remotely." ) ; return - 1 ; } else { } return 200 ; }
old name, this should really be "check lock" to see if another tab has opened
old name this should really be " check lock " to see if another tab has opened
//localStorage.setItem(open_file + ".lock", sessionid); //ta.removeAttribute('readonly'); //ta.readOnly = "false";