

var app = angular.module("app", ['angular-loading-bar']);

app.controller("AppTest", function($scope, $http, $location, $anchorScroll){
  /**
  global vars
  **/
  app=this;
  $scope.hackerTop = "";
  $scope.lobTop = "";
  $scope.rTop = "";
  $scope.hackerNew = "";
  $scope.lobNew = "";
  $scope.rNew = "";
  $scope.content="first";


  /**
  For top posts
  **/
  $http.get('/ycomb').success(function(data) {
      $scope.hackerTop = data;
  });
  $http.get('/lobster').success(function(data) {
      $scope.lobTop = data;
  });
  $http.get('/rp').success(function(data) {
      $scope.rTop = data;
  });

  /**
  For new posts
  **/
  $http.get('/ynew').success(function(data) {
      $scope.hackerNew = data;
  });
  $http.get('/lnew').success(function(data) {
      $scope.lNew = data;
  });
  $http.get('/rnew').success(function(data) {
      $scope.rNew = data;
  });

  $scope.refresh = function(){
    $http.get('/ycomb').success(function(data) {
        $scope.hackerTop = data;
    });
    $http.get('/lobster').success(function(data) {
        $scope.lobTop = data;
    });
    $http.get('/rp').success(function(data) {
        $scope.rTop = data;
    });

    /**
    For new posts
    **/
    $http.get('/ynew').success(function(data) {
        $scope.hackerNew = data;
    });
    $http.get('/lnew').success(function(data) {
        $scope.lNew = data;
    });
    $http.get('/rnew').success(function(data) {
        $scope.rNew = data;
    });
  };

  $scope.goToTop = function(){
    $anchorScroll.yOffset = document.getElementById('container').offsetTop;
    $anchorScroll('container');
  };

  $scope.optionsCloseVisible = false;
  $scope.toggleOptionsMenu = function(){
    const options = document.getElementById('news-options');
    if (options.style.width) {
      options.style.width = '';
    } else {
      options.style.width = '100%';
    }
    $scope.optionsCloseVisible = !$scope.optionsCloseVisible;
  };


});

@@ -1480,26 +1480,22 @@
 ToTop = 
-function()
+() =%3E 
 %7B%0A    $a
@@ -1669,26 +1669,22 @@
 sMenu = 
-function()
+() =%3E 
 %7B%0A    co

Use arrow functions