mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 09:48:00 +01:00
Allow io.source to register stylesheets
This commit is contained in:
@@ -737,6 +737,7 @@ lookup:
|
||||
// no need (actually forbidden) to add: js <<EOF ... EOF around those files
|
||||
source: function (filename, silent)
|
||||
{
|
||||
liberator.dump("filename: " + filename + "\n");
|
||||
try
|
||||
{
|
||||
var file = ioManager.getFile(filename);
|
||||
@@ -765,6 +766,11 @@ lookup:
|
||||
{
|
||||
liberator.eval(str);
|
||||
}
|
||||
else if (/\.css$/.test(filename))
|
||||
{
|
||||
liberator.storage.styles.unregisterSheet("file://" + file.path);
|
||||
liberator.storage.styles.registerSheet("file://" + file.path);
|
||||
}
|
||||
else
|
||||
{
|
||||
let heredoc = "";
|
||||
|
||||
@@ -1123,6 +1123,8 @@ const liberator = (function () //{{{
|
||||
loadModule("io", liberator.IO);
|
||||
loadModule("completion", liberator.Completion);
|
||||
|
||||
liberator.dump(liberator.io.source.toString() + "\n");
|
||||
|
||||
// This adds options/mappings/commands which are only valid in this particular extension
|
||||
if (liberator.config.init)
|
||||
liberator.config.init();
|
||||
|
||||
Reference in New Issue
Block a user