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

Allow io.source to register stylesheets

This commit is contained in:
Kris Maglione
2008-10-07 07:39:09 +00:00
parent abd879a3e5
commit 19b942aebc
2 changed files with 8 additions and 0 deletions

View File

@@ -737,6 +737,7 @@ lookup:
// no need (actually forbidden) to add: js <<EOF ... EOF around those files // no need (actually forbidden) to add: js <<EOF ... EOF around those files
source: function (filename, silent) source: function (filename, silent)
{ {
liberator.dump("filename: " + filename + "\n");
try try
{ {
var file = ioManager.getFile(filename); var file = ioManager.getFile(filename);
@@ -765,6 +766,11 @@ lookup:
{ {
liberator.eval(str); liberator.eval(str);
} }
else if (/\.css$/.test(filename))
{
liberator.storage.styles.unregisterSheet("file://" + file.path);
liberator.storage.styles.registerSheet("file://" + file.path);
}
else else
{ {
let heredoc = ""; let heredoc = "";

View File

@@ -1123,6 +1123,8 @@ const liberator = (function () //{{{
loadModule("io", liberator.IO); loadModule("io", liberator.IO);
loadModule("completion", liberator.Completion); loadModule("completion", liberator.Completion);
liberator.dump(liberator.io.source.toString() + "\n");
// This adds options/mappings/commands which are only valid in this particular extension // This adds options/mappings/commands which are only valid in this particular extension
if (liberator.config.init) if (liberator.config.init)
liberator.config.init(); liberator.config.init();