1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 08:28:01 +01:00

add alternateStyleSheets property to liberator.buffer rather than generating

this list in the completion function
This commit is contained in:
Doug Kearns
2008-08-12 11:19:13 +00:00
parent 77f3bef692
commit 66c46a8b53
2 changed files with 179 additions and 171 deletions

View File

@@ -289,10 +289,7 @@ liberator.Completion = function () //{{{
{
var stylesheets = getAllStyleSheets(window.content);
// TODO: how should we handle duplicate titles?
stylesheets = stylesheets.filter(function (stylesheet) {
return !(!/^(screen|all|)$/i.test(stylesheet.media.mediaText) || /^\s*$/.test(stylesheet.title))
}).map(function (stylesheet) {
stylesheets = liberator.buffer.alternateStyleSheets.map(function (stylesheet) {
return [stylesheet.title, stylesheet.href || "inline"];
});