aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background_page.html9
-rw-r--r--helpDialog.html6
-rw-r--r--vimiumFrontend.js6
3 files changed, 19 insertions, 2 deletions
diff --git a/background_page.html b/background_page.html
index e2252b4d..e85dd7d6 100644
--- a/background_page.html
+++ b/background_page.html
@@ -2,7 +2,7 @@
<head>
<script type="text/javascript" src="commands.js"/>
<script type="text/javascript" charset="utf-8">
- // Chromium #15242 will make this XHR request unnecessary.
+ // Chromium #15242 will make this XHR request to access the manifest unnecessary.
var manifestRequest = new XMLHttpRequest();
manifestRequest.open("GET", chrome.extension.getURL("manifest.json"), false);
manifestRequest.send(null);
@@ -64,6 +64,7 @@
var sendRequestHandlers = {
getCompletionKeys: getCompletionKeys,
getLinkHintCss: getLinkHintCss,
+ openOptionsPageInNewTab: openOptionsPageInNewTab,
upgradeNotificationClosed: upgradeNotificationClosed,
updateScrollPosition: handleUpdateScrollPosition
};
@@ -573,6 +574,12 @@
return compareVersions(currentVersion, localStorage.previousVersion) == 1;
}
+ function openOptionsPageInNewTab() {
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.tabs.create({ url: chrome.extension.getURL("options.html"), index: tab.index + 1 });
+ });
+ }
+
function init() {
clearKeyMappingsAndSetDefaults();
diff --git a/helpDialog.html b/helpDialog.html
index a9af647a..65fe6a41 100644
--- a/helpDialog.html
+++ b/helpDialog.html
@@ -64,6 +64,11 @@
padding-left:10px;
font-size:16px;
}
+ #vimiumHelpDialog a.optionsPage {
+ position: absolute;
+ right: 60px;
+ top: 8px;
+ }
#vimiumHelpDialog .closeButton:hover {
color:black;
cursor:default;
@@ -74,6 +79,7 @@
<!-- Note that the template placeholders (e.g. "pageNavigation") will be filled in by the background
page with the up-to-date key bindings when the dialog is shown. -->
+ <a class="optionsPage" href="#">Options</a>
<a class="closeButton" href="#">x</a>
<div id="vimiumTitle"><span style="color:#2f508e">Vim</span>ium {{title}}</div>
<div class="vimiumColumn">
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index a9c8024c..2d30c2cf 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -462,6 +462,9 @@ function showHelpDialog(html) {
container.id = "vimiumHelpDialogContainer";
container.innerHTML = html;
container.getElementsByClassName("closeButton")[0].addEventListener("click", hideHelpDialog, false);
+ container.getElementsByClassName("optionsPage")[0].addEventListener("click",
+ function() { chrome.extension.sendRequest({ handler: "openOptionsPageInNewTab" }); }, false);
+
document.body.appendChild(container);
var dialog = document.getElementById("vimiumHelpDialog");
dialog.style.zIndex = "99999998";
@@ -682,5 +685,6 @@ if (!isIframe) {
}
window.onbeforeunload = function() {
- chrome.extension.sendRequest({ handler: 'updateScrollPosition', scrollX: window.scrollX, scrollY: window.scrollY });
+ chrome.extension.sendRequest({ handler: "updateScrollPosition",
+ scrollX: window.scrollX, scrollY: window.scrollY });
}