21 Commits

Author SHA1 Message Date
2ccc12de90 Version 4.0.6 2019-09-02 11:53:03 +02:00
28e6866db8 Use currentWindow instead of WINDOW_ID_CURRENT 2019-09-02 04:06:28 +02:00
7185964649 emulate must use correct window
Closes #41
2019-09-02 04:02:50 +02:00
cd1005823d Typo fixes 2019-09-02 03:57:21 +02:00
0afceb9850 Dutch translation
Closes #39
2019-09-02 00:30:45 +02:00
e6dc205b9d Small de improvement 2019-09-02 00:26:35 +02:00
8e473c778b Rename to zh-CN
Related to #38
2019-09-02 00:26:15 +02:00
7a71ae5f37 Also split ui locales by _ 2019-09-02 00:24:11 +02:00
d04f3db22f Add Simplified Chinese translation
Created this translation by using the online translation tool from https://downthemall.github.io/translate/ .
2019-09-02 00:23:51 +02:00
adc6b9dbb2 Add et locale 2019-09-02 00:03:29 +02:00
e8f09c80f3 Do not add empty separator in URLMenuFilter 2019-09-01 15:24:14 +02:00
46c4e66558 webpack config updates 2019-09-01 06:17:05 +02:00
a8ea416a67 Remove smartphone section from issue template 2019-09-01 05:06:30 +02:00
320c1ddafa Add a little margin to allow focus outlines 2019-09-01 05:01:49 +02:00
4c576ba720 Add content_security_policy 2019-09-01 04:52:57 +02:00
7b58779f9e Remove outdated todos 2019-09-01 00:37:10 +02:00
45d835fe19 use correct autoHide HTML spelling 2019-09-01 00:03:53 +02:00
2d2826d192 Correctly toggle URLMenuFilter 2019-09-01 00:03:34 +02:00
4c77ad0f1f Fix popup height flash bug 2019-08-31 23:16:46 +02:00
4d72ac4534 Notifications galore 2019-08-31 23:08:12 +02:00
cdda0835d8 Wrong translation 2019-08-31 18:12:37 +02:00
16 changed files with 3577 additions and 39 deletions

View File

@ -7,6 +7,11 @@ assignees: ''
---
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Describe the bug**
A clear and concise description of what the bug is.
@ -23,16 +28,6 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -15,10 +15,6 @@ Planned for later.
* Add downloads
* Chrome support
* vtable perf: cache column widths
* Localizations
* Settle on system
* Do the de-locale
* Enagage translators
* Download options
* This is a bit more limited, as we cannot modify options of downloads that have been started (and paused) or that are done.

View File

@ -252,7 +252,7 @@
"description": "Menu text"
},
"dta.turbo.link": {
"message": "Bild mit OneClick! speichern",
"message": "Link mit OneClick! speichern",
"description": "Menu text"
},
"dta.turbo.media": {
@ -1164,7 +1164,7 @@
"description": "Option text; Prefs/Network"
},
"useonlyonce": {
"message": "Nur einmal",
"message": "Einmalig",
"description": "Label for Use-Once checkboxes"
}
}

1170
_locales/et/messages.json Normal file

File diff suppressed because it is too large Load Diff

