Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Merge pull request #32 from NaturalSelectionLabs/develop
Browse files Browse the repository at this point in the history
release: re-id v0.1.0
  • Loading branch information
Candinya authored Jun 28, 2021
2 parents cafb59f + 6c6ce49 commit 3b1b453
Show file tree
Hide file tree
Showing 93 changed files with 6,226 additions and 924 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
50 changes: 50 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release build

on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Checkout tag
run: |
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
tag_name="${GITHUB_REF##*/}"
echo Tag $tag_name
git checkout $tag_name
echo "TAG_NAME=${tag_name}" >> $GITHUB_ENV
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Build
run: yarn build

- name: Package
run: |
cd ./dist/
zip -r ../re-id.zip ./
cd ../
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
name: ${{ env.TAG_NAME }}
tag_name: ${{ env.TAG_NAME }}
files: ./re-id.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build test

on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
3 changes: 2 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"tabWidth": 4,
"singleQuote": true,
"trailingComma": "all"
"trailingComma": "all",
"printWidth": 120
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ yarn
yarn dev
```

or
or

```bash
npm install
Expand All @@ -20,4 +20,4 @@ Open `Developer mode` in the top right corner

Click `Load unpacked` in the top left corner

Select `path/Re-ID/dist`
Select `path/Re-ID/dist`
128 changes: 69 additions & 59 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,71 @@
{
"name": "re-id",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack -w --mode development",
"build": "webpack --mode production",
"prepare": "husky install"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"repository": {
"type": "git",
"url": "git+https://github.com/NaturalSelectionLabs/Re-ID.git"
},
"keywords": [
"RSS3"
],
"author": "NaturalSelectionLabs",
"bugs": {
"url": "https://github.com/NaturalSelectionLabs/Re-ID/issues"
},
"homepage": "https://github.com/NaturalSelectionLabs/Re-ID#readme",
"dependencies": {
"assert": "2.0.0",
"axios": "0.21.1",
"buffer": "6.0.3",
"crypto-browserify": "3.12.0",
"eth-crypto": "1.9.0",
"process": "0.11.10",
"stream-browserify": "3.0.0",
"typescript": "4.2.4",
"vue": "3.0.11",
"vue-class-component": "8.0.0-rc.1"
},
"devDependencies": {
"@babel/core": "7.14.3",
"@babel/preset-env": "7.14.2",
"@vue/compiler-sfc": "3.0.11",
"autoprefixer": "10.2.5",
"babel-loader": "8.2.2",
"copy-webpack-plugin": "9.0.0",
"css-loader": "5.2.6",
"cssnano": "5.0.4",
"html-webpack-plugin": "5.3.1",
"husky": "6.0.0",
"less-loader": "9.0.0",
"lint-staged": "11.0.0",
"postcss": "8.3.0",
"postcss-loader": "5.3.0",
"prettier": "2.3.0",
"ts-loader": "9.2.2",
"url-loader": "4.1.1",
"vue-loader": "16.2.0",
"vue-style-loader": "4.1.3",
"webpack": "5.37.1",
"webpack-cli": "4.7.0"
}
"name": "re-id",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {
"dev": "webpack -w --mode development",
"build": "NODE_ENV=production webpack --mode production",
"prepare": "husky install"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"repository": {
"type": "git",
"url": "git+https://github.com/NaturalSelectionLabs/Re-ID.git"
},
"keywords": [
"RSS3"
],
"author": "NaturalSelectionLabs",
"bugs": {
"url": "https://github.com/NaturalSelectionLabs/Re-ID/issues"
},
"homepage": "https://github.com/NaturalSelectionLabs/Re-ID#readme",
"dependencies": {
"assert": "2.0.0",
"axios": "0.21.1",
"buffer": "6.0.3",
"crypto-browserify": "3.12.0",
"eth-crypto": "1.9.0",
"lodash": "4.17.21",
"moment": "2.29.1",
"postcss-nested": "5.0.5",
"process": "0.11.10",
"rss3": "0.3.9",
"stream-browserify": "3.0.0",
"typescript": "4.3.4",
"vue": "3.1.2",
"vue-class-component": "8.0.0-rc.1",
"vue-moment": "4.1.0"
},
"devDependencies": {
"@babel/core": "7.14.6",
"@babel/preset-env": "7.14.7",
"@types/chrome": "0.0.145",
"@types/lodash": "4.14.170",
"@vue/compiler-sfc": "3.1.2",
"autoprefixer": "10.2.6",
"babel-loader": "8.2.2",
"copy-webpack-plugin": "9.0.1",
"css-loader": "5.2.6",
"cssnano": "5.0.6",
"html-webpack-plugin": "5.3.2",
"husky": "6.0.0",
"less-loader": "10.0.0",
"lint-staged": "11.0.0",
"postcss": "8.3.5",
"postcss-loader": "6.1.0",
"prettier": "2.3.2",
"tailwindcss": "2.2.4",
"terser-webpack-plugin": "5.1.4",
"ts-loader": "9.2.3",
"url-loader": "4.1.1",
"vue-loader": "16.2.0",
"vue-router": "4.0.10",
"vue-style-loader": "4.1.3",
"webpack": "5.40.0",
"webpack-cli": "4.7.2"
}
}
Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/images/icon16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon16a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon24a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/icon32a.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 16 additions & 15 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"manifest_version": 3,
"name": "Re: ID",
"version": "0.0.1",
"version": "0.1.0",

"action": {
"default_popup": "popup.html",
"default_icon": {
"16": "images/icon16.png",
"24": "images/icon24.png",
"32": "images/icon32.png"
"16": "images/icon16.png",
"24": "images/icon24.png",
"32": "images/icon32.png"
}
},
"description": "This is Re: ID",
Expand All @@ -20,15 +20,16 @@

"author": "NaturalSelectionLabs",
"background": {
"service_worker": "background.js"
"service_worker": "background.js"
},
"content_scripts": [{
"matches": ["https://twitter.com/home"],
"js": ["content-script.js"]
}],
"homepage_url": "https://rss3.io/",
"permissions": ["tabs"],
"host_permissions": [
"https://twitter.com/home"
]
}
"content_scripts": [
{
"matches": ["https://twitter.com/*"],
"js": ["content-script.js"]
}
],
"options_page": "options.html",
"homepage_url": "https://reid.town/",
"permissions": ["tabs", "storage"],
"host_permissions": ["https://twitter.com/*"]
}
Binary file modified src/assets/favicon.ico
Binary file not shown.
2 changes: 2 additions & 0 deletions src/assets/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap" rel="stylesheet">
</head>
<body>
<div id="app"></div>
Expand Down
21 changes: 21 additions & 0 deletions src/assets/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
body {
@apply font-montserrat;
}

::-webkit-scrollbar {
width: 3px;
height: 3px;
}
::-webkit-scrollbar-thumb {
background: #c5c5c7;
border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
background: #3c3c43;
}
}
21 changes: 0 additions & 21 deletions src/assets/manifest.json

This file was deleted.

41 changes: 40 additions & 1 deletion src/background/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,40 @@
console.log('background');
const supportedHost = ['twitter.com'];

function setIcon(url: string) {
const host = new URL(url).host;
if (supportedHost.indexOf(host) !== -1) {
chrome.action.setIcon({
path: {
'16': 'images/icon16a.png',
'24': 'images/icon24a.png',
'32': 'images/icon32a.png',
},
});
} else {
chrome.action.setIcon({
path: {
'16': 'images/icon16.png',
'24': 'images/icon24.png',
'32': 'images/icon32.png',
},
});
}
}
chrome.tabs.onActivated.addListener((tab) => {
chrome.tabs.query(
{
active: true,
},
(tab) => {
if (tab?.[0]?.url) {
setIcon(tab[0].url);
}
},
);
});

chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
if (changeInfo.url && tab.active) {
setIcon(changeInfo.url);
}
});
Loading

0 comments on commit 3b1b453

Please sign in to comment.