1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 10:18:00 +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()
{
var lmarks, umarks;
// local marks
var lmarks = [];
for (var mark in localMarks)
{
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 = [[[mark, value[i]] for (i in value)
if (value[i].location == window.content.location.href)]
for ([mark, value] in Iterator(localMarks))];
lmarks = Array.concat.apply(Array, lmarks);
lmarks.sort();
// URL marks
var umarks = [];
// FIXME: why does umarks.sort() cause a "Component is not available =
// NS_ERROR_NOT_AVAILABLE" exception when used here?
for (var mark in urlMarks)
umarks.push([mark, urlMarks[mark]]);
umarks.sort(function (a, b) {
return a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0;
});
umarks = [[key, mark] for ([key, mark] in Iterator(urlMarks))];
umarks.sort(function (a, b) a[0].localeCompare(b[0]));
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)
{
var timeout = 100;
textBox.style.backgroundColor = tmpBg;
setTimeout(function () {
textBox.style.backgroundColor = oldBg;
setTimeout(function () {
textBox.style.backgroundColor = tmpBg;
setTimeout(function () {
textBox.style.backgroundColor = oldBg;
}, timeout);
}, timeout);
}, timeout);
var colors = [tmpBg, oldBg, tmpBg, oldBg];
(function() {
textBox.style.backgroundColor = colors.shift();
if(colors.length > 0)
setTimeout(arguments.callee, timeout)
})();
}
tmpfile.remove(false);