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:
@@ -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"];
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user