Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome extension code cleanup #65

Merged
merged 10 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
/build/*
/src/images/icons/converted/*
/src/manifest.json
/src/manifest.bak.json

node_modules
package-lock.json

!.gitkeep

Thumbs.db
Desktop.ini
*.DS_Store
*.log
._*
tags
tags.*
.idea
/nbproject/private/
src/out.json
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

[![Test](https://github.com/HTTPArchive/wappalyzer/actions/workflows/test.yml/badge.svg)](https://github.com/HTTPArchive/wappalyzer/actions/workflows/test.yml)

[![Lint](https://github.com/HTTPArchive/wappalyzer/actions/workflows/lint.yml/badge.svg)](https://github.com/HTTPArchive/wappalyzer/actions/workflows/lint.yml)

[![Github Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&link=https://github.com/sponsors/AliasIO)](https://github.com/sponsors/AliasIO)

<a href="https://www.wappalyzer.com/?utm_source=readme&utm_medium=github&utm_campaign=wappalyzer"><img src="https://www.wappalyzer.com/images/logo/icon_192.png" height="72" alt="Wappalyzer" align="left" /></a>
Expand All @@ -13,7 +17,6 @@

- [Git](https://git-scm.com)
- [Node.js](https://nodejs.org) version 14 or higher
- [Yarn](https://yarnpkg.com)

## Quick start

Expand All @@ -32,12 +35,6 @@ yarn install
- Click 'Load unpacked'
- Select `src`

### Firefox extension

- Go to `about:debugging#/runtime/this-firefox`
- Click 'Load Temporary Add-on'
- Select `src/manifest.json`

## Specification

A long list of [regular expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) is used to identify technologies on web pages. Wappalyzer inspects HTML code, as well as JavaScript variables, response headers and more.
Expand Down
44 changes: 2 additions & 42 deletions bin/build.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,5 @@
const fs = require('fs')
const Zip = require('adm-zip')

const currentVersion = JSON.parse(
fs.readFileSync('./src/manifest-v3.json')
).version

const version = process.argv[2]

if (!version) {
// eslint-disable-next-line no-console
console.error(
`No version number specified. Current version is ${currentVersion}.`
)

process.exit(1)
}

;['./src/manifest-v2.json', './src/manifest-v3.json'].forEach((file) => {
const json = JSON.parse(fs.readFileSync(file))

json.version = version

fs.writeFileSync(file, JSON.stringify(json, null, 2))
})

fs.copyFileSync(`./src/manifest.json`, './src/manifest.bak.json')

fs.copyFileSync(`./src/manifest-v2.json`, './src/manifest.json')

let zip = new Zip()

zip.addLocalFolder('./src', '')

zip.writeZip('./build/webextension-v2.zip')

fs.copyFileSync(`./src/manifest-v3.json`, './src/manifest.json')

zip = new Zip()
const zip = new Zip()

zip.addLocalFolder('./src', '')

zip.writeZip('./build/webextension-v3.zip')

fs.copyFileSync(`./src/manifest.bak.json`, './src/manifest.json')
zip.writeZip('./build/webextension.zip')
12 changes: 0 additions & 12 deletions bin/manifest.js

This file was deleted.

Empty file removed build/.gitkeep
Empty file.
220 changes: 0 additions & 220 deletions src/_locales/ca/messages.json

This file was deleted.

Loading