<commit_before>(function () {
  const links = [  // temporily mock received data from server
    {
      title: 'Bloodstone',
      url: 'http://bloodstonedevelopment.tk/',
    },
    {
      title: 'Github',
      url: 'https://github.com/',
    },
    {
      title: 'hvg.hu',
      url: 'http://hvg.hu',
    },
    {
      title: 'Green Fox Academy',
      url: 'http://greenfoxacademy.com',
    },
    {
      title: 'Angular JS',
      url: 'https://angularjs.org/',
    },
    {
      title: 'Origo',
      url: 'http://origo.hu',
    },
    {
      title: 'b.hu',
      url: 'http://b.hu',
    },
    {
      title: 'JS Garden',
      url: 'http://bonsaiden.github.io/JavaScript-Garden/',
    },
  ];

  angular.module('app').controller('BookmarksController', ['$scope', '$rootScope', '$http', '$location', '$log', 'bookmarkFactory', function ($scope, $rootScope, $http, $location, $log, bookmarkFactory) {
    let links = bookmarkFactory.get()
    .then((response) => {
      $log.log(response);
      return response;
    });
    
    $scope.showInputBox = false;
    $scope.logout = () => {
      $http.post('/api/logout')
        .then(() => {
          $rootScope.currentUser = null;
          $location.url('/login');
        });
    };
    $scope.onAddClick = function () {
      $scope.showInputBox = true;
    };
    $scope.saveBookmark = function () {
      const stringJSON = {
        url: $scope.newURL,
        title: 'My Bookmark',
      };
      // TODO: 1. Parse URL; 2. Fetch title (+img, +desc); 3. Save title 4. Cache img, desc(?)<commit_msg>commit before merge<commit_after>(function () {
  const links = [  // temporily mock received data from server
    {
      title: 'Bloodstone',
      url: 'http://bloodstonedevelopment.tk/',
    },
    {
      title: 'Github',
      url: 'https://github.com/',
    },
    {
      title: 'hvg.hu',
      url: 'http://hvg.hu',
    },
    {
      title: 'Green Fox Academy',
      url: 'http://greenfoxacademy.com',
    },
    {
      title: 'Angular JS',
      url: 'https://angularjs.org/',
    },
    {
      title: 'Origo',
      url: 'http://origo.hu',
    },
    {
      title: 'b.hu',
      url: 'http://b.hu',
    },
    {
      title: 'JS Garden',
      url: 'http://bonsaiden.github.io/JavaScript-Garden/',
    },
  ];

  angular.module('app').controller('BookmarksController', ['$scope', '$rootScope', '$http', '$location', '$log', 'bookmarkFactory', function ($scope, $rootScope, $http, $location, $log, bookmarkFactory) {
    let links = [];
    bookmarkFactory.get()
    .then((response) => {
      $log.log(response);
      links = response;
    });

    $scope.showInputBox = false;
    $scope.logout = () => {
      $http.post('/api/logout')
        .then(() => {
          $rootScope.currentUser = null;
          $location.url('/login');
        });
    };
    $scope.onAddClick = function () {
      $scope.showInputBox = true;
    };
    $scope.saveBookmark = function () {
      const stringJSON = {
        url: $scope.newURL,
        title: 'My Bookmark',
      };
      // TODO: 1. Parse URL; 2. Fetch title (+img, +desc); 3. Save title 4. Cache img, desc(?)
{'fraction_non_alphanumeric': 0.19244204509368054, 'fraction_numerical': 0.0025404890441409972, 'mean_word_length': 2.055286129970902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '7560184', 'n_tokens_mistral': 1074, 'n_tokens_neox': 1046, 'n_words': 207}