mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 23:07:59 +01:00
make each row of the buffer list clickable and jump to the selected buffer
This commit is contained in:
@@ -319,7 +319,7 @@ function Bookmarks() //{{{
|
||||
}
|
||||
|
||||
|
||||
list += "<tr><td>" + title + "</td><td style=\"color: green; width: 100%\"><a href=\"#\">" + url + "</a>" + extra + "</td></tr>";
|
||||
list += "<tr><td>" + title + "</td><td style=\"width: 100%\"><a href=\"#\" class=\"hl-URL\">" + url + "</a>" + extra + "</td></tr>";
|
||||
}
|
||||
list += "</table>";
|
||||
|
||||
@@ -473,7 +473,7 @@ function History() //{{{
|
||||
if (title.length > 50)
|
||||
title = title.substr(0, 47) + "...";
|
||||
var url = vimperator.util.escapeHTML(items[i][0]);
|
||||
list += "<tr><td>" + title + "</td><td style=\"color: green;\"><a href=\"#\">" + url + "</a></td></tr>";
|
||||
list += "<tr><td>" + title + "</td><td><a href=\"#\" class=\"hl-URL\">" + url + "</a></td></tr>";
|
||||
}
|
||||
list += "</table>";
|
||||
|
||||
|
||||
@@ -247,9 +247,9 @@ function Buffer() //{{{
|
||||
url = vimperator.util.escapeHTML(url);
|
||||
title = vimperator.util.escapeHTML(title);
|
||||
|
||||
list += "<tr><td align=\"right\"> " + number + "</td><td>" + indicator +
|
||||
list += "<tr class=\"buffer-list\"><td align=\"right\"> " + number + "</td><td>" + indicator +
|
||||
"</td><td style=\"width: 250px; max-width: 500px; overflow: hidden;\">" + title +
|
||||
"</td><td><span style=\"color: green\">" + url + "</span></td></tr>";
|
||||
"</td><td class=\"hl-URL\">" + url + "</td></tr>";
|
||||
}
|
||||
list += "</table>";
|
||||
|
||||
|
||||
@@ -694,7 +694,13 @@ function CommandLine() //{{{
|
||||
break;
|
||||
|
||||
case "<LeftMouse>":
|
||||
if (event.originalTarget.localName.toLowerCase() == "a")
|
||||
if (event.originalTarget.parentNode.className == "buffer-list")
|
||||
{
|
||||
vimperator.tabs.select(parseInt(event.originalTarget.parentNode.firstChild.textContent) - 1);
|
||||
close_window = true;
|
||||
break;
|
||||
}
|
||||
else if (event.originalTarget.localName.toLowerCase() == "a")
|
||||
{
|
||||
vimperator.open(event.originalTarget.textContent);
|
||||
break;
|
||||
|
||||
@@ -145,11 +145,18 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
background-color: #FF6060 !important; /* light red */
|
||||
color: black !important;
|
||||
}
|
||||
.hl-URL {
|
||||
background-color: white;
|
||||
color: green;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* MOW */
|
||||
|
||||
#vimperator-multiline-output {
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
color: black;
|
||||
}
|
||||
|
||||
#vimperator-multiline-output-content {
|
||||
@@ -172,8 +179,8 @@ the terms of any one of the MPL, the GPL or the LGPL.
|
||||
padding: 0px 2px;
|
||||
}
|
||||
|
||||
#vimperator-multiline-output-content a {
|
||||
text-decoration: none;
|
||||
#vimperator-multiline-output-content a,
|
||||
#vimperator-multiline-output-content .buffer-list {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user