1170
_locales/nl/messages.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@
"description": "Error message"
},
"SERVER_FORBIDDEN": {
"message": "Probido",
"message": "Proibido",
"description": "Error message"
},
"SERVER_UNAUTHORIZED": {
@ -462,7 +462,7 @@
"description": "Action for moving a download up"
},
"nagging-message": {
"message": "Você ja adicionou $DOWNLOADS$ downloads com DownThemAll! Como usuário regular, você pode considerar uma doação para apoiar desenvolvimento adicional. Obrigado!",
"message": "Você já adicionou $DOWNLOADS$ downloads com DownThemAll! Como usuário regular, você pode considerar uma doação para apoiar desenvolvimento adicional. Obrigado!",
"description": "Donation nagging message; displayed as a notification bar in manager",
"placeholders": {
"downloads": {
@ -498,7 +498,7 @@
"description": "Button text; Used in message boxes"
},
"open-directory": {
"message": "Abrir diretório",
"message": "Abrir pasta",
"description": "Menu text; manager context"
},
"open-file": {
@ -554,11 +554,11 @@
"description": "Preferences/General"
},
"pref-open-manager-on-queue": {
"message": "Abrir a aba 'Gerenciador' após adicionar donwloads à fila",
"message": "Abrir a aba 'Gerenciador' após adicionar downloads à fila",
"description": "Preferences/General"
},
"pref-queue-notification": {
"message": "Exibir notificação ao adicionar donwloads à fila",
"message": "Exibir notificação ao adicionar downloads à fila",
"description": "Preferences/General"
},
"pref-remove-missing-on-init": {
@ -636,7 +636,7 @@
"description": "Menu text"
},
"remove-all-downloads": {
"message": "Removert Tudo",
"message": "Remover Tudo",
"description": "Menu text"
},
"remove-all-downloads.question": {
@ -692,7 +692,7 @@
"description": "Menu text"
},
"remove-domain-downloads.question": {
"message": "Deseja remover todos os downloads do domínio '$DOMAIN$'?",
"message": "Deseja remover todos os downloads do domínio '$DOMAIN$'?",
"description": "Messagebox text",
"placeholders": {
"domain": {
@ -800,7 +800,7 @@
"description": "Mask text; see mask button"
},
"renamer-info": {
"message": "Adiconar 'flat', como em *flatsubdirs* irá substituir todas as barras no valor, portanto não criará diretórios",
"message": "Adiconar 'flat', como em *flatsubdirs* irá substituir todas as barras no valor, portanto não criará pastas",
"description": "Mask text; see mask button; do NOT translate any mentions of \"flat\"!"
},
"renamer-m": {
@ -892,7 +892,7 @@
"description": "Button text; pref window"
},
"reset-confirmations": {
"message": "Zerar comfirmações memorizadas",
"message": "Zerar confirmações memorizadas",
"description": "Button text; pref/General"
},
"reset-confirmations.done": {

1170
_locales/zh-CN/messages.json Normal file

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,7 @@ import {
// eslint-disable-next-line no-unused-vars
Tab,
// eslint-disable-next-line no-unused-vars
MenuClickInfo
MenuClickInfo,
} from "./browser";
import { Bus } from "./bus";
import { filterInSitu } from "./util";
@ -389,7 +389,10 @@ locale.then(() => {
}
async enumulate(action: string) {
const tab = await tabs.query({active: true});
const tab = await tabs.query({
active: true,
currentWindow: true,
});
if (!tab || !tab.length) {
return;
}

View File

@ -123,9 +123,13 @@ async function loadRawLocales() {
const langs = new Set<string>(["en"]);
const ui = (browser.i18n || chrome.i18n).getUILanguage();
langs.add(ui);
// Try the base too
if (ui.includes("-")) {
// Try the base too
langs.add(ui.split(/[_-]+/)[0]);
langs.add(ui.split(/[-]+/)[0]);
}
else if (ui.includes("_")) {
langs.add(ui.split(/[_]+/)[0]);
}
const fetched = await Promise.all(Array.from(langs, fetchLanguage));

View File

@ -12,13 +12,20 @@ const DEFAULTS = {
message: "message",
};
const TIMEOUT = 4000;
let gid = 1;
export class Notification extends EventEmitter {
private notification: any;
private readonly generated: boolean;
constructor(id: string | null, options = {}) {
super();
id = id || "DownThemAll-notification";
this.generated = !id;
id = id || `DownThemAll-notification${++gid}`;
if (typeof options === "string") {
options = {message: options};
}
@ -39,11 +46,16 @@ export class Notification extends EventEmitter {
opened(notification: any) {
this.notification = notification;
this.emit("opened", this);
if (this.generated) {
setTimeout(() => {
notifications.clear(notification);
}, TIMEOUT);
}
}
clicked(notification: any, button?: number) {
// We can only be clicked, when we were opened, at which point the
// notification id is availablfalse
// notification id is available
if (notification !== this.notification) {
return;
}
@ -52,6 +64,7 @@ export class Notification extends EventEmitter {
return;
}
this.emit("clicked", this);
console.log("clicked", notification);
}
async closed(notification: any) {

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "DownThemAll!",
"version": "4.0.5",
"version": "4.0.6",
"description": "__MSG_extensionDescription__",
"homepage_url": "https://downthemall.org/",
@ -9,6 +9,8 @@
"default_locale": "en",
"content_security_policy": "script-src 'self'; style-src 'self' 'unsafe-inline'; default-src 'self'",
"icons": {
"16": "style/icon16.png",
"32": "style/icon32.png",

View File

@ -49,7 +49,7 @@ p.example {
}
#options > * {
margin: 0;
margin: 2px;
}
#options > input {

View File

@ -42,6 +42,11 @@ module.exports = {
filename: "[name].js"
},
devtool: "source-map",
stats: {
hash: true,
timings: true,
maxModules: 2,
},
watchOptions: {
ignored: /node_modules|bundles/
},

View File

@ -128,8 +128,8 @@
<template id="menufilter-template">
<ul>
<li id="ctx-menufilter-seperator">-</li>
<li id="ctx-menufilter-invert" data-autoHide="false">Invert</li>
<li id="ctx-menufilter-clear" data-autoHide="false">Clear</li>
<li id="ctx-menufilter-invert" data-auto-hide="false">Invert</li>
<li id="ctx-menufilter-clear" data-auto-hide="false">Clear</li>
<li>-</li>
<li id="ctx-menufilter-sort-ascending" data-icon="icon-sort-asc">Sort ascending</li>
<li id="ctx-menufilter-sort-descending" data-icon="icon-sort-desc">Sort descending</li>

View File

@ -340,14 +340,19 @@ export class UrlMenuFilter extends MenuFilter {
async populate() {
const filts = await filters();
for (const i of filts.all.filter(e => e.id !== "deffilter-all")) {
this.addItem(i.label, this.toggleRegularFilter.bind(this, i));
this.addItem(
i.label, this.toggleRegularFilter.bind(this, i), this.filters.has(i));
}
this.addItem("-");
sort(
const domains = sort(
Array.from(new Set(this.collection.items.map(e => e.domain))),
undefined,
naturalCaseCompare
).forEach(e => {
);
if (!domains.length) {
return;
}
this.addItem("-");
domains.forEach(e => {
this.addItem(
e, this.toggleDomainFilter.bind(this, e), this.domains.has(e));
});

View File

@ -7,6 +7,10 @@
box-sizing: content-box !important;
}
html, body {
height: auto !important;
}
ul {
margin: 1.5ex;
margin-right: 2ex;
@ -25,6 +29,7 @@
vertical-align: center;
align-items: center;
border-radius: 4px;
white-space: nowrap;
}
li.sep {