This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"test": "mocha __tests__/*.test.js" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
module.exports = { | |
add: (a,b) => a + b, | |
subtract: (a,b) => a - b | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
publish-docker-image: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use an official Node.js runtime as a parent image | |
FROM node:14 | |
# Set the working directory to /app | |
WORKDIR /app | |
# Copy package.json and package-lock.json to the container | |
COPY package*.json ./ | |
# Install dependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Author: Mitch Allen | |
* https://scriptable.com | |
* https://mitchallen.com | |
*/ | |
const express = require('express'); | |
const app = express(); | |
const port = 3000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="button.css"> | |
</head> | |
<body> | |
<button id="changeColor"></button> | |
<script src="popup.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Options Page</title> | |
</head> | |
<body> | |
<h1>Options Page</h1> | |
<form> | |
<label for="color-input">Page Background Color:</label> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Background script loaded!"); | |
chrome.browserAction.onClicked.addListener(function(tab) { | |
// Do something when the extension button is clicked | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log("Hello, world!"); | |
chrome.storage.sync.get("color", function(data) { | |
var color = data.color || "#ffffff"; | |
document.body.style.backgroundColor = color; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "My Extension", | |
"version": "1.0", | |
"manifest_version": 3, | |
"description": "Description of my extension", | |
"permissions": [ | |
"tabs", | |
"activeTab" | |
], | |
"content_scripts": [ |