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

Make :pageinfo extensible

This commit is contained in:
Kris Maglione
2008-10-02 19:22:02 +00:00
parent 9dd5f1612b
commit 8100d941f8
7 changed files with 240 additions and 226 deletions

View File

@@ -37,9 +37,16 @@ const liberator = (function () //{{{
function loadModule(name, func)
{
var message = "Loading module " + name + "...";
liberator.log(message, 0);
liberator.dump(message + "\n");
liberator[name] = func();
try
{
liberator.log(message, 0);
liberator.dump(message + "\n");
liberator[name] = func();
}
catch(e)
{
liberator.dump(e + "\n");
}
}
// Only general options are added here, which are valid for all vimperator like extensions
@@ -1111,9 +1118,9 @@ const liberator = (function () //{{{
liberator.log("Sourcing plugin directory: " + dir.path + "...", 3);
let files = liberator.io.readDirectory(dir.path);
let files = liberator.io.readDirectory(dir.path, true);
files.sort(function (a, b) String.localeCompare(a.path, b.path)).forEach(function (file) {
files.forEach(function (file) {
if (!file.isDirectory() && /\.(js|vimp)$/i.test(file.path))
liberator.io.source(file.path, false);
});