Skip to content

Commit

Permalink
Docs and test (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrusch committed Nov 19, 2023
1 parent e9dcdb2 commit ee73ea5
Show file tree
Hide file tree
Showing 23 changed files with 324 additions and 315 deletions.
32 changes: 16 additions & 16 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</a>
</p>

Chrome browser navigation is fixed and optimized for everyday use. Technical users, who want to inspect what is happening with indexedDB, service workers, Bluetooth devices etc., this menu adds shortcuts to those hard-to-find browser pages. This menu lists all Chrome URLs in a single, flat, customizable menu.
Chrome browser navigation is fixed and optimized for everyday use. For technical users, who want to inspect what is happening with indexedDB, service workers, Bluetooth devices etc., this menu adds shortcuts to those hard-to-find browser pages. This menu lists all Chrome URLs in a single, flat, customizable menu.

<p align="center">
<img width="650" class="feature" src='https://raw.githubusercontent.com/MobileFirstLLC/shortcuts-for-chrome/main/assets/screenshot.png' />
Expand Down Expand Up @@ -62,21 +62,21 @@ Chrome browser navigation is fixed and optimized for everyday use. Technical use
### Supported languages: **[Help translate&rarr;](https://poeditor.com/join/project?hash=c2ihN8duR2)**

```
┌──────────────────────────────────────────────────────────────────────────────────────────────
SUPPORTED LANGUAGES
├──────────────────┬──────────────────┬──────────────────┬──────────────────┬──────────────────┤
│ Amharic │ Arabic │ Bengali │ Bulgarian │ Catalan
│ Chinese │ Chinese (TW) │ Croatian │ Czech │ Danish
│ Dutch │ English │ English (US) │ Estonian │ Filipino
│ Finnish │ French │ German │ Greek │ Gujarati
│ Hebrew │ Hindi │ Hungarian │ Indonesian │ Italian
│ Japanese │ Kannada │ Korean │ Latvian │ Lithuanian
│ Malay │ Malayalam │ Marathi │ Norwegian │ Persian
│ Polish │ Portuguese │ Portuguese (BR) │ Romanian │ Russian
│ Serbian │ Slovak │ Slovenian │ Spanish │ Spanish (LA/C)
│ Swahili │ Swedish │ Tamil │ Telugu │ Thai
| Turkish │ Ukrainian │ Vietnamese
└──────────────────┴──────────────────┴──────────────────┴──────────────────┴──────────────────┘
┌────────────────────────────────────────────────────────────────┐
│ SUPPORTED LANGUAGES │
├────────────┬────────────┬────────────┬────────────────────────┤
│ Amharic │ Arabic │ Bengali │ Bulgarian │ Catalan │
│ Chinese │ Chinese │ Croatian │ Czech │ Danish │
│ Dutch │ English │ English │ Estonian │ Filipino │
│ Finnish │ French │ German │ Greek │ Gujarati │
│ Hebrew │ Hindi │ Hungarian │ Indonesian │ Italian │
│ Japanese │ Kannada │ Korean │ Latvian │ Lithuanian │
│ Malay │ Malayalam │ Marathi │ Norwegian │ Persian │
│ Polish │ Portuguese │ Portugues │ Romanian │ Russian │
│ Serbian │ Slovak │ Slovenian │ Spanish │ Spanish │
│ Swahili │ Swedish │ Tamil │ Telugu │ Thai │
| Turkish │ Ukrainian │ Vietnamese │
└────────────┴────────────┴────────────┴────────────────────────┘
```

<p align="center">
Expand Down
24 changes: 0 additions & 24 deletions docs/dev_guide.md

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions docs/changelog.md → docs/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
hide:
- navigation
- toc
---

Expand Down
File renamed without changes
25 changes: 25 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
hide:
- navigation
- toc
---

Shortcuts for Chrome is a customizable browser navigation menu, particularly for technical users.
It contains links to all Chrome browser's internal pages known as "Chrome URLs".
These links are normally hard to find, but the menu makes them easily accessible.
The menu also allows to pin and sort favorite URLs to fit individual preferences.

This website contains the source code documentation and how to [get started](start.md) working with this project.
You can also contribute to the [translations](translate.md).


[![install at chrome web store][badge]{id=install}][cws]

!["preview][preview]{id=preview}


[cws]: https://chrome.google.com/webstore/detail/jnmekaomnicdcpgdndekkmojfomifjal
[badge]: https://raw.githubusercontent.com/MobileFirstLLC/shortcuts-for-chrome/main/assets/badge.png
[preview]: https://raw.githubusercontent.com/MobileFirstLLC/shortcuts-for-chrome/main/assets/preview.gif
[user_shield]: https://img.shields.io/chrome-web-store/users/jnmekaomnicdcpgdndekkmojfomifjal?style=flat-square
[rate_shield]: https://img.shields.io/chrome-web-store/stars/jnmekaomnicdcpgdndekkmojfomifjal?style=flat-square
35 changes: 35 additions & 0 deletions docs/docs/privacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
hide:
- navigation
- toc
---

This is a privacy policy about a software applications developed by Mobile First LLC (the "developer").
This policy applies to Shortcuts for Chrome (the "app") and to people installing and using the application (the "user").

### User Accounts

Application does not require users to create login credentials.
Users are not required to provide any personal information.
When the app persists data, such as user preferences, that data is stored by Chrome browser either locally or in the browser's sync storage.
The developer does not have access and cannot recover any data about the user.
Once app is deleted, all application data is deleted.

### Use of Third Party Libraries

The app may use third party libraries for purposes of implementing specific features needed by the app to function as intended.
This privacy policy does not cover third party libraries.
Currently, third party libraries are only used during application development.
No third party code is included in the distributed version of the app.
The application does not contain any ads, tracking, or analytics packages.

### Acknowledgement

By using the app the user accepts this policy.

***

Last modified: November 19, 2023.

[Changelog](https://github.com/MobileFirstLLC/shortcuts-for-chrome/commits/main/docs/privacy.md)

91 changes: 91 additions & 0 deletions docs/docs/start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Building this application from source requires
[Node.js](https://nodejs.org/en/download/current) and
[git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

## Building from source

:octicons-git-branch-16: First clone project and install dependencies:

``` title="Setup" linenums="0"
git clone https://github.com/MobileFirstLLC/shortcuts-for-chrome.git
npm install
```

:octicons-tools-16: To build a locally debuggable version, run:

``` title="Build extension" linenums="0"
npm run build
```

:octicons-terminal-16: For a list of ather available developer commands, run:

``` title="Help" linenums="0"
npm run
```

This extension is build with [extension-cli](https://oss.mobilefirst.me/extension-cli/).
Refer to [user guide](https://oss.mobilefirst.me/extension-cli/) for further details of building the extension.


## Debugging

Howto debug a Chrome extension:

1. Go to `chrome://extensions`
2. Enable developer mode
3. Click `load unpacked`
4. Navigate to the extension source and choose `dist` directory

## Code organization

``` py title="Directories" linenums="0"
.
├─ .github/ # Repository configuration
│ ├─ workflows/ # automated workflows
│ └─ README.md # GitHub readme
├─ assets/ # extension images and features images
│ ├─ img/ # extension icons
│ └─ * # webstore assets
├─ docs/ # source code documentation (this website)
├─ i18n/ # generated translations (edit on POEditor)
├─ src/ # source code
│ ├─ background/ # background scripts
│ ├─ menu/ # links menu
│ ├─ popup/ # extension popup view
│ ├─ shared/ # shared classes and modules
│ └─ manifest.json # extension manifest
├─ test/ # unit tests
├─ LICENSE # Software license
├─ locales.js # utility file to format locales files
├─ package.json # configuration and dependencies
└─ translate.js # utility script for automatic translation
```

## System description

The extension has a popup window, which is visible to a user.
This is the primary way of interacting with the extension.
A service worker, that manages extension background services, runs in the background context.

When a user clicks extension icon or browser action, extension opens the extension popup window.
Clicking a menu link opens a new browser tab.
User can pin and unpin menu items, and sort pinned menu items using drag and drop.
This behavior is implemented by 3 components.

1. **`src/popup`** manages the extension popup window.
- It saves and restores user preferences
- It sets the visible content rendering inside the popup window
- Menu is currently the only possible view, so popup always renders the menu panel
<br/><br/>

2. **`src/menu`** panel shows list of links.
- User can pin/unpin links and drag and drop pinned links
- It programmatically launches links on click
- It initiates capturing recently used links
<br/><br/>

3. **`src/background`** has no visual interface, it runs in the background of the browser.
- It creates and manages extension context menu.

This application has no external runtime dependencies.

33 changes: 33 additions & 0 deletions docs/docs/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.md-content__inner {
padding-bottom: 2rem
}

.md-tabs li:nth-child(2) > a {
font-weight: 800; opacity: 1!important;}

.md-typeset code,
.highlighttable .linenos{
font-size: .95em;
}

#install {
width: 90%;
max-width: 300px;
margin: 2rem auto;
display: block;
}

#preview {
display: block;
margin: 3rem auto;
}

#langs{
line-height: 1.5rem;
font-size: 0.7rem;
}

.POButton{
margin-top:2rem;
margin-bottom: 2rem;
}
24 changes: 24 additions & 0 deletions docs/docs/translate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Shortcuts for Chrome is internationalized to support multiple languages.
The application menu is presented in the same language as the user's browser.
The initial translations were machine-generated translations and may not be great.
_You_ can improve the quality of the translations by reviewing and editing the translations.
No coding experience is necessary.

[Translate on POEditor ↗](https://poeditor.com/join/project?hash=c2ihN8duR2){ .md-button .md-button--primary .POButton }

### Supported Languages

<pre id="langs">
🇪🇹 Amharic 🇸🇦 Arabic 🇧🇩 Bengali 🇧🇬 Bulgarian 🇦🇩 Catalan
🇨🇳 Chinese 🇹🇼 Chinese 🇭🇷 Croatian 🇨🇿 Czech 🇩🇰 Danish
🇳🇱 Dutch 🇬🇧 English 🇺🇸 English 🇪🇪 Estonian 🇵🇭 Filipino
🇫🇮 Finnish 🇫🇷 French 🇩🇪 German 🇬🇷 Greek 🇮🇳 Gujarati
🇮🇱 Hebrew 🇮🇳 Hindi 🇭🇺 Hungarian 🇮🇩 Indonesian 🇮🇹 Italian
🇯🇵 Japanese 🇮🇳 Kannada 🇰🇷 Korean 🇱🇻 Latvian 🇱🇹 Lithuanian
🇮🇩 Malay 🇮🇳 Malayalam 🇮🇳 Marathi 🇳🇴 Norwegian 🇮🇷 Persian
🇵🇱 Polish 🇵🇹 Portuguese 🇧🇷 Portuguese 🇷🇴 Romanian 🇷🇺 Russian
🇷🇸 Serbian 🇸🇰 Slovak 🇸🇮 Slovenian 🇪🇸 Spanish 🇲🇽 Spanish
🇰🇪 Swahili 🇸🇪 Swedish 🇮🇳 Tamil 🇮🇳 Telugu 🇹🇭 Thai
🇹🇷 Turkish 🇺🇦 Ukrainian 🇻🇳 Vietnamese
</pre>

54 changes: 0 additions & 54 deletions docs/index.md

This file was deleted.

0 comments on commit ee73ea5

Please sign in to comment.