templates.js

This is generated from interface.html and other sources, including the content as inline strings.

  • /* This Source Code Form is subject to the terms of the Mozilla Public
     * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     * You can obtain one at http://mozilla.org/MPL/2.0/. */
    
    define(["util"], function (util) {
      function clean(t) {
  • Removes <% / ... / %> comments:

        t = t.replace(/[<][%]\s*\/\*[\S\s\r\n]*\*\/\s*[%][>]/, "");
        t = util.trim(t);
        t = t.replace(/http:\/\/localhost:8080/g, TogetherJS.baseUrl);
        return t;
      }
      return {
        "interface": clean("__interface_html__"),
        help: clean("__help_txt__"),
        walkthrough: clean("__walkthrough_html__")
      };
    });