1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 20:32:25 +01:00
This commit is contained in:
Kris Maglione
2008-09-11 20:50:32 +00:00
parent 88ed44450f
commit fc36dcf01e
2 changed files with 15 additions and 30 deletions

View File

@@ -1486,31 +1486,20 @@ liberator.Marks = function () //{{{
function getSortedMarks() function getSortedMarks()
{ {
var lmarks, umarks;
// local marks // local marks
var lmarks = []; lmarks = [[[mark, value[i]] for (i in value)
if (value[i].location == window.content.location.href)]
for (var mark in localMarks) for ([mark, value] in Iterator(localMarks))];
{ lmarks = Array.concat.apply(Array, lmarks);
for (var i = 0; i < localMarks[mark].length; i++)
{
if (localMarks[mark][i].location == window.content.location.href)
lmarks.push([mark, localMarks[mark][i]]);
}
}
lmarks.sort(); lmarks.sort();
// URL marks // URL marks
var umarks = [];
// FIXME: why does umarks.sort() cause a "Component is not available = // FIXME: why does umarks.sort() cause a "Component is not available =
// NS_ERROR_NOT_AVAILABLE" exception when used here? // NS_ERROR_NOT_AVAILABLE" exception when used here?
for (var mark in urlMarks) umarks = [[key, mark] for ([key, mark] in Iterator(urlMarks))];
umarks.push([mark, urlMarks[mark]]); umarks.sort(function (a, b) a[0].localeCompare(b[0]));
umarks.sort(function (a, b) {
return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0;
});
return lmarks.concat(umarks); return lmarks.concat(umarks);
} }

View File

@@ -878,20 +878,16 @@ liberator.Editor = function () //{{{
} }
// } // }
// blink the textbox after returning - TODO: could use setInterval // blink the textbox after returning
if (textBox) if (textBox)
{ {
var timeout = 100; var timeout = 100;
textBox.style.backgroundColor = tmpBg; var colors = [tmpBg, oldBg, tmpBg, oldBg];
setTimeout(function () { (function() {
textBox.style.backgroundColor = oldBg; textBox.style.backgroundColor = colors.shift();
setTimeout(function () { if(colors.length > 0)
textBox.style.backgroundColor = tmpBg; setTimeout(arguments.callee, timeout)
setTimeout(function () { })();
textBox.style.backgroundColor = oldBg;
}, timeout);
}, timeout);
}, timeout);
} }
tmpfile.remove(false); tmpfile.remove(false);