mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-22 19:25:46 +01:00
Makefile changes for missing chrome/ dir
This commit is contained in:
4
Makefile
4
Makefile
@@ -15,7 +15,7 @@ ZIP = zip
|
||||
# find the vimperator chrome dir
|
||||
|
||||
FIREFOX_DEFAULT = $(wildcard ${HOME}/.mozilla/firefox/*.default)
|
||||
VIMPERATOR_CHROME = $(wildcard ${FIREFOX_DEFAULT}/extensions/vimperator@mozdev.org/chrome/)
|
||||
VIMPERATOR_CHROME = ${FIREFOX_DEFAULT}/extensions/vimperator@mozdev.org/chrome/
|
||||
|
||||
# specify V=1 on make line to see more verbose output
|
||||
Q=$(if ${V},,@)
|
||||
@@ -48,6 +48,8 @@ info:
|
||||
@echo "vimperator chrome ${VIMPERATOR_CHROME}"
|
||||
|
||||
needs_chrome_dir:
|
||||
@echo "Checking chrome dir..."
|
||||
-${Q}mkdir -p "${VIMPERATOR_CHROME}"
|
||||
${Q}test -d "${VIMPERATOR_CHROME}"
|
||||
|
||||
xpi: ${RELEASE}
|
||||
|
||||
1
TODO
1
TODO
@@ -31,6 +31,7 @@ FEATURES:
|
||||
6 autocommands (BrowserStart, BrowserQuit, TabClose, TabOpen, TabChanged, PageLoaded, any more?)
|
||||
6 vim like mappings for caret mode and textboxes (i to start caret mode?)
|
||||
6 pipe selected text/link/website to an external command
|
||||
6 it would be nice to have :undo <url> w/ tab completion support
|
||||
6 macros (qq)
|
||||
6 support firefox search engines, or at least make our search enginges user configurable
|
||||
6 gf = view source?
|
||||
|
||||
@@ -9,4 +9,68 @@ hello = function(name)
|
||||
{
|
||||
alert("Hello world: " + name);
|
||||
}
|
||||
|
||||
//Checks if a mapping is already defined and returnes the index in g_mappings,
|
||||
//where it is defined, or -1
|
||||
find_map = function(tofind)
|
||||
{
|
||||
for (var i in g_mappings)
|
||||
{
|
||||
// each internal mapping can have multiple keys
|
||||
for (var j in g_mappings[i][0])
|
||||
{
|
||||
var mapping = g_mappings[i][0][j];
|
||||
if(mapping == tofind) {
|
||||
//alert("Mapping '"+tofind+"' found");
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
// alert("Mapping '"+tofind+"' not found");
|
||||
return -1;
|
||||
}
|
||||
|
||||
//(re)define a mapping map, with usage, helptext by function func
|
||||
//see examples below
|
||||
//Current problem: Doesn't remove helptext, when a mapping is unassigned
|
||||
define_map = function(map, usage, helptext, func) {
|
||||
//check if mapping exists:
|
||||
var i=find_map(map);
|
||||
var newmap = [[map],[usage],helptext,func];
|
||||
if(i>=0)
|
||||
{
|
||||
//unassign map
|
||||
var changed_maps=new Array();
|
||||
for(j in g_mappings[i][0]) {
|
||||
if(g_mappings[i][0][j]!=map)
|
||||
changed_maps.push(g_mappings[i][0][j]);
|
||||
}
|
||||
g_mappings[i][0]=changed_maps;
|
||||
}
|
||||
//add new map
|
||||
g_mappings.push(newmap);
|
||||
alert("Mapping '"+map+"' added.");
|
||||
}
|
||||
print_maps = function (toPrint) {
|
||||
var doc = gBrowser.contentDocument;
|
||||
doc.open();
|
||||
var text="";
|
||||
for( i in g_mappings) {
|
||||
var curmaps = "";
|
||||
for (j in g_mappings[i][0])
|
||||
curmaps += g_mappings[i][0][j].replace("<","≤").replace(">","&ge")+", ";
|
||||
text +="<br><br>["+curmaps+"]";
|
||||
}
|
||||
doc.write(text);
|
||||
|
||||
doc.close();
|
||||
}
|
||||
|
||||
EOF
|
||||
|
||||
|
||||
" use functions to define maps for h and l
|
||||
javascript define_map("h","h","previous tab",function(){tab_go(-1);});
|
||||
javascript define_map("l","l","next tab",function(){tab_go(0);});
|
||||
|
||||
" vim: set syntax=javascript :
|
||||
|
||||
Reference in New Issue
Block a user