|
@@ -27,7 +27,7 @@ mdviewer.controller('popup', ['$scope', function ($scope) {
|
|
message: 'settings'
|
|
message: 'settings'
|
|
}, function (res) {
|
|
}, function (res) {
|
|
$scope.options = toArray(res.options, 'name', 'enabled')
|
|
$scope.options = toArray(res.options, 'name', 'enabled')
|
|
-
|
|
|
|
|
|
+
|
|
$scope.themes = chrome.runtime.getManifest().web_accessible_resources
|
|
$scope.themes = chrome.runtime.getManifest().web_accessible_resources
|
|
.filter(function (file) {return file.indexOf('/themes/') == 0})
|
|
.filter(function (file) {return file.indexOf('/themes/') == 0})
|
|
.map(function (file) {
|
|
.map(function (file) {
|
|
@@ -41,13 +41,13 @@ mdviewer.controller('popup', ['$scope', function ($scope) {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
init()
|
|
init()
|
|
-
|
|
|
|
|
|
+
|
|
$scope.onOptions = function () {
|
|
$scope.onOptions = function () {
|
|
chrome.extension.sendMessage({
|
|
chrome.extension.sendMessage({
|
|
message: 'options',
|
|
message: 'options',
|
|
options: toObject(JSON.parse(angular.toJson($scope.options)), 'name', 'enabled')
|
|
options: toObject(JSON.parse(angular.toJson($scope.options)), 'name', 'enabled')
|
|
}, function (res) {
|
|
}, function (res) {
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
}
|
|
}
|
|
$scope.onTheme = function () {
|
|
$scope.onTheme = function () {
|
|
@@ -64,7 +64,7 @@ mdviewer.controller('popup', ['$scope', function ($scope) {
|
|
message: 'raw',
|
|
message: 'raw',
|
|
raw: $scope.raw
|
|
raw: $scope.raw
|
|
}, function (res) {
|
|
}, function (res) {
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
}
|
|
}
|
|
$scope.onDefaults = function () {
|
|
$scope.onDefaults = function () {
|