Skip to content

Commit d2e21ee

Browse files
authored
updates (#53)
* Updates * Update Test * Add Tests * Update README.md
1 parent 48cdc16 commit d2e21ee

File tree

3 files changed

+54
-11
lines changed

3 files changed

+54
-11
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[Django Files](https://github.com/django-files/django-files) to view recent uploads, shorten URLs,
1515
and upload any Image, Video or Audio files with right click.
1616

17-
> [!TIP]
17+
> [!IMPORTANT]
1818
> This Web Extension is designed to work with [Django Files](https://github.com/django-files/django-files).
1919
2020
## Table of Contents
@@ -31,28 +31,34 @@ and upload any Image, Video or Audio files with right click.
3131
* [Google Chrome Web Store](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
3232
* [Mozilla Firefox Add-ons](https://addons.mozilla.org/addon/django-files)
3333

34-
[![Chrome](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
35-
[![Firefox](https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png)](https://addons.mozilla.org/addon/django-files)
36-
[![Edge](https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
37-
[![Chromium](https://raw.githubusercontent.com/alrra/browser-logos/main/src/chromium/chromium_48x48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
38-
[![Brave](https://raw.githubusercontent.com/alrra/browser-logos/main/src/brave/brave_48x48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
39-
[![Vivaldi](https://raw.githubusercontent.com/alrra/browser-logos/main/src/vivaldi/vivaldi_48x48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
40-
[![Opera](https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
34+
[![Chrome](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/chrome_48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
35+
[![Firefox](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/firefox_48.png)](https://addons.mozilla.org/addon/django-files)
36+
[![Edge](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/edge_48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
37+
[![Chromium](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/chromium_48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
38+
[![Brave](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/brave_48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
39+
[![Opera](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/opera_48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
40+
[![Kiwi](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/kiwi_48.png)](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej)
4141

4242
All Chromium Based Browsers can install the extension from the
4343
[Chrome Web Store](https://chromewebstore.google.com/detail/django-files/abpbiefojfkekhkjnpakpekkpeibnjej).
4444

45+
Mobile browser support available for
46+
[Firefox](https://addons.mozilla.org/addon/link-extractor) and
47+
[Kiwi](https://chromewebstore.google.com/detail/link-extractor/ifefifghpkllfibejafbakmflidjcjfp).
48+
4549
## Features
4650

4751
* View Recent Uploads on Popup
4852
* Preview Popup Images on Hover.
4953
* Set Private, Password, and Expiration.
54+
* Customize Popup Icons, Width and Number of Files.
5055
* Right Click any Image, Video, or Audio to Upload.
56+
* Upload Directly to Albums with Context Menu.
5157
* Right Click any URL to Shorten.
52-
* Automatic Dark/Light Mode based on Browser Settings.
5358
* Automatically Auth with Django Files.
59+
* Automatic Dark/Light Mode based on Browser Settings.
5460

55-
> [!TIP]
61+
> [!TIP]
5662
> **Don't see your feature here?**
5763
> Request one on the [Feature Request Discussion](https://github.com/django-files/web-extension/discussions/categories/feature-requests).
5864
@@ -62,6 +68,8 @@ You can pin the Addon by clicking the `Puzzle Piece`, find the `Django Files ico
6268
**Firefox**, click the `Settings Wheel` and `Pin to Toolbar`.
6369
**Chrome**, click the `Pin` icon.
6470

71+
More Information on the Website: [https://django-files.github.io/extension/](https://django-files.github.io/extension/#configure)
72+
6573
## Setup
6674

6775
To automatically configure the web extension to work with your Django Files instance do the following:

src/html/options.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ <h1>Django Files Options</h1>
168168
</div>
169169
<div id="reloadMenu" class="ms-5 mb-2" style="display: none;">
170170
<div class="d-flex align-items-center">
171-
<button id="reloadAlbums" class="btn btn-sm btn-outline-info" type="button">
171+
<button id="reloadAlbums" class="btn btn-sm btn-outline-info" type="button"
172+
data-bs-toggle="tooltip" data-bs-title="Requires Django Files >= 0.15.0. Errors are only show in the console (Ctrl+Shift+I).">
172173
<i class="fa-solid fa-arrows-rotate"></i> Reload Albums
173174
</button>
174175
<span id="albumsUpdated" class="text-success" style="display: none;">

tests/test.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,23 @@ async function getPage(name, log, size) {
109109
await page.keyboard.press('Enter')
110110
// await page.locator('.show-hide').click()
111111
await screenshot('options')
112+
113+
await page.locator('#reloadAlbums').click()
114+
await page.waitForNetworkIdle()
115+
await screenshot('options')
116+
117+
await page
118+
.locator('.form-check:nth-of-type(3) input[name="radioBackground"]')
119+
.click()
120+
await page.waitForNetworkIdle()
121+
await screenshot('options')
122+
123+
await page
124+
.locator('.form-check:nth-of-type(1) input[name="radioBackground"]')
125+
.click()
126+
await page.waitForNetworkIdle()
127+
await screenshot('options')
128+
112129
await page.close()
113130

114131
// // DF -https://github.com/puppeteer/puppeteer/issues/2486
@@ -126,5 +143,22 @@ async function getPage(name, log, size) {
126143
await page.waitForNetworkIdle()
127144
await screenshot('popup')
128145

146+
await page.hover('tr')
147+
await page.locator('.ctx-button').click()
148+
await page.waitForNetworkIdle()
149+
await screenshot('popup')
150+
151+
await page.locator('[data-action="private"]').click()
152+
await page.hover('tr')
153+
await page.waitForNetworkIdle()
154+
await screenshot('popup')
155+
156+
await page.hover('tr')
157+
await page.locator('.ctx-button').click()
158+
await page.locator('[data-action="private"]').click()
159+
await page.hover('tr')
160+
await page.waitForNetworkIdle()
161+
await screenshot('popup')
162+
129163
await browser.close()
130164
})()

0 commit comments

Comments
 (0)