Skip to content

Commit

Permalink
Added new tab button, bumped firefox specific manifest things
Browse files Browse the repository at this point in the history
  • Loading branch information
BatteredBunny committed Aug 16, 2023
1 parent 9f46e35 commit bc6edc1
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}: let
buildExtension = pkgs.mkYarnPackage rec {
name = "browser_terminal";
version = "1.4.2";
version = "1.4.3";

src = ./.;

Expand Down
2 changes: 1 addition & 1 deletion native/manifest/manifest_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const genericManifest = `{

const chromiumID = "chrome-extension://nbnfihffeffdhcbblmekelobgmdccfnl/"
const edgeID = "chrome-extension://dboagbeogaikhnjldgdighffjfejpeoj/"
const firefoxID = "browser_terminal@sly.ee"
const firefoxID = "browser_terminal@catnip.ee"

func buildManifestFirefox(path string) []byte {
return []byte(fmt.Sprintf(genericManifest, path, "allowed_extensions", firefoxID))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "browser_terminal",
"version": "1.4.2",
"version": "1.4.3",
"description": "Extension that allows you to open a native shell in the browser",
"scripts": {
"start": "npm run start:firefox",
Expand Down
6 changes: 5 additions & 1 deletion src/html/terminal.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
<div class="terminal-wrapper">
<div class="window-header">
<div class="header-title">Browser terminal</div>
<button id="kill_button">X</button>

<div>
<button id="new_tab_button">+</button>
<button id="kill_button">x</button>
</div>
</div>
<div id="terminal"></div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions src/js/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import browser from "webextension-polyfill";
const TERMINAL = document.getElementById("terminal");
const BANNER = document.getElementById("banner");
const KILL_BUTTON = document.getElementById("kill_button");
const NEW_TAB_BUTTON = document.getElementById("new_tab_button");

const EXTENSION_NAME = "browser_terminal";
let port = browser.runtime.connectNative(EXTENSION_NAME);
Expand Down Expand Up @@ -60,4 +61,9 @@ port.onMessage.addListener((response) => {

KILL_BUTTON.addEventListener("click", () => {
send_signal(10)
window.close()
})

NEW_TAB_BUTTON.addEventListener("click", () => {
window.open("/html/terminal.html")
})
6 changes: 3 additions & 3 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"manifest_version": 3,
"name": "Browser terminal",
"version": "1.4.2",
"version": "1.4.3",
"description": "Extension that allows you to open a native shell in the browser",
"icons": {
"512": "icons/icon.png"
},
"browser_specific_settings": {
"gecko": {
"id": "browser_terminal@sly.ee",
"strict_min_version": "101.0"
"id": "browser_terminal@catnip.ee",
"strict_min_version": "109.0"
}
},
"permissions": [
Expand Down

0 comments on commit bc6edc1

Please sign in to comment.