Compare commits

..

No commits in common. "7f07d30f56afecf49075dd252ceec43afcf51eb7" and "d4ad23b893c05b4d1c98ec251f6c34f7f42cb812" have entirely different histories.

19 changed files with 23 additions and 37 deletions

View File

@ -3,17 +3,8 @@ let port = undefined;
// Run the shellfox helper program. // Run the shellfox helper program.
function initShellfoxProgram() { function initShellfoxProgram() {
port = browser.runtime.connectNative("shellfox"); port = browser.runtime.connectNative("shellfox");
if (!port) port.onDisconnect.addListener((port) => {
shellfoxFailed(); console.log(port.error);
else
port.onDisconnect.addListener(shellfoxFailed);
}
// Display an error when we fail to launch Shellfoxes script.
function shellfoxFailed() {
let error = port.error;
console.log(error);
port = undefined; port = undefined;
// Tell the user about the error… // Tell the user about the error…
@ -24,10 +15,11 @@ function shellfoxFailed() {
browser.tabs.create({ browser.tabs.create({
"active": true, "active": true,
"url": "/html/error.html?error=" + escape(error), "url": "/error.html",
"openerTabId": openerTab "openerTabId": openerTab
}) })
}); });
});
} }

View File

@ -7,9 +7,9 @@
<body> <body>
<h1 id="errorTitle">Shellfox failed to run command</h1> <h1 id="errorTitle">Shellfox failed to run command</h1>
<h2 id="error"></h2> <h2><span class="command"></span></h2>
<h2 id="notInstalled">It seems that Shellfox is not fully installed!</h2> <h3 id="notInstalled">It seems that Shellfox is not fully installed!</h3>
<p id="notInstalledDesc">Shellfox, unlike most extensions, requires a script to be installed on your computer. This script, <code>shellfox.sh</code>, is what allows us to execute shell commands.</p> <p id="notInstalledDesc">Shellfox, unlike most extensions, requires a script to be installed on your computer. This script, <code>shellfox.sh</code>, is what allows us to execute shell commands.</p>
<h3 id="installTitle">Completing installation</h3> <h3 id="installTitle">Completing installation</h3>

View File

@ -1,9 +1,3 @@
let urlParams = location.toString().split("?error=");
if (urlParams && urlParams.length > 0) {
let errorText = unescape(urlParams[urlParams.length - 1]);
document.getElementById("error").innerText = "«" + errorText + "»";
}
document.getElementsByTagName("html")[0].setAttribute("lang", browser.i18n.getMessage("@@ui_locale")); document.getElementsByTagName("html")[0].setAttribute("lang", browser.i18n.getMessage("@@ui_locale"));
document.getElementById("errorPageTitle").innerText = browser.i18n.getMessage("errorPageTitle"); document.getElementById("errorPageTitle").innerText = browser.i18n.getMessage("errorPageTitle");

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

View File

@ -9,16 +9,16 @@
"default_locale": "en", "default_locale": "en",
"icons": { "icons": {
"250": "img/shellfox.png", "250": "res/shellfox.png",
"38": "img/shellfox-38.png", "38": "res/shellfox-38.png",
"19": "img/shellfox-19.png" "19": "res/shellfox-19.png"
}, },
"page_action": { "page_action": {
"default_icon": { "default_icon": {
"150": "img/shellfox-action.png", "250": "res/shellfox-action.png",
"38": "img/shellfox-action-38.png", "38": "res/shellfox-action-38.png",
"19": "img/shellfox-action-19.png" "19": "res/shellfox-action-19.png"
}, },
"default_title": "__MSG_pageActionName__" "default_title": "__MSG_pageActionName__"
}, },
@ -45,6 +45,6 @@
}, },
"options_ui": { "options_ui": {
"page": "html/options.html" "page": "options.html"
} }
} }

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
res/shellfox-action-19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

BIN
res/shellfox-action-38.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

BIN
res/shellfox-action.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB