function startWatching() {

        /**
         * Check if the browser support the FileReader function.
         * @param  {object} typeof Check if FileReader is an existing function
         * @return {string}        The error message if function does not exists in the browser
         */
        if (typeof window.FileReader !== 'function') {
            displayError("The file API isn't supported on this browser yet. The program will not run properly!", "danger");
            return;
        }

        /**
         * Will hold the file as file name with an internal pointer to the selected file
         * @var {string} \The selected file
         */
        var file;

        /**
         * Get current state of the input field
         * @var {object} \The input field
         */
        input = document.getElementById('filename');

        /**
         * 1. Check if file field exists
         * 2. Check if browser supports file field type | [type="file"]
         * 3. Check if user selected a file before clicking
         * 4. Start watching file if previous checks failed.
         * @param {object} \The current state of the input field
         */
        if (!input) {
            displayError("Um, couldn't find the filename element.", "warning");
            return;
        }
        else if (!input.files) {
            displayError("This browser doesn't seem to support the `files` property of file inputs.", "warning");
            return;
        }
        else if (!input.files[0]) {
            displayError("Please select a file before clicking 'Watch'", "warning");
            return;
        }
        else {
            displayError("Watching file", "success");

            /**
             * Run tick function on set interval time
             * @param {function} \The function to call
             * @param {integer}  \The interval time set in milliseconds
             */
            setInterval(tick, 1000);
        }
    }
/**
     * Will read the file without posting it to the server
     * @var {object} \Input file field
     */
Will read the file without posting it to the server
@var {object} \Input file field
Will read the file without posting it to the server @var { object } \ Input file field
function startWatching() {
        if (typeof window.FileReader !== 'function') {
            displayError("The file API isn't supported on this browser yet. The program will not run properly!", "danger");
            return;
        }
        var file;
        input = document.getElementById('filename');
        if (!input) {
            displayError("Um, couldn't find the filename element.", "warning");
            return;
        }
        else if (!input.files) {
            displayError("This browser doesn't seem to support the `files` property of file inputs.", "warning");
            return;
        }
        else if (!input.files[0]) {
            displayError("Please select a file before clicking 'Watch'", "warning");
            return;
        }
        else {
            displayError("Watching file", "success");
            setInterval(tick, 1000);
        }
    }
function startWatching ( ) { if ( typeof window . FileReader !== 'function' ) { displayError ( "The file API isn't supported on this browser yet. The program will not run properly!" , "danger" ) ; return ; } var file ; input = document . getElementById ( 'filename' ) ; if ( ! input ) { displayError ( "Um, couldn't find the filename element." , "warning" ) ; return ; } else if ( ! input . files ) { displayError ( "This browser doesn't seem to support the `files` property of file inputs." , "warning" ) ; return ; } else if ( ! input . files [ 0 ] ) { displayError ( "Please select a file before clicking 'Watch'" , "warning" ) ; return ; } else { displayError ( "Watching file" , "success" ) ; setInterval ( tick , 1000 ) ; } }
Will read the file without posting it to the server
 @var {object} \Input file field
Will read the file without posting it to the server @var { object } \ Input file field
/**
         * Check if the browser support the FileReader function.
         * @param  {object} typeof Check if FileReader is an existing function
         * @return {string}        The error message if function does not exists in the browser
         */ /**
         * Will hold the file as file name with an internal pointer to the selected file
         * @var {string} \The selected file
         */ /**
         * Get current state of the input field
         * @var {object} \The input field
         */ /**
         * 1. Check if file field exists
         * 2. Check if browser supports file field type | [type="file"]
         * 3. Check if user selected a file before clicking
         * 4. Start watching file if previous checks failed.
         * @param {object} \The current state of the input field
         */ /**
             * Run tick function on set interval time
             * @param {function} \The function to call
             * @param {integer}  \The interval time set in milliseconds
             */