mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-08-28 14:50:34 +02:00
fix: fix minimization of the client js
This commit is contained in:
+15
-4
@@ -196,7 +196,9 @@ angular
|
|||||||
return capitalized.join(" ");
|
return capitalized.join(" ");
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
.filter("diff", function ($sce) {
|
.filter("diff", [
|
||||||
|
"$sce",
|
||||||
|
function ($sce) {
|
||||||
return function (str) {
|
return function (str) {
|
||||||
if (!str) return str;
|
if (!str) return str;
|
||||||
const lines = str.split("\n");
|
const lines = str.split("\n");
|
||||||
@@ -221,7 +223,8 @@ angular
|
|||||||
}
|
}
|
||||||
return $sce.trustAsHtml(o.join("\n"));
|
return $sce.trustAsHtml(o.join("\n"));
|
||||||
};
|
};
|
||||||
})
|
},
|
||||||
|
])
|
||||||
.directive("markdown", [
|
.directive("markdown", [
|
||||||
"$location",
|
"$location",
|
||||||
function ($location) {
|
function ($location) {
|
||||||
@@ -394,7 +397,11 @@ angular
|
|||||||
return {
|
return {
|
||||||
restrict: "E",
|
restrict: "E",
|
||||||
scope: { file: "=" },
|
scope: { file: "=" },
|
||||||
controller: function ($element, $scope, $http) {
|
controller: [
|
||||||
|
"$element",
|
||||||
|
"$scope",
|
||||||
|
"$http",
|
||||||
|
function ($element, $scope, $http) {
|
||||||
function renderNotebookJSON(json) {
|
function renderNotebookJSON(json) {
|
||||||
const notebook = nb.parse(json);
|
const notebook = nb.parse(json);
|
||||||
try {
|
try {
|
||||||
@@ -425,6 +432,7 @@ angular
|
|||||||
});
|
});
|
||||||
render();
|
render();
|
||||||
},
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@@ -435,7 +443,9 @@ angular
|
|||||||
scope: { stats: "=" },
|
scope: { stats: "=" },
|
||||||
template:
|
template:
|
||||||
"<div class='lang' ng-repeat='lang in elements' title='{{lang.lang|title}}: {{lang.loc | number}} lines' data-toggle='tooltip' data-placement='bottom' style='width:{{lang.loc*100/total}}%;background:{{lang.color}};'></div>",
|
"<div class='lang' ng-repeat='lang in elements' title='{{lang.lang|title}}: {{lang.loc | number}} lines' data-toggle='tooltip' data-placement='bottom' style='width:{{lang.loc*100/total}}%;background:{{lang.color}};'></div>",
|
||||||
controller: function ($scope) {
|
controller: [
|
||||||
|
"$scope",
|
||||||
|
function ($scope) {
|
||||||
function render() {
|
function render() {
|
||||||
$scope.elements = [];
|
$scope.elements = [];
|
||||||
$scope.total = 0;
|
$scope.total = 0;
|
||||||
@@ -461,6 +471,7 @@ angular
|
|||||||
});
|
});
|
||||||
render();
|
render();
|
||||||
},
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user