mirror of
https://github.com/correl/melpa.git
synced 2024-11-25 03:00:10 +00:00
Minor js style fixes
This commit is contained in:
parent
c74c7464cc
commit
6374fa4c21
1 changed files with 4 additions and 5 deletions
|
@ -100,13 +100,13 @@
|
||||||
|
|
||||||
var calculateSourceURL = function(name, recipe) {
|
var calculateSourceURL = function(name, recipe) {
|
||||||
if (recipe.fetcher == "github") {
|
if (recipe.fetcher == "github") {
|
||||||
if (/\//.test(recipe.repo)) {
|
if (recipe.repo.indexOf("/") != -1) {
|
||||||
return "https://github.com/" + recipe.repo +
|
return "https://github.com/" + recipe.repo +
|
||||||
(recipe.branch ? "/tree/" + recipe.branch : "");
|
(recipe.branch ? "/tree/" + recipe.branch : "");
|
||||||
} else {
|
} else {
|
||||||
return "https://gist.github.com/" + recipe.repo;
|
return "https://gist.github.com/" + recipe.repo;
|
||||||
}
|
}
|
||||||
} else if (recipe.fetcher == "wiki" && !recipe.files) {
|
} else if (recipe.fetcher == "wiki") {
|
||||||
return "http://www.emacswiki.org/emacs/" + name + ".el";
|
return "http://www.emacswiki.org/emacs/" + name + ".el";
|
||||||
} else if (recipe.url) {
|
} else if (recipe.url) {
|
||||||
var urlMatch = function(re, prefix) {
|
var urlMatch = function(re, prefix) {
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
dependencies: deps,
|
dependencies: deps,
|
||||||
description: built.desc.replace(/\s*\[((?:source: )?\w+)\]$/, ""),
|
description: built.desc.replace(/\s*\[((?:source: )?\w+)\]$/, ""),
|
||||||
source: recipe.fetcher,
|
source: recipe.fetcher,
|
||||||
downloads: _.reduce(oldNames.concat(name), function(sum, n) { return sum + (downloads[n] || 0); }, 0),
|
downloads: oldNames.concat(name).reduce(function(sum, n) { return sum + (downloads[n] || 0); }, 0),
|
||||||
fetcher: recipe.fetcher,
|
fetcher: recipe.fetcher,
|
||||||
recipeURL: "https://github.com/milkypostman/melpa/blob/master/recipes/" + name,
|
recipeURL: "https://github.com/milkypostman/melpa/blob/master/recipes/" + name,
|
||||||
packageURL: "packages/" + name + "-" + version + "." + (built.type == "single" ? "el" : "tar"),
|
packageURL: "packages/" + name + "-" + version + "." + (built.type == "single" ? "el" : "tar"),
|
||||||
|
@ -202,8 +202,7 @@
|
||||||
var prevPage = _.last(ctrl.prevPages());
|
var prevPage = _.last(ctrl.prevPages());
|
||||||
var nextPage = _.first(ctrl.nextPages());
|
var nextPage = _.first(ctrl.nextPages());
|
||||||
var pageLinkAttrs = function(n) {
|
var pageLinkAttrs = function(n) {
|
||||||
if (n)
|
return n ? { onclick: function(){ ctrl.pageNumber(n); } } : {};
|
||||||
return { onclick: function(){ ctrl.pageNumber(n); } };
|
|
||||||
};
|
};
|
||||||
var pageLink = function(n) {
|
var pageLink = function(n) {
|
||||||
return m("li", m("a", pageLinkAttrs(n), m("span", n)));
|
return m("li", m("a", pageLinkAttrs(n), m("span", n)));
|
||||||
|
|
Loading…
Reference in a new issue