Bug 1151474 - Part 4: Remove use of expression closure from im/themes/. r=florian

This commit is contained in:
Tooru Fujisawa 2015-04-10 00:14:25 +09:00
Родитель 94933b0161
Коммит 97cbfbd5f0
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -80,8 +80,9 @@ const kMsPerMinute = 60 * 1000;
const kMsPerHour = 60 * kMsPerMinute;
const kMsPerDay = 24 * kMsPerHour;
function computeSpace(aInterval)
Math.round(coef * Math.log(aInterval + 1))
function computeSpace(aInterval) {
return Math.round(coef * Math.log(aInterval + 1));
}
var lastMessageTimeout;
var lastMessageTimeoutTime = -1;
@ -238,7 +239,7 @@ function checkNewText(target)
if (!parent.grouped && parent.querySelector("p.event:nth-of-type(4)")) {
var p = document.createElement("p");
p.className = "eventToggle";
p.addEventListener("click", function (event)
p.addEventListener("click", event =>
event.target.parentNode.classList.toggle("hide-children"));
parent.insertBefore(p, parent.querySelector("p.event:nth-of-type(2)"));
parent.classList.add("hide-children");

Просмотреть файл

@ -59,7 +59,7 @@ function checkNewText(target)
if (!parent.grouped && parent.querySelector("p.event:nth-of-type(3)")) {
var div = document.createElement("div");
div.className = "eventToggle";
div.addEventListener("click", function (event)
div.addEventListener("click", event =>
event.target.parentNode.classList.toggle("hide-children"));
parent.insertBefore(div, parent.querySelector("p.event:first-of-type"));
parent.classList.add("hide-children");