mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 20:32:25 +01:00
do not load .swp or other files in macro directory
This commit is contained in:
@@ -444,7 +444,8 @@ vimperator.Events = function () //{{{
|
|||||||
for (var i = 0; i < files.length; i++)
|
for (var i = 0; i < files.length; i++)
|
||||||
{
|
{
|
||||||
var file = files[i];
|
var file = files[i];
|
||||||
if (!file.exists() || file.isDirectory() || !file.isReadable())
|
if (!file.exists() || file.isDirectory() ||
|
||||||
|
!file.isReadable() || !/^[\w_-]+(\.vimp)?$/i.test(file.leafName))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
var name = file.leafName.replace(/\.vimp$/i, "");
|
var name = file.leafName.replace(/\.vimp$/i, "");
|
||||||
@@ -1163,7 +1164,6 @@ vimperator.Events = function () //{{{
|
|||||||
// only thrown for the current tab, not when another tab changes
|
// only thrown for the current tab, not when another tab changes
|
||||||
if (flags & Components.interfaces.nsIWebProgressListener.STATE_START)
|
if (flags & Components.interfaces.nsIWebProgressListener.STATE_START)
|
||||||
{
|
{
|
||||||
dump("start\n");
|
|
||||||
vimperator.buffer.loaded = 0;
|
vimperator.buffer.loaded = 0;
|
||||||
vimperator.statusline.updateProgress(0);
|
vimperator.statusline.updateProgress(0);
|
||||||
setTimeout (function () { vimperator.modes.reset(false); },
|
setTimeout (function () { vimperator.modes.reset(false); },
|
||||||
@@ -1171,7 +1171,6 @@ vimperator.Events = function () //{{{
|
|||||||
}
|
}
|
||||||
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
else if (flags & Components.interfaces.nsIWebProgressListener.STATE_STOP)
|
||||||
{
|
{
|
||||||
dump("stop\n");
|
|
||||||
vimperator.buffer.loaded = (status == 0 ? 1 : 2);
|
vimperator.buffer.loaded = (status == 0 ? 1 : 2);
|
||||||
vimperator.statusline.updateUrl();
|
vimperator.statusline.updateUrl();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user