<commit_before>/* Copyright (c) 2013-2016 The TagSpaces Authors.
 * Use of this source code is governed by the MIT license which can be found in the LICENSE.txt file. */

define(function(require, exports, module) {
  "use strict";

  console.log("Loading viewerImage");

  var extensionID = "viewerImage"; // ID should be equal to the directory name where the ext. is located
  var extensionSupportedFileTypes = ["jpeg", "jpg", "png", "gif", "bmp", "ico", "webp"];

  var TSCORE = require("tscore");

  var extensionDirectory = TSCORE.Config.getExtensionPath() + "/" + extensionID;
  var UI;
  var currentFilePath;
  var $containerElement;

  function init(filePath, elementID) {
    console.log("Initalization Browser Image Viewer...");

    $containerElement = $('#' + elementID);
    currentFilePath = filePath;

    var lng = $.i18n.lng();

    $containerElement.append($('<iframe>', {
      id: "iframeViewer",
      sandbox: "allow-same-origin allow-scripts allow-modals",
      scrolling: "no",
      type: "content",
      src: extensionDirectory + "/index.html?cp=" + encodeURIComponent(filePath) + "&setLng=" + lng,
      "nwdisable": "",
      "nwfaketop": ""
    }));

    /* $("#iframeViewer")
			.hammer().on("swipeleft", function() {
				TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getNextFile(internPath));
			})
			.hammer().on("swiperight", function() {
				TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getPrevFile(internPath));
			}); */
  };

  function viewerMode(isViewerMode) {

    console.log("viewerMode not supported on this extension");
  };

  function setContent(content) {

    console.log("setContent not supported on this extension");
  };

  function getContent() {

    console.log("getContent not supported on this extension");
  };

  exports.init = init;
  exports.getContent = getContent;
  exports.setContent = setContent;
  exports.viewerMode = viewerMode;

});<commit_msg>js styling<commit_after>/* Copyright (c) 2013-2016 The TagSpaces Authors.
 * Use of this source code is governed by the MIT license which can be found in the LICENSE.txt file. */

define(function(require, exports, module) {
  "use strict";

  var extensionID = "viewerImage"; // ID should be equal to the directory name where the ext. is located
  var extensionSupportedFileTypes = ["jpeg", "jpg", "png", "gif", "bmp", "ico", "webp"];

  console.log("Loading " + extensionID);

  var TSCORE = require("tscore");
  var extensionDirectory = TSCORE.Config.getExtensionPath() + "/" + extensionID;
  var UI;
  var currentFilePath;
  var $containerElement;

  function init(filePath, elementID) {
    console.log("Initalization Browser Image Viewer...");

    $containerElement = $('#' + elementID);
    currentFilePath = filePath;

    var lng = $.i18n.lng();

    $containerElement.append($('<iframe>', {
      id: "iframeViewer",
      sandbox: "allow-same-origin allow-scripts allow-modals",
      scrolling: "no",
      type: "content",
      src: extensionDirectory + "/index.html?cp=" + encodeURIComponent(filePath) + "&setLng=" + lng,
      "nwdisable": "",
      "nwfaketop": ""
    }));

    /* $("#iframeViewer")
			.hammer().on("swipeleft", function() {
				TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getNextFile(internPath));
			})
			.hammer().on("swiperight", function() {
				TSCORE.FileOpener.openFile(TSCORE.PerspectiveManager.getPrevFile(internPath));
			}); */
  }

  function viewerMode(isViewerMode) {

    console.log("viewerMode not supported on this extension");
  }

  function setContent(content) {

    console.log("setContent not supported on this extension");
  }

  function getContent() {

    console.log("getContent not supported on this extension");
  }

  exports.init = init;
  exports.getContent = getContent;
  exports.setContent = setContent;
  exports.viewerMode = viewerMode;

});
{'fraction_non_alphanumeric': 0.14544983147523982, 'fraction_numerical': 0.005185377236193933, 'mean_word_length': 3.8650693568726355, 'pattern_counts': {'":': 4, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1397600', 'n_tokens_mistral': 1253, 'n_tokens_neox': 1169, 'n_words': 287}