From d2ff6d4eee6d7ac5fe72ca6314b003036681a2c6 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 4 Aug 2021 09:29:08 +0200 Subject: [PATCH 01/26] Translated using Weblate (German) Currently translated at 100.0% (1379 of 1379 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/de/ --- www/common/translations/messages.de.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index 259a19928..d8be458c0 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -1231,7 +1231,7 @@ "register_registrationIsClosed": "Die Registrierung ist geschlossen.", "mediatag_defaultImageName": "Bild", "oo_importBin": "Klicke auf OK, um CryptPads interne Format .bin zu importieren.", - "oo_conversionSupport": "Dein Browser unterstützt die Konvertierung von und in Microsoft-Office-Formaten nicht. Wir empfehlen die Verwendung einer aktuellen Version von Firefox oder Chrome.", + "oo_conversionSupport": "Dein Browser unterstützt die Konvertierung von und in Office-Dateiformaten nicht. Wir empfehlen die Verwendung einer aktuellen Version von Firefox oder Chrome.", "admin_emailTitle": "E-Mail-Adresse der Administratoren", "admin_emailHint": "Lege hier die Kontaktadresse für deine Instanz fest", "admin_supportPrivHint": "Lasse dir den privaten Schlüssel anzeigen, den andere Administratoren zum Zugriff auf die Support-Tickets benötigen. Ein Formular zur Eingabe dieses Schlüssels wird in ihrem Administrationsbereich angezeigt.", From 0a216e4c9673de34b1367525ec7ef5452e0c3161 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 4 Aug 2021 09:29:08 +0200 Subject: [PATCH 02/26] Translated using Weblate (Japanese) Currently translated at 100.0% (1379 of 1379 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/ja/ --- www/common/translations/messages.ja.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/common/translations/messages.ja.json b/www/common/translations/messages.ja.json index 84fe9a3ae..893bc45b3 100644 --- a/www/common/translations/messages.ja.json +++ b/www/common/translations/messages.ja.json @@ -807,7 +807,7 @@ "settings_resetThumbnailsDescription": "ブラウザに保存したサムネイルを削除します。", "settings_disableThumbnailsDescription": "新しいパッドを開くと、サムネイルが自動で作成され、ブラウザに保存されます。ここでサムネイルの作成を無効にできます。", "fm_info_root": "フォルダを作成してファイルを整理できます。", - "oo_conversionSupport": "お使いのブラウザはMicrosoft Officeのフォーマットの変換に対応していません。FirefoxもしくはChromeの最新バージョンの使用を推奨します。", + "oo_conversionSupport": "お使いのブラウザは、オフィスソフトウェアのフォーマットの変換に対応していません。FirefoxもしくはChromeの最新バージョンの使用を推奨します。", "register_registrationIsClosed": "登録は締め切りました。", "settings_notifCalendarHint": "今後のカレンダーのイベントの全ての通知を有効もしくは無効にします。", "reminder_inProgressAllDay": "今日: {0}", From 55a8c94eb46d79481bce3def36dc62664696fe4a Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 9 Aug 2021 16:50:34 +0200 Subject: [PATCH 03/26] Translated using Weblate (French) Currently translated at 99.8% (1380 of 1382 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/fr/ --- www/common/translations/messages.fr.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index 5974401e7..c7794e2d6 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -1379,5 +1379,7 @@ "fm_link_name": "Titre du lien", "fm_link_type": "Lien", "fm_link_new": "Nouveau Lien", - "notification_openLink": "Vous avez reçu un lien {0} de {1} :" + "notification_openLink": "Vous avez reçu un lien {0} de {1} :", + "ui_expand": "Développer", + "ui_collapse": "Réduire" } From 6a4f02831ec4eeed5e73f29047858f340b579a39 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 9 Aug 2021 16:50:34 +0200 Subject: [PATCH 04/26] Translated using Weblate (English) Currently translated at 100.0% (1382 of 1382 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1381 of 1381 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ Translated using Weblate (English) Currently translated at 100.0% (1380 of 1380 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/en/ --- www/common/translations/messages.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 035275177..3311e1768 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -1379,5 +1379,8 @@ "form_anonName": "Your name", "form_answerAs": "Answer as", "fm_link_warning": "Warning: the URL exceeds 200 characters", - "fm_link_invalid": "Invalid URL" + "fm_link_invalid": "Invalid URL", + "ui_collapse": "Collapse", + "ui_expand": "Expand", + "form_totalResponses": "Total responses: {0}" } From 61df9214ffa5e362a02e253546d531967580b168 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 10 Aug 2021 11:50:32 +0200 Subject: [PATCH 05/26] Translated using Weblate (Japanese) Currently translated at 100.0% (1382 of 1382 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/ja/ --- www/common/translations/messages.ja.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.ja.json b/www/common/translations/messages.ja.json index 893bc45b3..96b678f22 100644 --- a/www/common/translations/messages.ja.json +++ b/www/common/translations/messages.ja.json @@ -1379,5 +1379,8 @@ "fm_link_name_placeholder": "あなたのリンク", "fm_link_warning": "注意:URLが200字を超えています", "fm_link_invalid": "URLが無効です", - "form_answerAs": "名前を記入してください" + "form_answerAs": "名前を記入してください", + "form_totalResponses": "回答数:{0}", + "ui_expand": "広げる", + "ui_collapse": "折りたたむ" } From 17ea1611e78dac7faabc4e8d11ee4d5a03f1e26f Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 10 Aug 2021 11:50:32 +0200 Subject: [PATCH 06/26] Translated using Weblate (German) Currently translated at 100.0% (1382 of 1382 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/de/ Translated using Weblate (German) Currently translated at 99.8% (1380 of 1382 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/de/ --- www/common/translations/messages.de.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index d8be458c0..e02219011 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -1379,5 +1379,8 @@ "fm_link_name_placeholder": "Mein Link", "fm_link_url": "URL", "fm_link_type": "Link", - "fm_link_new": "Neuer Link" + "fm_link_new": "Neuer Link", + "form_totalResponses": "Antworten insgesamt: {0}", + "ui_expand": "Ausklappen", + "ui_collapse": "Einklappen" } From a33774aa6f7184f7144e9f2fa6e42af32b391025 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 15:24:23 +0530 Subject: [PATCH 07/26] properly abort from channel archival if no metadata is returned and add some logging when trimming history --- lib/commands/channel.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/commands/channel.js b/lib/commands/channel.js index e69f93180..c36c3424d 100644 --- a/lib/commands/channel.js +++ b/lib/commands/channel.js @@ -54,7 +54,8 @@ Channel.clearOwnedChannel = function (Env, safeKey, channelId, cb, Server) { }); }; -var archiveOwnedChannel = function (Env, safeKey, channelId, _cb, Server) { +var archiveOwnedChannel = function (Env, safeKey, channelId, __cb, Server) { + var _cb = Util.once(Util.mkAsync(__cb)); var unsafeKey = Util.unescapeKeyCharacters(safeKey); nThen(function (w) { // confirm that the channel exists before worrying about whether @@ -160,7 +161,10 @@ Channel.trimHistory = function (Env, safeKey, data, cb) { nThen(function (w) { Metadata.getMetadataRaw(Env, channelId, w(function (err, metadata) { - if (err) { return void cb(err); } + if (err) { + w.abort(); + return void cb(err); + } if (!Core.hasOwners(metadata)) { w.abort(); return void cb('E_NO_OWNERS'); @@ -173,6 +177,11 @@ Channel.trimHistory = function (Env, safeKey, data, cb) { })); }).nThen(function () { Env.msgStore.trimChannel(channelId, hash, function (err) { + Env.Log.info('HK_TRIM_HISTORY', { + unsafeKey: unsafeKey, + channelId: channelId, + status: err? String(e): 'SUCCESS', + }); if (err) { return void cb(err); } // clear historyKeeper's cache for this channel Env.historyKeeper.channelClose(channelId); From d960c10a31341502ae7e4a60128530b4adc48300 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 18:46:10 +0530 Subject: [PATCH 08/26] clear login token when deleting your account and before logging in --- customize.dist/login.js | 1 + www/common/outer/local-store.js | 4 ++++ www/settings/inner.js | 10 +++++----- www/settings/main.js | 4 ++++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/customize.dist/login.js b/customize.dist/login.js index 3309190c0..5cab49934 100644 --- a/customize.dist/login.js +++ b/customize.dist/login.js @@ -463,6 +463,7 @@ define([ var proceed = function (result) { hashing = false; if (test && typeof test === "function" && test()) { return; } + LocalStore.clearLoginToken(); Realtime.whenRealtimeSyncs(result.realtime, function () { Exports.redirect(); }); diff --git a/www/common/outer/local-store.js b/www/common/outer/local-store.js index fb49d084d..77d36645c 100644 --- a/www/common/outer/local-store.js +++ b/www/common/outer/local-store.js @@ -82,6 +82,10 @@ define([ } catch (err) { return; } }; + LocalStore.clearLoginToken = function () { + localStorage.removeItem(Constants.loginToken); + }; + LocalStore.setDriveRedirectPreference = function (bool) { localStorage.setItem(Constants.redirectToDriveKey, Boolean(bool)); }; diff --git a/www/settings/inner.js b/www/settings/inner.js index 2d29f0f05..798af282b 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -542,12 +542,12 @@ define([ } // Owned drive if (data.state === true) { - sframeChan.query('Q_SETTINGS_LOGOUT', null, function() {}); - UI.alert(Messages.settings_deleted, function() { - common.gotoURL('/'); + return void sframeChan.query('Q_SETTINGS_LOGOUT_PROPERLY', null, function() { + UI.alert(Messages.settings_deleted, function() { + common.gotoURL('/'); + }); + spinner.done(); }); - spinner.done(); - return; } // Not owned drive var msg = h('div.cp-app-settings-delete-alert', [ diff --git a/www/settings/main.js b/www/settings/main.js index 8101203b1..189d94eb5 100644 --- a/www/settings/main.js +++ b/www/settings/main.js @@ -57,6 +57,10 @@ define([ }); }); }); + sframeChan.on('Q_SETTINGS_LOGOUT_PROPERLY', function (data, cb) { + Utils.LocalStore.clearLoginToken(); + cb(); + }); sframeChan.on('Q_SETTINGS_DRIVE_RESET', function (data, cb) { Cryptpad.resetDrive(cb); }); From 1c08a27f607d690026913bb7fbb6a81b30ae910b Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 18:48:34 +0530 Subject: [PATCH 09/26] fix a newly introduced reference error --- lib/commands/channel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/commands/channel.js b/lib/commands/channel.js index c36c3424d..5f8216434 100644 --- a/lib/commands/channel.js +++ b/lib/commands/channel.js @@ -180,7 +180,7 @@ Channel.trimHistory = function (Env, safeKey, data, cb) { Env.Log.info('HK_TRIM_HISTORY', { unsafeKey: unsafeKey, channelId: channelId, - status: err? String(e): 'SUCCESS', + status: err? String(err): 'SUCCESS', }); if (err) { return void cb(err); } // clear historyKeeper's cache for this channel From b9eced7bfdbb8ca028e5f3c2ee03c9ff7917a114 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 18:49:29 +0530 Subject: [PATCH 10/26] remove unused 'noscriptfix' hack --- www/common/noscriptfix.js | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 www/common/noscriptfix.js diff --git a/www/common/noscriptfix.js b/www/common/noscriptfix.js deleted file mode 100644 index 532393248..000000000 --- a/www/common/noscriptfix.js +++ /dev/null @@ -1,3 +0,0 @@ -// Fix for noscript bugs when caching iframe content. -// Caution, this file will get cached, you must change the name if you change it. -document.getElementById('pad-iframe').setAttribute('src', 'inner.html?cb=' + (+new Date())); From d8af3a16ab369faad36b1a92c6480adacb3efbef Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 18:51:00 +0530 Subject: [PATCH 11/26] exclude invalid channel and blob ids when fetching your channel list for all variations of the same API --- www/common/proxy-manager.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/www/common/proxy-manager.js b/www/common/proxy-manager.js index d6492c68c..d87572d7e 100644 --- a/www/common/proxy-manager.js +++ b/www/common/proxy-manager.js @@ -1167,6 +1167,13 @@ define([ Store */ + var excludeInvalidIdentifiers = function (result) { + return result.filter(function (channel) { + if (typeof(channel) !== 'string') { return; } + return [32, 48].indexOf(channel.length) !== -1; + }); + }; + // Get the list of channels filtered by a type (expirable channels, owned channels, pin list) var getChannelsList = function (Env, type) { var result = []; @@ -1228,8 +1235,8 @@ define([ } }; - if (type === 'owned' && !Env.edPublic) { return result; } - if (type === 'pin' && !Env.edPublic) { return result; } + if (type === 'owned' && !Env.edPublic) { return excludeInvalidIdentifiers(result); } + if (type === 'pin' && !Env.edPublic) { return excludeInvalidIdentifiers(result); } // Get the list of user objects var userObjects = _getUserObjects(Env); @@ -1256,10 +1263,7 @@ define([ Array.prototype.push.apply(result, sfChannels); } - return result.filter(function (channel) { - if (typeof(channel) !== 'string') { return; } - return [32, 48].indexOf(channel.length) !== -1; - }); + return excludeInvalidIdentifiers(result); }; var addPad = function (Env, path, pad, cb) { From 7647a602191f0a5818204c1000e793b2a42e964d Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 19:48:15 +0530 Subject: [PATCH 12/26] guess OS version on checkup page --- www/checkup/app-checkup.less | 5 ++--- www/checkup/checkup-tools.js | 19 +++++++++++++++++++ www/checkup/main.js | 4 +++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/www/checkup/app-checkup.less b/www/checkup/app-checkup.less index 026d1952c..d5cab9c63 100644 --- a/www/checkup/app-checkup.less +++ b/www/checkup/app-checkup.less @@ -88,11 +88,10 @@ html, body { .cp-notice-browser, .cp-notice-details, .cp-notice-other { font-size: 70%; } - + .underline { text-decoration: underline; } .cp-app-checkup-version, .cp-app-checkup-browser { - text-decoration: underline; + .underline; } - iframe { display: none; } diff --git a/www/checkup/checkup-tools.js b/www/checkup/checkup-tools.js index 79fe1c4b3..f9259ff28 100644 --- a/www/checkup/checkup-tools.js +++ b/www/checkup/checkup-tools.js @@ -14,6 +14,25 @@ define([ return false; }; + var OS_HINTS = { + "Win": "Windows", + "Mac": "MacOS", + "X11": "UNIX", + "Linux": "Linux", + }; + + Tools.guessOS = function () { + var result = "UNKNOWN"; + if (!window.navigator || !window.navigator.appVersion) { return result; } + result = window.navigator.appVersion; + console.log(result); + Object.keys(OS_HINTS).some(function (key) { + if (result.indexOf(key) === -1) { return; } + result = OS_HINTS[key]; // else + return true; + }); + return result; + }; Tools.isSafari = function () { return navigator.vendor.match(/apple/i); diff --git a/www/checkup/main.js b/www/checkup/main.js index a1e458f34..a262d0e4c 100644 --- a/www/checkup/main.js +++ b/www/checkup/main.js @@ -932,7 +932,9 @@ define([ return h('p.cp-notice-browser', [ "You appear to be using a ", h('span.cp-app-checkup-browser', name), - ' browser to view this page.', + ' browser on ', + h('span.underline', Tools.guessOS()), + ' to view this page.', ]); }; From 2dc4ec1b241ec8355185c69bb75ab1866df497d7 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 19:49:22 +0530 Subject: [PATCH 13/26] include vendor and appVersion in support ticket data --- www/support/ui.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/www/support/ui.js b/www/support/ui.js index f61ddac4b..31555dc64 100644 --- a/www/support/ui.js +++ b/www/support/ui.js @@ -39,7 +39,9 @@ define([ var teams = privateData.teams || {}; if (!ctx.isAdmin) { - data.sender.userAgent = window.navigator && window.navigator.userAgent; + data.sender.userAgent = Util.find(window, ['navigator', 'userAgent']); + data.sender.vendor = Util.find(window, ['navigator', 'vendor']); + data.sender.appVersion = Util.find(window, ['navigator', 'appVersion']); data.sender.blockLocation = privateData.blockLocation || ''; data.sender.teams = Object.keys(teams).map(function (key) { var team = teams[key]; From 59aefef2ad5e0320c5b6c6f5590b93ed30f128d3 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 19:51:43 +0530 Subject: [PATCH 14/26] update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 010b9e7de..ce9059d04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ * 'Tools' menu to collapse the tag and view mode UI * general * main toolbar collapse +* clear login token + 1. when you delete your account + 2. when logging in +* remove unused files + * /common/noscriptfix.js +* include vendor and appVersion in support ticket data # 4.9.0 From 44688026d65cb5019ff02ad6bd91910d837d0a0d Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 10 Aug 2021 19:53:56 +0530 Subject: [PATCH 15/26] exclude ids with invalid lengths from our list of owned documents --- www/common/outer/async-store.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index d8e558dad..c4702727d 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -775,7 +775,10 @@ define([ } }); } - return list; + return list.filter(function (channel) { + if (typeof(channel) !== 'string') { return; } + return [32, 48].indexOf(channel.length) !== -1; + }); }; var removeOwnedPads = function (waitFor) { // Delete owned pads From 44f5aee4acd0b6430e2b9d535e09c0580751cc3f Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 11 Aug 2021 15:07:38 +0530 Subject: [PATCH 16/26] Dependency management: move (most) third-party dependencies from www/common/ => www/lib/ * unify less.js files by standardizing on our slightly modified version * update textFit.js to the latest version * describe exact versions of files where known, otherwise link to their project sites --- .jshintignore | 7 ------- bower.json | 1 - customize.dist/pages/index.js | 3 ++- www/common/LessLoader.js | 2 +- www/common/common-interface.js | 8 ++++---- www/common/common-thumbnail.js | 2 +- www/common/diffMarked.js | 8 ++++---- www/common/inner/common-mediatag.js | 2 +- www/common/requireconfig.js | 2 -- www/common/textFit.min.js | 1 - www/lib/changelog.md | 7 +++++++ www/{common => lib}/highlight/highlight.pack.js | 0 www/{common => lib}/highlight/styles/dark.css | 0 www/{common => lib}/highlight/styles/default.css | 0 www/{common => lib}/highlight/styles/github.css | 0 www/{common => lib}/jquery-ui/jquery-ui.min.css | 0 www/{common => lib}/jquery-ui/jquery-ui.min.js | 0 www/{common => lib}/less.min.js | 0 .../pdfjs/api/draft/AnnotationBorderStyle.html | 0 .../pdfjs/api/draft/AnnotationFactory.html | 0 .../pdfjs/api/draft/PDFDataRangeTransport.html | 0 .../pdfjs/api/draft/PDFDocumentLoadingTask.html | 0 .../pdfjs/api/draft/PDFDocumentProxy.html | 0 www/{common => lib}/pdfjs/api/draft/PDFJS.html | 0 .../pdfjs/api/draft/PDFPageProxy.html | 0 www/{common => lib}/pdfjs/api/draft/PDFWorker.html | 0 .../pdfjs/api/draft/PageViewport.html | 0 www/{common => lib}/pdfjs/api/draft/RenderTask.html | 0 .../pdfjs/api/draft/core_annotation.js.html | 0 .../pdfjs/api/draft/display_api.js.html | 0 .../pdfjs/api/draft/display_global.js.html | 0 .../pdfjs/api/draft/doc_helper.js.html | 0 .../pdfjs/api/draft/external-Promise.html | 0 .../api/draft/fonts/OpenSans-Light-webfont.eot | Bin .../api/draft/fonts/OpenSans-Light-webfont.svg | 0 .../api/draft/fonts/OpenSans-Light-webfont.woff | Bin .../api/draft/fonts/OpenSans-Regular-webfont.eot | Bin .../api/draft/fonts/OpenSans-Regular-webfont.svg | 0 .../api/draft/fonts/OpenSans-Regular-webfont.woff | Bin www/{common => lib}/pdfjs/api/draft/global.html | 0 www/{common => lib}/pdfjs/api/draft/index.html | 0 .../pdfjs/api/draft/scripts/linenumber.js | 0 .../pdfjs/api/draft/scripts/prettify/lang-css.js | 0 .../pdfjs/api/draft/scripts/prettify/prettify.js | 0 .../pdfjs/api/draft/shared_util.js.html | 0 .../pdfjs/api/draft/styles/jsdoc-default.css | 0 .../pdfjs/api/draft/styles/prettify-tomorrow.css | 0 www/{common => lib}/pdfjs/api/index.html | 0 www/{common => lib}/pdfjs/build/pdf.js | 0 www/{common => lib}/pdfjs/build/pdf.worker.js | 0 www/{common => lib}/pdfjs/css/bootstrap.min.css | 0 www/{common => lib}/pdfjs/css/main.css | 0 www/{common => lib}/pdfjs/images/favicon.ico | Bin www/{common => lib}/pdfjs/images/logo.svg | 0 www/{common => lib}/pdfjs/js/bootstrap.min.js | 0 www/{common => lib}/pdfjs/js/jquery-2.1.0.min.js | 0 .../pdfjs/web/images/findbarButton-next-rtl.png | Bin .../pdfjs/web/images/findbarButton-next-rtl@2x.png | Bin .../pdfjs/web/images/findbarButton-next.png | Bin .../pdfjs/web/images/findbarButton-next@2x.png | Bin .../pdfjs/web/images/findbarButton-previous-rtl.png | Bin .../web/images/findbarButton-previous-rtl@2x.png | Bin .../pdfjs/web/images/findbarButton-previous.png | Bin .../pdfjs/web/images/findbarButton-previous@2x.png | Bin www/{common => lib}/pdfjs/web/images/grab.cur | Bin www/{common => lib}/pdfjs/web/images/grabbing.cur | Bin .../pdfjs/web/images/loading-icon.gif | Bin .../pdfjs/web/images/loading-small.png | Bin .../pdfjs/web/images/loading-small@2x.png | Bin .../secondaryToolbarButton-documentProperties.png | Bin ...secondaryToolbarButton-documentProperties@2x.png | Bin .../web/images/secondaryToolbarButton-firstPage.png | Bin .../images/secondaryToolbarButton-firstPage@2x.png | Bin .../web/images/secondaryToolbarButton-handTool.png | Bin .../images/secondaryToolbarButton-handTool@2x.png | Bin .../web/images/secondaryToolbarButton-lastPage.png | Bin .../images/secondaryToolbarButton-lastPage@2x.png | Bin .../web/images/secondaryToolbarButton-rotateCcw.png | Bin .../images/secondaryToolbarButton-rotateCcw@2x.png | Bin .../web/images/secondaryToolbarButton-rotateCw.png | Bin .../images/secondaryToolbarButton-rotateCw@2x.png | Bin .../images/secondaryToolbarButton-selectTool.png | Bin .../images/secondaryToolbarButton-selectTool@2x.png | Bin www/{common => lib}/pdfjs/web/images/shadow.png | Bin www/{common => lib}/pdfjs/web/images/texture.png | Bin .../pdfjs/web/images/toolbarButton-bookmark.png | Bin .../pdfjs/web/images/toolbarButton-bookmark@2x.png | Bin .../pdfjs/web/images/toolbarButton-download.png | Bin .../pdfjs/web/images/toolbarButton-download@2x.png | Bin .../pdfjs/web/images/toolbarButton-menuArrows.png | Bin .../web/images/toolbarButton-menuArrows@2x.png | Bin .../pdfjs/web/images/toolbarButton-openFile.png | Bin .../pdfjs/web/images/toolbarButton-openFile@2x.png | Bin .../pdfjs/web/images/toolbarButton-pageDown-rtl.png | Bin .../web/images/toolbarButton-pageDown-rtl@2x.png | Bin .../pdfjs/web/images/toolbarButton-pageDown.png | Bin .../pdfjs/web/images/toolbarButton-pageDown@2x.png | Bin .../pdfjs/web/images/toolbarButton-pageUp-rtl.png | Bin .../web/images/toolbarButton-pageUp-rtl@2x.png | Bin .../pdfjs/web/images/toolbarButton-pageUp.png | Bin .../pdfjs/web/images/toolbarButton-pageUp@2x.png | Bin .../web/images/toolbarButton-presentationMode.png | Bin .../images/toolbarButton-presentationMode@2x.png | Bin .../pdfjs/web/images/toolbarButton-print.png | Bin .../pdfjs/web/images/toolbarButton-print@2x.png | Bin .../pdfjs/web/images/toolbarButton-search.png | Bin .../pdfjs/web/images/toolbarButton-search@2x.png | Bin .../toolbarButton-secondaryToolbarToggle-rtl.png | Bin .../toolbarButton-secondaryToolbarToggle-rtl@2x.png | Bin .../images/toolbarButton-secondaryToolbarToggle.png | Bin .../toolbarButton-secondaryToolbarToggle@2x.png | Bin .../web/images/toolbarButton-sidebarToggle-rtl.png | Bin .../images/toolbarButton-sidebarToggle-rtl@2x.png | Bin .../web/images/toolbarButton-sidebarToggle.png | Bin .../web/images/toolbarButton-sidebarToggle@2x.png | Bin .../web/images/toolbarButton-viewAttachments.png | Bin .../web/images/toolbarButton-viewAttachments@2x.png | Bin .../web/images/toolbarButton-viewOutline-rtl.png | Bin .../web/images/toolbarButton-viewOutline-rtl@2x.png | Bin .../pdfjs/web/images/toolbarButton-viewOutline.png | Bin .../web/images/toolbarButton-viewOutline@2x.png | Bin .../web/images/toolbarButton-viewThumbnail.png | Bin .../web/images/toolbarButton-viewThumbnail@2x.png | Bin .../pdfjs/web/images/toolbarButton-zoomIn.png | Bin .../pdfjs/web/images/toolbarButton-zoomIn@2x.png | Bin .../pdfjs/web/images/toolbarButton-zoomOut.png | Bin .../pdfjs/web/images/toolbarButton-zoomOut@2x.png | Bin .../pdfjs/web/images/treeitem-collapsed-rtl.png | Bin .../pdfjs/web/images/treeitem-collapsed-rtl@2x.png | Bin .../pdfjs/web/images/treeitem-collapsed.png | Bin .../pdfjs/web/images/treeitem-collapsed@2x.png | Bin .../pdfjs/web/images/treeitem-expanded.png | Bin .../pdfjs/web/images/treeitem-expanded@2x.png | Bin .../pdfjs/web/locale/fr/viewer.properties | 0 .../pdfjs/web/locale/locale.properties | 0 www/{common => lib}/pdfjs/web/viewer.css | 0 www/{common => lib}/pdfjs/web/viewer.html | 0 www/{common => lib}/pdfjs/web/viewer.js | 0 www/lib/textFit.min.js | 1 + www/{common => lib}/tippy/tippy.css | 0 www/{common => lib}/tippy/tippy.min.js | 0 www/mediatag/main.js | 2 +- www/slide/inner.js | 5 +++-- www/worker/worker.js | 2 -- 144 files changed, 25 insertions(+), 28 deletions(-) delete mode 100644 www/common/textFit.min.js rename www/{common => lib}/highlight/highlight.pack.js (100%) rename www/{common => lib}/highlight/styles/dark.css (100%) rename www/{common => lib}/highlight/styles/default.css (100%) rename www/{common => lib}/highlight/styles/github.css (100%) rename www/{common => lib}/jquery-ui/jquery-ui.min.css (100%) rename www/{common => lib}/jquery-ui/jquery-ui.min.js (100%) rename www/{common => lib}/less.min.js (100%) rename www/{common => lib}/pdfjs/api/draft/AnnotationBorderStyle.html (100%) rename www/{common => lib}/pdfjs/api/draft/AnnotationFactory.html (100%) rename www/{common => lib}/pdfjs/api/draft/PDFDataRangeTransport.html (100%) rename www/{common => lib}/pdfjs/api/draft/PDFDocumentLoadingTask.html (100%) rename www/{common => lib}/pdfjs/api/draft/PDFDocumentProxy.html (100%) rename www/{common => lib}/pdfjs/api/draft/PDFJS.html (100%) rename www/{common => lib}/pdfjs/api/draft/PDFPageProxy.html (100%) rename www/{common => lib}/pdfjs/api/draft/PDFWorker.html (100%) rename www/{common => lib}/pdfjs/api/draft/PageViewport.html (100%) rename www/{common => lib}/pdfjs/api/draft/RenderTask.html (100%) rename www/{common => lib}/pdfjs/api/draft/core_annotation.js.html (100%) rename www/{common => lib}/pdfjs/api/draft/display_api.js.html (100%) rename www/{common => lib}/pdfjs/api/draft/display_global.js.html (100%) rename www/{common => lib}/pdfjs/api/draft/doc_helper.js.html (100%) rename www/{common => lib}/pdfjs/api/draft/external-Promise.html (100%) rename www/{common => lib}/pdfjs/api/draft/fonts/OpenSans-Light-webfont.eot (100%) rename www/{common => lib}/pdfjs/api/draft/fonts/OpenSans-Light-webfont.svg (100%) rename www/{common => lib}/pdfjs/api/draft/fonts/OpenSans-Light-webfont.woff (100%) rename www/{common => lib}/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.eot (100%) rename www/{common => lib}/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.svg (100%) rename www/{common => lib}/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.woff (100%) rename www/{common => lib}/pdfjs/api/draft/global.html (100%) rename www/{common => lib}/pdfjs/api/draft/index.html (100%) rename www/{common => lib}/pdfjs/api/draft/scripts/linenumber.js (100%) rename www/{common => lib}/pdfjs/api/draft/scripts/prettify/lang-css.js (100%) rename www/{common => lib}/pdfjs/api/draft/scripts/prettify/prettify.js (100%) rename www/{common => lib}/pdfjs/api/draft/shared_util.js.html (100%) rename www/{common => lib}/pdfjs/api/draft/styles/jsdoc-default.css (100%) rename www/{common => lib}/pdfjs/api/draft/styles/prettify-tomorrow.css (100%) rename www/{common => lib}/pdfjs/api/index.html (100%) rename www/{common => lib}/pdfjs/build/pdf.js (100%) rename www/{common => lib}/pdfjs/build/pdf.worker.js (100%) rename www/{common => lib}/pdfjs/css/bootstrap.min.css (100%) rename www/{common => lib}/pdfjs/css/main.css (100%) rename www/{common => lib}/pdfjs/images/favicon.ico (100%) rename www/{common => lib}/pdfjs/images/logo.svg (100%) rename www/{common => lib}/pdfjs/js/bootstrap.min.js (100%) rename www/{common => lib}/pdfjs/js/jquery-2.1.0.min.js (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-next-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-next-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-next.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-next@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-previous-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-previous-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-previous.png (100%) rename www/{common => lib}/pdfjs/web/images/findbarButton-previous@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/grab.cur (100%) rename www/{common => lib}/pdfjs/web/images/grabbing.cur (100%) rename www/{common => lib}/pdfjs/web/images/loading-icon.gif (100%) rename www/{common => lib}/pdfjs/web/images/loading-small.png (100%) rename www/{common => lib}/pdfjs/web/images/loading-small@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-documentProperties.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-firstPage.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-handTool.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-lastPage.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-rotateCw.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-selectTool.png (100%) rename www/{common => lib}/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/shadow.png (100%) rename www/{common => lib}/pdfjs/web/images/texture.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-bookmark.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-bookmark@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-download.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-download@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-menuArrows.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-menuArrows@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-openFile.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-openFile@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageDown-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageDown.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageDown@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageUp-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageUp.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-pageUp@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-presentationMode.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-presentationMode@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-print.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-print@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-search.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-search@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-sidebarToggle.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewAttachments.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewAttachments@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewOutline-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewOutline.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewOutline@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewThumbnail.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-zoomIn.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-zoomIn@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-zoomOut.png (100%) rename www/{common => lib}/pdfjs/web/images/toolbarButton-zoomOut@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/treeitem-collapsed-rtl.png (100%) rename www/{common => lib}/pdfjs/web/images/treeitem-collapsed-rtl@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/treeitem-collapsed.png (100%) rename www/{common => lib}/pdfjs/web/images/treeitem-collapsed@2x.png (100%) rename www/{common => lib}/pdfjs/web/images/treeitem-expanded.png (100%) rename www/{common => lib}/pdfjs/web/images/treeitem-expanded@2x.png (100%) rename www/{common => lib}/pdfjs/web/locale/fr/viewer.properties (100%) rename www/{common => lib}/pdfjs/web/locale/locale.properties (100%) rename www/{common => lib}/pdfjs/web/viewer.css (100%) rename www/{common => lib}/pdfjs/web/viewer.html (100%) rename www/{common => lib}/pdfjs/web/viewer.js (100%) create mode 100644 www/lib/textFit.min.js rename www/{common => lib}/tippy/tippy.css (100%) rename www/{common => lib}/tippy/tippy.min.js (100%) diff --git a/.jshintignore b/.jshintignore index 1d7c897db..de77cc86c 100644 --- a/.jshintignore +++ b/.jshintignore @@ -1,11 +1,5 @@ node_modules/ www/bower_components/ -www/common/less.min.js -www/common/pdfjs/ -www/common/tippy/ -www/common/textFit.min.js -www/common/highlight/ -www/common/jquery-ui/ www/common/onlyoffice/sdkjs www/common/onlyoffice/web-apps www/common/onlyoffice/x2t @@ -14,7 +8,6 @@ www/common/onlyoffice/v2* www/common/onlyoffice/v4 server.js -www/common/old-media-tag.js www/scratch www/accounts www/lib diff --git a/bower.json b/bower.json index 82a9931ea..efa70c1bb 100644 --- a/bower.json +++ b/bower.json @@ -36,7 +36,6 @@ "alertifyjs": "1.0.11", "scrypt-async": "1.2.0", "require-css": "0.1.10", - "less": "3.7.1", "bootstrap": "^v4.0.0", "diff-dom": "2.1.1", "nthen": "0.1.7", diff --git a/customize.dist/pages/index.js b/customize.dist/pages/index.js index 8ea334667..ac37ac104 100644 --- a/customize.dist/pages/index.js +++ b/customize.dist/pages/index.js @@ -5,7 +5,7 @@ define([ '/common/common-feedback.js', '/common/common-interface.js', '/common/common-hash.js', - '/common/textFit.min.js', + '/lib/textFit.min.js', '/customize/messages.js', '/customize/application_config.js', '/common/outer/local-store.js', @@ -67,6 +67,7 @@ define([ icons.forEach(function (a) { setTimeout(function () { + // ensure that text in our app icons doesn't overflow TextFit($(a).find('.pad-button-text')[0], {minFontSize: 13, maxFontSize: 18}); }); }); diff --git a/www/common/LessLoader.js b/www/common/LessLoader.js index df46f344c..a10936644 100644 --- a/www/common/LessLoader.js +++ b/www/common/LessLoader.js @@ -110,7 +110,7 @@ define([ if (lessEngine) { cb(lessEngine); } else { - require(['/common/less.min.js'], function (Less) { + require(['/lib/less.min.js'], function (Less) { if (lessEngine) { return void cb(lessEngine); } lessEngine = Less; Less.functions.functionRegistry.add('LessLoader_currentFile', function () { diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 5aea35c78..588fdf5fa 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -15,15 +15,15 @@ define([ '/common/common-notifier.js', '/customize/application_config.js', '/bower_components/alertifyjs/dist/js/alertify.js', - '/common/tippy/tippy.min.js', + '/lib/tippy/tippy.min.js', '/common/hyperscript.js', '/customize/loading.js', '/common/test.js', - '/common/jquery-ui/jquery-ui.min.js', + '/lib/jquery-ui/jquery-ui.min.js', // autocomplete widget '/bower_components/bootstrap-tokenfield/dist/bootstrap-tokenfield.js', - 'css!/common/tippy/tippy.css', - 'css!/common/jquery-ui/jquery-ui.min.css' + 'css!/lib/tippy/tippy.css', + 'css!/lib/jquery-ui/jquery-ui.min.css' ], function ($, Messages, Util, Hash, Notifier, AppConfig, Alertify, Tippy, h, Loading, Test) { var UI = {}; diff --git a/www/common/common-thumbnail.js b/www/common/common-thumbnail.js index 012c2c9b4..01e89e5d1 100644 --- a/www/common/common-thumbnail.js +++ b/www/common/common-thumbnail.js @@ -145,7 +145,7 @@ define([ video.src = url; }; Thumb.fromPdfBlob = function (blob, cb) { - require.config({paths: {'pdfjs-dist': '/common/pdfjs'}}); + require.config({paths: {'pdfjs-dist': '/lib/pdfjs'}}); require(['pdfjs-dist/build/pdf'], function (PDFJS) { var url = URL.createObjectURL(blob); var makeThumb = function (page) { diff --git a/www/common/diffMarked.js b/www/common/diffMarked.js index 0fe8aed0a..1f62f27f1 100644 --- a/www/common/diffMarked.js +++ b/www/common/diffMarked.js @@ -8,13 +8,13 @@ define([ '/common/inner/common-mediatag.js', '/common/media-tag.js', '/customize/messages.js', - '/common/less.min.js', + '/lib/less.min.js', '/customize/pages.js', - '/common/highlight/highlight.pack.js', + '/lib/highlight/highlight.pack.js', '/lib/diff-dom/diffDOM.js', '/bower_components/tweetnacl/nacl-fast.min.js', - 'css!/common/highlight/styles/'+ (window.CryptPad_theme === 'dark' ? 'dark.css' : 'github.css') + 'css!/lib/highlight/styles/'+ (window.CryptPad_theme === 'dark' ? 'dark.css' : 'github.css') ],function ($, ApiConfig, Marked, Hash, Util, h, MT, MediaTag, Messages, Less, Pages) { var DiffMd = {}; @@ -424,7 +424,7 @@ define([ // Only allow iframe, video and audio with local source var checkSrc = function (root) { if (restrictedTags.indexOf(root.nodeName.toUpperCase()) === -1) { return true; } - return root.getAttribute && /^(blob\:|\/common\/pdfjs)/.test(root.getAttribute('src')); + return root.getAttribute && /^(blob\:|\/lib\/pdfjs)/.test(root.getAttribute('src')); }; var removeForbiddenTags = function (root) { diff --git a/www/common/inner/common-mediatag.js b/www/common/inner/common-mediatag.js index b8550fcac..1d88e1029 100644 --- a/www/common/inner/common-mediatag.js +++ b/www/common/inner/common-mediatag.js @@ -20,7 +20,7 @@ define([ // This file is loaded by sframe-common so the following config is used in all the inner apps if (MediaTag) { MediaTag.setDefaultConfig('pdf', { - viewer: '/common/pdfjs/web/viewer.html' + viewer: '/lib/pdfjs/web/viewer.html' }); MediaTag.setDefaultConfig('download', { text: Messages.mediatag_saveButton, diff --git a/www/common/requireconfig.js b/www/common/requireconfig.js index 1689c0527..4e3baf857 100644 --- a/www/common/requireconfig.js +++ b/www/common/requireconfig.js @@ -13,8 +13,6 @@ define([ "mermaid": "/code/mermaid.min", // json.sortify same "json.sortify": "/bower_components/json.sortify/dist/JSON.sortify", - //"pdfjs-dist/build/pdf": "/bower_components/pdfjs-dist/build/pdf", - //"pdfjs-dist/build/pdf.worker": "/bower_components/pdfjs-dist/build/pdf.worker" cm: '/bower_components/codemirror', 'tui-code-snippet': '/lib/calendar/tui-code-snippet.min', 'tui-date-picker': '/lib/calendar/date-picker', diff --git a/www/common/textFit.min.js b/www/common/textFit.min.js deleted file mode 100644 index f6ce43954..000000000 --- a/www/common/textFit.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define([],factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.textFit=factory()}})(typeof global==="object"?global:this,function(){"use strict";var defaultSettings={alignVert:false,alignHoriz:false,multiLine:false,detectMultiLine:true,minFontSize:6,maxFontSize:80,reProcess:true,widthOnly:false,alignVertWithFlexbox:false};return function textFit(els,options){if(!options)options={};var settings={};for(var key in defaultSettings){if(options.hasOwnProperty(key)){settings[key]=options[key]}else{settings[key]=defaultSettings[key]}}if(typeof els.toArray==="function"){els=els.toArray()}var elType=Object.prototype.toString.call(els);if(elType!=="[object Array]"&&elType!=="[object NodeList]"&&elType!=="[object HTMLCollection]"){els=[els]}for(var i=0;i=parseInt(window.getComputedStyle(innerSpan)["font-size"],10)*2){multiLine=true}if(!multiLine){el.style["white-space"]="nowrap"}low=settings.minFontSize+1;high=settings.maxFontSize+1;while(low<=high){mid=parseInt((low+high)/2,10);innerSpan.style.fontSize=mid+"px";if(innerSpan.scrollWidth<=originalWidth&&(settings.widthOnly||innerSpan.scrollHeight<=originalHeight)){low=mid+1}else{high=mid-1}}innerSpan.style.fontSize=mid-1+"px";if(settings.alignVert){addStyleSheet();var height=innerSpan.scrollHeight;if(window.getComputedStyle(el)["position"]==="static"){el.style["position"]="relative"}if(!hasClass(innerSpan,"textFitAlignVert")){innerSpan.className=innerSpan.className+" textFitAlignVert"}innerSpan.style["height"]=height+"px";if(settings.alignVertWithFlexbox&&!hasClass(el,"textFitAlignVertFlex")){el.className=el.className+" textFitAlignVertFlex"}}}function innerHeight(el){var style=window.getComputedStyle(el,null);return el.clientHeight-parseInt(style.getPropertyValue("padding-top"),10)-parseInt(style.getPropertyValue("padding-bottom"),10)}function innerWidth(el){var style=window.getComputedStyle(el,null);return el.clientWidth-parseInt(style.getPropertyValue("padding-left"),10)-parseInt(style.getPropertyValue("padding-right"),10)}function isElement(o){return typeof HTMLElement==="object"?o instanceof HTMLElement:o&&typeof o==="object"&&o!==null&&o.nodeType===1&&typeof o.nodeName==="string"}function hasClass(element,cls){return(" "+element.className+" ").indexOf(" "+cls+" ")>-1}function addStyleSheet(){if(document.getElementById("textFitStyleSheet"))return;var style=[".textFitAlignVert{","position: absolute;","top: 0; right: 0; bottom: 0; left: 0;","margin: auto;","display: flex;","justify-content: center;","flex-direction: column;","}",".textFitAlignVertFlex{","display: flex;","}",".textFitAlignVertFlex .textFitAlignVert{","position: static;","}"].join("");var css=document.createElement("style");css.type="text/css";css.id="textFitStyleSheet";css.innerHTML=style;document.body.appendChild(css)}}); \ No newline at end of file diff --git a/www/lib/changelog.md b/www/lib/changelog.md index 86ef6ec22..1913b78df 100644 --- a/www/lib/changelog.md +++ b/www/lib/changelog.md @@ -1,4 +1,11 @@ This file is intended to be used as a log of what third-party source we have vendored, where we got it, and what modifications we have made to it (if any). * [turndown v7.1.1](https://github.com/mixmark-io/turndown/releases/tag/v7.1.1) built from unmodified source as per its build scripts. +* [less.min.js v3.11.1](https://github.com/less/less.js/releases/tag/v3.11.1) with a minor modification to produce slightly more compact CSS +* [textFit.min.js v2.4.0 ](https://github.com/STRML/textFit/releases/tag/v2.4.0) to ensure that app names fit inside their icon containers on the home page +* [highlightjs](https://github.com/highlightjs/highlight.js/) for syntax highlighting in our code editor +* [our fork of tippy.js](https://github.com/xwiki-labs/tippyjs) for adding tooltips. +* [jscolor v2.0.5](https://jscolor.com/) for providing a consistent color picker across all browsers +* [jquery.ui 1.12.1](https://jqueryui.com/) for its 'autocomplete' extension which is used for our tag picker +* [pdfjs](https://mozilla.github.io/pdf.js/) with some minor modifications to prevent CSP errors diff --git a/www/common/highlight/highlight.pack.js b/www/lib/highlight/highlight.pack.js similarity index 100% rename from www/common/highlight/highlight.pack.js rename to www/lib/highlight/highlight.pack.js diff --git a/www/common/highlight/styles/dark.css b/www/lib/highlight/styles/dark.css similarity index 100% rename from www/common/highlight/styles/dark.css rename to www/lib/highlight/styles/dark.css diff --git a/www/common/highlight/styles/default.css b/www/lib/highlight/styles/default.css similarity index 100% rename from www/common/highlight/styles/default.css rename to www/lib/highlight/styles/default.css diff --git a/www/common/highlight/styles/github.css b/www/lib/highlight/styles/github.css similarity index 100% rename from www/common/highlight/styles/github.css rename to www/lib/highlight/styles/github.css diff --git a/www/common/jquery-ui/jquery-ui.min.css b/www/lib/jquery-ui/jquery-ui.min.css similarity index 100% rename from www/common/jquery-ui/jquery-ui.min.css rename to www/lib/jquery-ui/jquery-ui.min.css diff --git a/www/common/jquery-ui/jquery-ui.min.js b/www/lib/jquery-ui/jquery-ui.min.js similarity index 100% rename from www/common/jquery-ui/jquery-ui.min.js rename to www/lib/jquery-ui/jquery-ui.min.js diff --git a/www/common/less.min.js b/www/lib/less.min.js similarity index 100% rename from www/common/less.min.js rename to www/lib/less.min.js diff --git a/www/common/pdfjs/api/draft/AnnotationBorderStyle.html b/www/lib/pdfjs/api/draft/AnnotationBorderStyle.html similarity index 100% rename from www/common/pdfjs/api/draft/AnnotationBorderStyle.html rename to www/lib/pdfjs/api/draft/AnnotationBorderStyle.html diff --git a/www/common/pdfjs/api/draft/AnnotationFactory.html b/www/lib/pdfjs/api/draft/AnnotationFactory.html similarity index 100% rename from www/common/pdfjs/api/draft/AnnotationFactory.html rename to www/lib/pdfjs/api/draft/AnnotationFactory.html diff --git a/www/common/pdfjs/api/draft/PDFDataRangeTransport.html b/www/lib/pdfjs/api/draft/PDFDataRangeTransport.html similarity index 100% rename from www/common/pdfjs/api/draft/PDFDataRangeTransport.html rename to www/lib/pdfjs/api/draft/PDFDataRangeTransport.html diff --git a/www/common/pdfjs/api/draft/PDFDocumentLoadingTask.html b/www/lib/pdfjs/api/draft/PDFDocumentLoadingTask.html similarity index 100% rename from www/common/pdfjs/api/draft/PDFDocumentLoadingTask.html rename to www/lib/pdfjs/api/draft/PDFDocumentLoadingTask.html diff --git a/www/common/pdfjs/api/draft/PDFDocumentProxy.html b/www/lib/pdfjs/api/draft/PDFDocumentProxy.html similarity index 100% rename from www/common/pdfjs/api/draft/PDFDocumentProxy.html rename to www/lib/pdfjs/api/draft/PDFDocumentProxy.html diff --git a/www/common/pdfjs/api/draft/PDFJS.html b/www/lib/pdfjs/api/draft/PDFJS.html similarity index 100% rename from www/common/pdfjs/api/draft/PDFJS.html rename to www/lib/pdfjs/api/draft/PDFJS.html diff --git a/www/common/pdfjs/api/draft/PDFPageProxy.html b/www/lib/pdfjs/api/draft/PDFPageProxy.html similarity index 100% rename from www/common/pdfjs/api/draft/PDFPageProxy.html rename to www/lib/pdfjs/api/draft/PDFPageProxy.html diff --git a/www/common/pdfjs/api/draft/PDFWorker.html b/www/lib/pdfjs/api/draft/PDFWorker.html similarity index 100% rename from www/common/pdfjs/api/draft/PDFWorker.html rename to www/lib/pdfjs/api/draft/PDFWorker.html diff --git a/www/common/pdfjs/api/draft/PageViewport.html b/www/lib/pdfjs/api/draft/PageViewport.html similarity index 100% rename from www/common/pdfjs/api/draft/PageViewport.html rename to www/lib/pdfjs/api/draft/PageViewport.html diff --git a/www/common/pdfjs/api/draft/RenderTask.html b/www/lib/pdfjs/api/draft/RenderTask.html similarity index 100% rename from www/common/pdfjs/api/draft/RenderTask.html rename to www/lib/pdfjs/api/draft/RenderTask.html diff --git a/www/common/pdfjs/api/draft/core_annotation.js.html b/www/lib/pdfjs/api/draft/core_annotation.js.html similarity index 100% rename from www/common/pdfjs/api/draft/core_annotation.js.html rename to www/lib/pdfjs/api/draft/core_annotation.js.html diff --git a/www/common/pdfjs/api/draft/display_api.js.html b/www/lib/pdfjs/api/draft/display_api.js.html similarity index 100% rename from www/common/pdfjs/api/draft/display_api.js.html rename to www/lib/pdfjs/api/draft/display_api.js.html diff --git a/www/common/pdfjs/api/draft/display_global.js.html b/www/lib/pdfjs/api/draft/display_global.js.html similarity index 100% rename from www/common/pdfjs/api/draft/display_global.js.html rename to www/lib/pdfjs/api/draft/display_global.js.html diff --git a/www/common/pdfjs/api/draft/doc_helper.js.html b/www/lib/pdfjs/api/draft/doc_helper.js.html similarity index 100% rename from www/common/pdfjs/api/draft/doc_helper.js.html rename to www/lib/pdfjs/api/draft/doc_helper.js.html diff --git a/www/common/pdfjs/api/draft/external-Promise.html b/www/lib/pdfjs/api/draft/external-Promise.html similarity index 100% rename from www/common/pdfjs/api/draft/external-Promise.html rename to www/lib/pdfjs/api/draft/external-Promise.html diff --git a/www/common/pdfjs/api/draft/fonts/OpenSans-Light-webfont.eot b/www/lib/pdfjs/api/draft/fonts/OpenSans-Light-webfont.eot similarity index 100% rename from www/common/pdfjs/api/draft/fonts/OpenSans-Light-webfont.eot rename to www/lib/pdfjs/api/draft/fonts/OpenSans-Light-webfont.eot diff --git a/www/common/pdfjs/api/draft/fonts/OpenSans-Light-webfont.svg b/www/lib/pdfjs/api/draft/fonts/OpenSans-Light-webfont.svg similarity index 100% rename from www/common/pdfjs/api/draft/fonts/OpenSans-Light-webfont.svg rename to www/lib/pdfjs/api/draft/fonts/OpenSans-Light-webfont.svg diff --git a/www/common/pdfjs/api/draft/fonts/OpenSans-Light-webfont.woff b/www/lib/pdfjs/api/draft/fonts/OpenSans-Light-webfont.woff similarity index 100% rename from www/common/pdfjs/api/draft/fonts/OpenSans-Light-webfont.woff rename to www/lib/pdfjs/api/draft/fonts/OpenSans-Light-webfont.woff diff --git a/www/common/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.eot b/www/lib/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.eot similarity index 100% rename from www/common/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.eot rename to www/lib/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.eot diff --git a/www/common/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.svg b/www/lib/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.svg similarity index 100% rename from www/common/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.svg rename to www/lib/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.svg diff --git a/www/common/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.woff b/www/lib/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.woff similarity index 100% rename from www/common/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.woff rename to www/lib/pdfjs/api/draft/fonts/OpenSans-Regular-webfont.woff diff --git a/www/common/pdfjs/api/draft/global.html b/www/lib/pdfjs/api/draft/global.html similarity index 100% rename from www/common/pdfjs/api/draft/global.html rename to www/lib/pdfjs/api/draft/global.html diff --git a/www/common/pdfjs/api/draft/index.html b/www/lib/pdfjs/api/draft/index.html similarity index 100% rename from www/common/pdfjs/api/draft/index.html rename to www/lib/pdfjs/api/draft/index.html diff --git a/www/common/pdfjs/api/draft/scripts/linenumber.js b/www/lib/pdfjs/api/draft/scripts/linenumber.js similarity index 100% rename from www/common/pdfjs/api/draft/scripts/linenumber.js rename to www/lib/pdfjs/api/draft/scripts/linenumber.js diff --git a/www/common/pdfjs/api/draft/scripts/prettify/lang-css.js b/www/lib/pdfjs/api/draft/scripts/prettify/lang-css.js similarity index 100% rename from www/common/pdfjs/api/draft/scripts/prettify/lang-css.js rename to www/lib/pdfjs/api/draft/scripts/prettify/lang-css.js diff --git a/www/common/pdfjs/api/draft/scripts/prettify/prettify.js b/www/lib/pdfjs/api/draft/scripts/prettify/prettify.js similarity index 100% rename from www/common/pdfjs/api/draft/scripts/prettify/prettify.js rename to www/lib/pdfjs/api/draft/scripts/prettify/prettify.js diff --git a/www/common/pdfjs/api/draft/shared_util.js.html b/www/lib/pdfjs/api/draft/shared_util.js.html similarity index 100% rename from www/common/pdfjs/api/draft/shared_util.js.html rename to www/lib/pdfjs/api/draft/shared_util.js.html diff --git a/www/common/pdfjs/api/draft/styles/jsdoc-default.css b/www/lib/pdfjs/api/draft/styles/jsdoc-default.css similarity index 100% rename from www/common/pdfjs/api/draft/styles/jsdoc-default.css rename to www/lib/pdfjs/api/draft/styles/jsdoc-default.css diff --git a/www/common/pdfjs/api/draft/styles/prettify-tomorrow.css b/www/lib/pdfjs/api/draft/styles/prettify-tomorrow.css similarity index 100% rename from www/common/pdfjs/api/draft/styles/prettify-tomorrow.css rename to www/lib/pdfjs/api/draft/styles/prettify-tomorrow.css diff --git a/www/common/pdfjs/api/index.html b/www/lib/pdfjs/api/index.html similarity index 100% rename from www/common/pdfjs/api/index.html rename to www/lib/pdfjs/api/index.html diff --git a/www/common/pdfjs/build/pdf.js b/www/lib/pdfjs/build/pdf.js similarity index 100% rename from www/common/pdfjs/build/pdf.js rename to www/lib/pdfjs/build/pdf.js diff --git a/www/common/pdfjs/build/pdf.worker.js b/www/lib/pdfjs/build/pdf.worker.js similarity index 100% rename from www/common/pdfjs/build/pdf.worker.js rename to www/lib/pdfjs/build/pdf.worker.js diff --git a/www/common/pdfjs/css/bootstrap.min.css b/www/lib/pdfjs/css/bootstrap.min.css similarity index 100% rename from www/common/pdfjs/css/bootstrap.min.css rename to www/lib/pdfjs/css/bootstrap.min.css diff --git a/www/common/pdfjs/css/main.css b/www/lib/pdfjs/css/main.css similarity index 100% rename from www/common/pdfjs/css/main.css rename to www/lib/pdfjs/css/main.css diff --git a/www/common/pdfjs/images/favicon.ico b/www/lib/pdfjs/images/favicon.ico similarity index 100% rename from www/common/pdfjs/images/favicon.ico rename to www/lib/pdfjs/images/favicon.ico diff --git a/www/common/pdfjs/images/logo.svg b/www/lib/pdfjs/images/logo.svg similarity index 100% rename from www/common/pdfjs/images/logo.svg rename to www/lib/pdfjs/images/logo.svg diff --git a/www/common/pdfjs/js/bootstrap.min.js b/www/lib/pdfjs/js/bootstrap.min.js similarity index 100% rename from www/common/pdfjs/js/bootstrap.min.js rename to www/lib/pdfjs/js/bootstrap.min.js diff --git a/www/common/pdfjs/js/jquery-2.1.0.min.js b/www/lib/pdfjs/js/jquery-2.1.0.min.js similarity index 100% rename from www/common/pdfjs/js/jquery-2.1.0.min.js rename to www/lib/pdfjs/js/jquery-2.1.0.min.js diff --git a/www/common/pdfjs/web/images/findbarButton-next-rtl.png b/www/lib/pdfjs/web/images/findbarButton-next-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-next-rtl.png rename to www/lib/pdfjs/web/images/findbarButton-next-rtl.png diff --git a/www/common/pdfjs/web/images/findbarButton-next-rtl@2x.png b/www/lib/pdfjs/web/images/findbarButton-next-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-next-rtl@2x.png rename to www/lib/pdfjs/web/images/findbarButton-next-rtl@2x.png diff --git a/www/common/pdfjs/web/images/findbarButton-next.png b/www/lib/pdfjs/web/images/findbarButton-next.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-next.png rename to www/lib/pdfjs/web/images/findbarButton-next.png diff --git a/www/common/pdfjs/web/images/findbarButton-next@2x.png b/www/lib/pdfjs/web/images/findbarButton-next@2x.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-next@2x.png rename to www/lib/pdfjs/web/images/findbarButton-next@2x.png diff --git a/www/common/pdfjs/web/images/findbarButton-previous-rtl.png b/www/lib/pdfjs/web/images/findbarButton-previous-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-previous-rtl.png rename to www/lib/pdfjs/web/images/findbarButton-previous-rtl.png diff --git a/www/common/pdfjs/web/images/findbarButton-previous-rtl@2x.png b/www/lib/pdfjs/web/images/findbarButton-previous-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-previous-rtl@2x.png rename to www/lib/pdfjs/web/images/findbarButton-previous-rtl@2x.png diff --git a/www/common/pdfjs/web/images/findbarButton-previous.png b/www/lib/pdfjs/web/images/findbarButton-previous.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-previous.png rename to www/lib/pdfjs/web/images/findbarButton-previous.png diff --git a/www/common/pdfjs/web/images/findbarButton-previous@2x.png b/www/lib/pdfjs/web/images/findbarButton-previous@2x.png similarity index 100% rename from www/common/pdfjs/web/images/findbarButton-previous@2x.png rename to www/lib/pdfjs/web/images/findbarButton-previous@2x.png diff --git a/www/common/pdfjs/web/images/grab.cur b/www/lib/pdfjs/web/images/grab.cur similarity index 100% rename from www/common/pdfjs/web/images/grab.cur rename to www/lib/pdfjs/web/images/grab.cur diff --git a/www/common/pdfjs/web/images/grabbing.cur b/www/lib/pdfjs/web/images/grabbing.cur similarity index 100% rename from www/common/pdfjs/web/images/grabbing.cur rename to www/lib/pdfjs/web/images/grabbing.cur diff --git a/www/common/pdfjs/web/images/loading-icon.gif b/www/lib/pdfjs/web/images/loading-icon.gif similarity index 100% rename from www/common/pdfjs/web/images/loading-icon.gif rename to www/lib/pdfjs/web/images/loading-icon.gif diff --git a/www/common/pdfjs/web/images/loading-small.png b/www/lib/pdfjs/web/images/loading-small.png similarity index 100% rename from www/common/pdfjs/web/images/loading-small.png rename to www/lib/pdfjs/web/images/loading-small.png diff --git a/www/common/pdfjs/web/images/loading-small@2x.png b/www/lib/pdfjs/web/images/loading-small@2x.png similarity index 100% rename from www/common/pdfjs/web/images/loading-small@2x.png rename to www/lib/pdfjs/web/images/loading-small@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-documentProperties.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-documentProperties.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-documentProperties.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-documentProperties.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-documentProperties@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-firstPage.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-firstPage.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-firstPage.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-firstPage.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-handTool.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-handTool.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-handTool.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-handTool.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-handTool@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-lastPage.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-lastPage.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-lastPage.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-lastPage.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCcw.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCcw@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-rotateCw.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCw.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-rotateCw.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCw.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-rotateCw@2x.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-selectTool.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-selectTool.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-selectTool.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-selectTool.png diff --git a/www/common/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png b/www/lib/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png similarity index 100% rename from www/common/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png rename to www/lib/pdfjs/web/images/secondaryToolbarButton-selectTool@2x.png diff --git a/www/common/pdfjs/web/images/shadow.png b/www/lib/pdfjs/web/images/shadow.png similarity index 100% rename from www/common/pdfjs/web/images/shadow.png rename to www/lib/pdfjs/web/images/shadow.png diff --git a/www/common/pdfjs/web/images/texture.png b/www/lib/pdfjs/web/images/texture.png similarity index 100% rename from www/common/pdfjs/web/images/texture.png rename to www/lib/pdfjs/web/images/texture.png diff --git a/www/common/pdfjs/web/images/toolbarButton-bookmark.png b/www/lib/pdfjs/web/images/toolbarButton-bookmark.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-bookmark.png rename to www/lib/pdfjs/web/images/toolbarButton-bookmark.png diff --git a/www/common/pdfjs/web/images/toolbarButton-bookmark@2x.png b/www/lib/pdfjs/web/images/toolbarButton-bookmark@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-bookmark@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-bookmark@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-download.png b/www/lib/pdfjs/web/images/toolbarButton-download.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-download.png rename to www/lib/pdfjs/web/images/toolbarButton-download.png diff --git a/www/common/pdfjs/web/images/toolbarButton-download@2x.png b/www/lib/pdfjs/web/images/toolbarButton-download@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-download@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-download@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-menuArrows.png b/www/lib/pdfjs/web/images/toolbarButton-menuArrows.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-menuArrows.png rename to www/lib/pdfjs/web/images/toolbarButton-menuArrows.png diff --git a/www/common/pdfjs/web/images/toolbarButton-menuArrows@2x.png b/www/lib/pdfjs/web/images/toolbarButton-menuArrows@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-menuArrows@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-menuArrows@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-openFile.png b/www/lib/pdfjs/web/images/toolbarButton-openFile.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-openFile.png rename to www/lib/pdfjs/web/images/toolbarButton-openFile.png diff --git a/www/common/pdfjs/web/images/toolbarButton-openFile@2x.png b/www/lib/pdfjs/web/images/toolbarButton-openFile@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-openFile@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-openFile@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageDown-rtl.png b/www/lib/pdfjs/web/images/toolbarButton-pageDown-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageDown-rtl.png rename to www/lib/pdfjs/web/images/toolbarButton-pageDown-rtl.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png b/www/lib/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-pageDown-rtl@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageDown.png b/www/lib/pdfjs/web/images/toolbarButton-pageDown.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageDown.png rename to www/lib/pdfjs/web/images/toolbarButton-pageDown.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageDown@2x.png b/www/lib/pdfjs/web/images/toolbarButton-pageDown@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageDown@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-pageDown@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageUp-rtl.png b/www/lib/pdfjs/web/images/toolbarButton-pageUp-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageUp-rtl.png rename to www/lib/pdfjs/web/images/toolbarButton-pageUp-rtl.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png b/www/lib/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-pageUp-rtl@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageUp.png b/www/lib/pdfjs/web/images/toolbarButton-pageUp.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageUp.png rename to www/lib/pdfjs/web/images/toolbarButton-pageUp.png diff --git a/www/common/pdfjs/web/images/toolbarButton-pageUp@2x.png b/www/lib/pdfjs/web/images/toolbarButton-pageUp@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-pageUp@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-pageUp@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-presentationMode.png b/www/lib/pdfjs/web/images/toolbarButton-presentationMode.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-presentationMode.png rename to www/lib/pdfjs/web/images/toolbarButton-presentationMode.png diff --git a/www/common/pdfjs/web/images/toolbarButton-presentationMode@2x.png b/www/lib/pdfjs/web/images/toolbarButton-presentationMode@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-presentationMode@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-presentationMode@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-print.png b/www/lib/pdfjs/web/images/toolbarButton-print.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-print.png rename to www/lib/pdfjs/web/images/toolbarButton-print.png diff --git a/www/common/pdfjs/web/images/toolbarButton-print@2x.png b/www/lib/pdfjs/web/images/toolbarButton-print@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-print@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-print@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-search.png b/www/lib/pdfjs/web/images/toolbarButton-search.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-search.png rename to www/lib/pdfjs/web/images/toolbarButton-search.png diff --git a/www/common/pdfjs/web/images/toolbarButton-search@2x.png b/www/lib/pdfjs/web/images/toolbarButton-search@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-search@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-search@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png b/www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png rename to www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl.png diff --git a/www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png b/www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle-rtl@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png b/www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png rename to www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle.png diff --git a/www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png b/www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-secondaryToolbarToggle@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png b/www/lib/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png rename to www/lib/pdfjs/web/images/toolbarButton-sidebarToggle-rtl.png diff --git a/www/common/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png b/www/lib/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-sidebarToggle-rtl@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-sidebarToggle.png b/www/lib/pdfjs/web/images/toolbarButton-sidebarToggle.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-sidebarToggle.png rename to www/lib/pdfjs/web/images/toolbarButton-sidebarToggle.png diff --git a/www/common/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png b/www/lib/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-sidebarToggle@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewAttachments.png b/www/lib/pdfjs/web/images/toolbarButton-viewAttachments.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewAttachments.png rename to www/lib/pdfjs/web/images/toolbarButton-viewAttachments.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewAttachments@2x.png b/www/lib/pdfjs/web/images/toolbarButton-viewAttachments@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewAttachments@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-viewAttachments@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewOutline-rtl.png b/www/lib/pdfjs/web/images/toolbarButton-viewOutline-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewOutline-rtl.png rename to www/lib/pdfjs/web/images/toolbarButton-viewOutline-rtl.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png b/www/lib/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-viewOutline-rtl@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewOutline.png b/www/lib/pdfjs/web/images/toolbarButton-viewOutline.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewOutline.png rename to www/lib/pdfjs/web/images/toolbarButton-viewOutline.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewOutline@2x.png b/www/lib/pdfjs/web/images/toolbarButton-viewOutline@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewOutline@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-viewOutline@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewThumbnail.png b/www/lib/pdfjs/web/images/toolbarButton-viewThumbnail.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewThumbnail.png rename to www/lib/pdfjs/web/images/toolbarButton-viewThumbnail.png diff --git a/www/common/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png b/www/lib/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-viewThumbnail@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-zoomIn.png b/www/lib/pdfjs/web/images/toolbarButton-zoomIn.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-zoomIn.png rename to www/lib/pdfjs/web/images/toolbarButton-zoomIn.png diff --git a/www/common/pdfjs/web/images/toolbarButton-zoomIn@2x.png b/www/lib/pdfjs/web/images/toolbarButton-zoomIn@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-zoomIn@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-zoomIn@2x.png diff --git a/www/common/pdfjs/web/images/toolbarButton-zoomOut.png b/www/lib/pdfjs/web/images/toolbarButton-zoomOut.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-zoomOut.png rename to www/lib/pdfjs/web/images/toolbarButton-zoomOut.png diff --git a/www/common/pdfjs/web/images/toolbarButton-zoomOut@2x.png b/www/lib/pdfjs/web/images/toolbarButton-zoomOut@2x.png similarity index 100% rename from www/common/pdfjs/web/images/toolbarButton-zoomOut@2x.png rename to www/lib/pdfjs/web/images/toolbarButton-zoomOut@2x.png diff --git a/www/common/pdfjs/web/images/treeitem-collapsed-rtl.png b/www/lib/pdfjs/web/images/treeitem-collapsed-rtl.png similarity index 100% rename from www/common/pdfjs/web/images/treeitem-collapsed-rtl.png rename to www/lib/pdfjs/web/images/treeitem-collapsed-rtl.png diff --git a/www/common/pdfjs/web/images/treeitem-collapsed-rtl@2x.png b/www/lib/pdfjs/web/images/treeitem-collapsed-rtl@2x.png similarity index 100% rename from www/common/pdfjs/web/images/treeitem-collapsed-rtl@2x.png rename to www/lib/pdfjs/web/images/treeitem-collapsed-rtl@2x.png diff --git a/www/common/pdfjs/web/images/treeitem-collapsed.png b/www/lib/pdfjs/web/images/treeitem-collapsed.png similarity index 100% rename from www/common/pdfjs/web/images/treeitem-collapsed.png rename to www/lib/pdfjs/web/images/treeitem-collapsed.png diff --git a/www/common/pdfjs/web/images/treeitem-collapsed@2x.png b/www/lib/pdfjs/web/images/treeitem-collapsed@2x.png similarity index 100% rename from www/common/pdfjs/web/images/treeitem-collapsed@2x.png rename to www/lib/pdfjs/web/images/treeitem-collapsed@2x.png diff --git a/www/common/pdfjs/web/images/treeitem-expanded.png b/www/lib/pdfjs/web/images/treeitem-expanded.png similarity index 100% rename from www/common/pdfjs/web/images/treeitem-expanded.png rename to www/lib/pdfjs/web/images/treeitem-expanded.png diff --git a/www/common/pdfjs/web/images/treeitem-expanded@2x.png b/www/lib/pdfjs/web/images/treeitem-expanded@2x.png similarity index 100% rename from www/common/pdfjs/web/images/treeitem-expanded@2x.png rename to www/lib/pdfjs/web/images/treeitem-expanded@2x.png diff --git a/www/common/pdfjs/web/locale/fr/viewer.properties b/www/lib/pdfjs/web/locale/fr/viewer.properties similarity index 100% rename from www/common/pdfjs/web/locale/fr/viewer.properties rename to www/lib/pdfjs/web/locale/fr/viewer.properties diff --git a/www/common/pdfjs/web/locale/locale.properties b/www/lib/pdfjs/web/locale/locale.properties similarity index 100% rename from www/common/pdfjs/web/locale/locale.properties rename to www/lib/pdfjs/web/locale/locale.properties diff --git a/www/common/pdfjs/web/viewer.css b/www/lib/pdfjs/web/viewer.css similarity index 100% rename from www/common/pdfjs/web/viewer.css rename to www/lib/pdfjs/web/viewer.css diff --git a/www/common/pdfjs/web/viewer.html b/www/lib/pdfjs/web/viewer.html similarity index 100% rename from www/common/pdfjs/web/viewer.html rename to www/lib/pdfjs/web/viewer.html diff --git a/www/common/pdfjs/web/viewer.js b/www/lib/pdfjs/web/viewer.js similarity index 100% rename from www/common/pdfjs/web/viewer.js rename to www/lib/pdfjs/web/viewer.js diff --git a/www/lib/textFit.min.js b/www/lib/textFit.min.js new file mode 100644 index 000000000..71f316404 --- /dev/null +++ b/www/lib/textFit.min.js @@ -0,0 +1 @@ +(function(root,factory){"use strict";if(typeof define==="function"&&define.amd){define([],factory)}else if(typeof exports==="object"){module.exports=factory()}else{root.textFit=factory()}})(typeof global==="object"?global:this,function(){"use strict";var defaultSettings={alignVert:false,alignHoriz:false,multiLine:false,detectMultiLine:true,minFontSize:6,maxFontSize:80,reProcess:true,widthOnly:false,alignVertWithFlexbox:false};return function textFit(els,options){if(!options)options={};var settings={};for(var key in defaultSettings){if(options.hasOwnProperty(key)){settings[key]=options[key]}else{settings[key]=defaultSettings[key]}}if(typeof els.toArray==="function"){els=els.toArray()}var elType=Object.prototype.toString.call(els);if(elType!=="[object Array]"&&elType!=="[object NodeList]"&&elType!=="[object HTMLCollection]"){els=[els]}for(var i=0;i=parseInt(window.getComputedStyle(innerSpan)["font-size"],10)*2){multiLine=true}if(!multiLine){el.style["white-space"]="nowrap"}low=settings.minFontSize;high=settings.maxFontSize;var size=low;while(low<=high){mid=high+low>>1;innerSpan.style.fontSize=mid+"px";var innerSpanBoundingClientRect=innerSpan.getBoundingClientRect();if(innerSpanBoundingClientRect.width<=originalWidth&&(settings.widthOnly||innerSpanBoundingClientRect.height<=originalHeight)){size=mid;low=mid+1}else{high=mid-1}}if(innerSpan.style.fontSize!=size+"px")innerSpan.style.fontSize=size+"px";if(settings.alignVert){addStyleSheet();var height=innerSpan.scrollHeight;if(window.getComputedStyle(el)["position"]==="static"){el.style["position"]="relative"}if(!hasClass(innerSpan,"textFitAlignVert")){innerSpan.className=innerSpan.className+" textFitAlignVert"}innerSpan.style["height"]=height+"px";if(settings.alignVertWithFlexbox&&!hasClass(el,"textFitAlignVertFlex")){el.className=el.className+" textFitAlignVertFlex"}}}function innerHeight(el){var style=window.getComputedStyle(el,null);return el.getBoundingClientRect().height-parseInt(style.getPropertyValue("padding-top"),10)-parseInt(style.getPropertyValue("padding-bottom"),10)}function innerWidth(el){var style=window.getComputedStyle(el,null);return el.getBoundingClientRect().width-parseInt(style.getPropertyValue("padding-left"),10)-parseInt(style.getPropertyValue("padding-right"),10)}function isElement(o){return typeof HTMLElement==="object"?o instanceof HTMLElement:o&&typeof o==="object"&&o!==null&&o.nodeType===1&&typeof o.nodeName==="string"}function hasClass(element,cls){return(" "+element.className+" ").indexOf(" "+cls+" ")>-1}function addStyleSheet(){if(document.getElementById("textFitStyleSheet"))return;var style=[".textFitAlignVert{","position: absolute;","top: 0; right: 0; bottom: 0; left: 0;","margin: auto;","display: flex;","justify-content: center;","flex-direction: column;","}",".textFitAlignVertFlex{","display: flex;","}",".textFitAlignVertFlex .textFitAlignVert{","position: static;","}"].join("");var css=document.createElement("style");css.type="text/css";css.id="textFitStyleSheet";css.innerHTML=style;document.body.appendChild(css)}}); diff --git a/www/common/tippy/tippy.css b/www/lib/tippy/tippy.css similarity index 100% rename from www/common/tippy/tippy.css rename to www/lib/tippy/tippy.css diff --git a/www/common/tippy/tippy.min.js b/www/lib/tippy/tippy.min.js similarity index 100% rename from www/common/tippy/tippy.min.js rename to www/lib/tippy/tippy.min.js diff --git a/www/mediatag/main.js b/www/mediatag/main.js index d2f1691ae..40bf33ddc 100644 --- a/www/mediatag/main.js +++ b/www/mediatag/main.js @@ -6,7 +6,7 @@ require([ console.log(MediaTag); console.log($('media-tag')); if (typeof MediaTag === "function") { - MediaTag.PdfPlugin.viewer = '/common/pdfjs/web/viewer.html'; + MediaTag.PdfPlugin.viewer = '/lib/pdfjs/web/viewer.html'; var config = { allowed: ['download'], diff --git a/www/slide/inner.js b/www/slide/inner.js index e40bd6d79..9c9b9c70b 100644 --- a/www/slide/inner.js +++ b/www/slide/inner.js @@ -261,9 +261,10 @@ define([ $textarea.val(invalidStyle || slideOptionsTmp.styleLess || slideOptionsTmp.style); window.setTimeout(function () { $textarea.focus(); }, 0); - require(['/bower_components/less/dist/less.min.js'], function () { }); + var lessPath = '/lib/less.min.js'; + require([lessPath], function () { }); var parseLess = function (less, cb) { - require(['/bower_components/less/dist/less.min.js'], function (Less) { + require([lessPath], function (Less) { Less.render(less, {}, function(err, css) { if (err) { return void cb(err); } cb(undefined, css.css); diff --git a/www/worker/worker.js b/www/worker/worker.js index f1e0c8a0f..93539cede 100644 --- a/www/worker/worker.js +++ b/www/worker/worker.js @@ -16,8 +16,6 @@ require.config({ "jquery": "/bower_components/jquery/dist/jquery.min", // json.sortify same "json.sortify": "/bower_components/json.sortify/dist/JSON.sortify", - //"pdfjs-dist/build/pdf": "/bower_components/pdfjs-dist/build/pdf", - //"pdfjs-dist/build/pdf.worker": "/bower_components/pdfjs-dist/build/pdf.worker" cm: '/bower_components/codemirror' }, map: { From 384d4be8649099c0ed3355a7b29acc0cdeeacd91 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 11 Aug 2021 19:21:19 +0530 Subject: [PATCH 17/26] suppress browsers' password autocomplete for document passwords --- www/common/common-interface.js | 3 ++- www/settings/inner.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/common/common-interface.js b/www/common/common-interface.js index 588fdf5fa..71a1ed8af 100644 --- a/www/common/common-interface.js +++ b/www/common/common-interface.js @@ -867,7 +867,8 @@ define([ UI.passwordInput = function (opts, displayEye) { opts = opts || {}; var attributes = merge({ - type: 'password' + type: 'password', + autocomplete: 'new-password', // https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#values }, opts); var input = h('input.cp-password-input', attributes); diff --git a/www/settings/inner.js b/www/settings/inner.js index 798af282b..4dae9add6 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -579,7 +579,8 @@ define([ var form = h('div', [ UI.passwordInput({ id: 'cp-settings-change-password-current', - placeholder: Messages.settings_changePasswordCurrent + placeholder: Messages.settings_changePasswordCurrent, + autocomplete: 'current-password', }, true), h('br'), UI.passwordInput({ From 72bf3696ee45bca11e20a7b6ba167e77b9e3d9a6 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 11 Aug 2021 19:51:44 +0530 Subject: [PATCH 18/26] correct some unncessary instances of raw HTML injection --- www/common/drive-ui.js | 2 +- www/register/main.js | 8 ++++++-- www/settings/inner.js | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/www/common/drive-ui.js b/www/common/drive-ui.js index 15558cf18..cb70986a4 100644 --- a/www/common/drive-ui.js +++ b/www/common/drive-ui.js @@ -1733,7 +1733,7 @@ define([ removeSelected(); refresh(); }); - }, null, true); + }); }; diff --git a/www/register/main.js b/www/register/main.js index 4d9274253..87d9c0513 100644 --- a/www/register/main.js +++ b/www/register/main.js @@ -45,6 +45,7 @@ define([ var test; var I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = false; + var br = function () { return h('br'); }; var registerClick = function () { var uname = $uname.val().trim(); @@ -61,10 +62,13 @@ define([ if (Cred.isEmail(uname) && !I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME) { var emailWarning = [ Messages.register_emailWarning0, + br(), br(), Messages.register_emailWarning1, + br(), br(), Messages.register_emailWarning2, + br(), br(), Messages.register_emailWarning3, - ].join('

'); + ]; Feedback.send("EMAIL_USERNAME_WARNING", true); @@ -72,7 +76,7 @@ define([ if (!yes) { return; } I_REALLY_WANT_TO_USE_MY_EMAIL_FOR_MY_USERNAME = true; registerClick(); - }, {}, true); + }); } /* basic validation */ diff --git a/www/settings/inner.js b/www/settings/inner.js index 4dae9add6..79976f2b9 100644 --- a/www/settings/inner.js +++ b/www/settings/inner.js @@ -651,7 +651,7 @@ define([ done: function($dialog) { $dialog.find('> div').addClass('half'); }, - }, true); + }); }; $(form).find('button').click(function() { From afdfc273e889d3e1c0c82afab4bb2b757ac27509 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 11 Aug 2021 01:01:40 +0200 Subject: [PATCH 19/26] Translated using Weblate (Spanish) Currently translated at 43.5% (602 of 1382 strings) Translation: CryptPad/App Translate-URL: http://weblate.cryptpad.fr/projects/cryptpad/app/es/ --- www/common/translations/messages.es.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/translations/messages.es.json b/www/common/translations/messages.es.json index 34b53ef47..7be0f7c4b 100644 --- a/www/common/translations/messages.es.json +++ b/www/common/translations/messages.es.json @@ -13,7 +13,8 @@ "file": "Archivo", "media": "Media", "sheet": "Hoja de Cálculo", - "teams": "Equipos" + "teams": "Equipos", + "form": "Formulario" }, "disconnected": "Desconectado", "synchronizing": "Sincronizando", From 7e80b90bca4cd376b37eaa6299ee0123563f0c92 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 16:07:43 +0530 Subject: [PATCH 20/26] standardize usage of BR tag in translations --- scripts/find-html-translations.js | 2 -- www/common/translations/messages.ca.json | 2 +- www/common/translations/messages.de.json | 4 ++-- www/common/translations/messages.es.json | 2 +- www/common/translations/messages.fi.json | 4 ++-- www/common/translations/messages.fr.json | 4 ++-- www/common/translations/messages.it.json | 4 ++-- www/common/translations/messages.ja.json | 4 ++-- www/common/translations/messages.json | 4 ++-- www/common/translations/messages.lt.json | 2 +- www/common/translations/messages.nb.json | 2 +- www/common/translations/messages.nl.json | 2 +- www/common/translations/messages.pt-br.json | 4 ++-- www/common/translations/messages.ro.json | 2 +- www/common/translations/messages.ru.json | 2 +- www/common/translations/messages.sv.json | 2 +- 16 files changed, 22 insertions(+), 24 deletions(-) diff --git a/scripts/find-html-translations.js b/scripts/find-html-translations.js index fc1d4a18e..218342137 100644 --- a/scripts/find-html-translations.js +++ b/scripts/find-html-translations.js @@ -2,8 +2,6 @@ var EN = require("../www/common/translations/messages.json"); var simpleTags = [ '
', - '
', - '
', '', '', diff --git a/www/common/translations/messages.ca.json b/www/common/translations/messages.ca.json index a45919644..02c6092b5 100644 --- a/www/common/translations/messages.ca.json +++ b/www/common/translations/messages.ca.json @@ -418,7 +418,7 @@ "settings_deleteButton": "Suprimir el vostre compte", "settings_deleteModal": "Envieu la següent informació a qui administri el vostre CryptPad per tal que les vostres dades siguin esborrades del servidor.", "settings_deleted": "El vostre compte ha estat suprimit. Premeu D'acord per tornar a la pàgina inicial.", - "storageStatus": "Emmagatzematge:
{0} utilitzats de {1}", + "storageStatus": "Emmagatzematge:
{0} utilitzats de {1}", "settings_anonymous": "No heu iniciat la sessió. Els paràmetres només s'aplicaran al navegador actual.", "settings_publicSigningKey": "Clau pública de signatura", "settings_logoutEverywhereButton": "Tanca la sessió", diff --git a/www/common/translations/messages.de.json b/www/common/translations/messages.de.json index e02219011..0b5db20e7 100644 --- a/www/common/translations/messages.de.json +++ b/www/common/translations/messages.de.json @@ -677,7 +677,7 @@ "share_linkFriends": "Mit Kontakten teilen", "share_withFriends": "Teilen", "notifications_dismiss": "Verbergen", - "fm_info_sharedFolderHistory": "Dies ist nur der Verlauf deines geteilten Ordners: {0}
Dein CryptDrive bleibt beim Navigieren im Nur-Lesen-Modus.", + "fm_info_sharedFolderHistory": "Dies ist nur der Verlauf deines geteilten Ordners: {0}
Dein CryptDrive bleibt beim Navigieren im Nur-Lesen-Modus.", "fc_expandAll": "Alle ausklappen", "fc_collapseAll": "Alle einklappen", "fc_color": "Farbe ändern", @@ -822,7 +822,7 @@ "properties_passwordWarningFile": "Das Passwort wurde erfolgreich geändert. Allerdings konnten die Daten in deinem CryptDrive nicht aktualisiert werden. Möglicherweise musst du die alte Version der Datei manuell entfernen.", "properties_passwordSuccessFile": "Das Passwort wurde geändert.", "driveOfflineError": "Die Verbindung zu CryptPad ist verloren gegangen. Änderungen an diesem Pad werden nicht in deinem CryptDrive gespeichert. Bitte schließe alle CryptPad-Tabs und versuche es in einem neuen Fenster erneut. ", - "storageStatus": "Speicher:
{0} von {1} belegt", + "storageStatus": "Speicher:
{0} von {1} belegt", "teams_table": "Rollen", "teams_table_generic": "Rollen und Berechtigungen", "teams_table_generic_view": "Ansehen: Zugriff auf Ordner und Pads (nur Lesen)", diff --git a/www/common/translations/messages.es.json b/www/common/translations/messages.es.json index 7be0f7c4b..01e398ef2 100644 --- a/www/common/translations/messages.es.json +++ b/www/common/translations/messages.es.json @@ -564,7 +564,7 @@ "features_f_subscribe_note": "Se necesita una cuenta registrada para suscribirse", "four04_pageNotFound": "No pudimos encontrar la página que estabas buscando.", "help_genericMore": "Obtenga más información sobre cómo CryptPad puede funcionar para usted leyendo nuestras
Preguntas frecuentes ", - "storageStatus": "Almacenamiento:
{0} usado de {1}", + "storageStatus": "Almacenamiento:
{0} usado de {1}", "settings_cursorColorTitle": "Color de puntero", "mdToolbar_button": "Mostrar u ocultar la barra de herramientas de Markdown", "creation_404": "Este pad ya no existe. Utilice el siguiente formulario para crear un nuevo pad.", diff --git a/www/common/translations/messages.fi.json b/www/common/translations/messages.fi.json index 960853bc8..c25ae8cda 100644 --- a/www/common/translations/messages.fi.json +++ b/www/common/translations/messages.fi.json @@ -62,7 +62,7 @@ "language": "Kieli", "upgrade": "Päivitä", "upgradeAccount": "Päivitä tili", - "storageStatus": "Tallennustila:
{0} käytetty {1}", + "storageStatus": "Tallennustila:
{0} käytetty {1}", "MB": "Mt", "GB": "Gt", "KB": "Kt", @@ -863,7 +863,7 @@ "admin_supportInitHelp": "Palvelimellesi ei ole asetettu ylläpitopostilaatikkoa. Jos haluat ottaa käyttöön ylläpitopostilaatikon käyttäjiltä tulevia viestejä varten, pyydä palvelimen ylläpitäjää ajamaan skripti \"./scripts/generate-admin-keys.js\", laittamaan skriptin generoima julkinen avain \"config.js\"-tiedostoon ja lähettämään sinulle yksityinen avain.", "admin_cat_support": "Tuki", "supportPage": "Tuki", - "fm_info_sharedFolderHistory": "Tämä on jaetun kansiosi historia: {0}
CryptDrivesi pysyy vain luku-tilassa selatessasi sitä.", + "fm_info_sharedFolderHistory": "Tämä on jaetun kansiosi historia: {0}
CryptDrivesi pysyy vain luku-tilassa selatessasi sitä.", "notifications_dismiss": "Hylkää", "share_withFriends": "Jaa", "share_linkFriends": "Jaa yhteystietojen kanssa", diff --git a/www/common/translations/messages.fr.json b/www/common/translations/messages.fr.json index c7794e2d6..3cac83e9a 100644 --- a/www/common/translations/messages.fr.json +++ b/www/common/translations/messages.fr.json @@ -679,7 +679,7 @@ "share_linkFriends": "Partager avec des contacts", "share_withFriends": "Partager", "notifications_dismiss": "Cacher", - "fm_info_sharedFolderHistory": "Vous regardez l'historique de votre dossier partagé {0}
Votre CryptDrive restera en lecture seule pendant la navigation.", + "fm_info_sharedFolderHistory": "Vous regardez l'historique de votre dossier partagé {0}
Votre CryptDrive restera en lecture seule pendant la navigation.", "fc_color": "Changer la couleur", "supportPage": "Support", "admin_cat_support": "Support", @@ -819,7 +819,7 @@ "properties_passwordWarningFile": "Le mot de passe a été modifié avec succès mais nous n'avons pas réussi à mettre à jour votre CryptDrive avec les nouvelles informations. Vous devrez peut-être supprimer manuellement l'ancienne version de ce fichier.", "properties_passwordSuccessFile": "Le mot de passe a été modifié avec succès.", "driveOfflineError": "Votre connexion à CryptPad a été perdue. Les modifications dans ce pad ne seront pas stockées dans votre CryptDrive. Veuillez fermer tous vos onglets CryptPad et ré-essayer dans une nouvelle fenêtre. ", - "storageStatus": "Stockage :
{0} utilisés sur {1}", + "storageStatus": "Stockage :
{0} utilisés sur {1}", "teams_table": "Rôles", "teams_table_generic": "Rôles et permissions", "teams_table_generic_view": "Voir : accéder aux dossiers et pads (lecture seule).", diff --git a/www/common/translations/messages.it.json b/www/common/translations/messages.it.json index 5cade40ab..06e79f80a 100644 --- a/www/common/translations/messages.it.json +++ b/www/common/translations/messages.it.json @@ -397,7 +397,7 @@ "settings_deleteHint": "La cancellazione dell'account è permanente. Il tuo CryptDrive e il tuo elenco di pad saranno cancellati dal server. Il resto dei tuoi pad sarà eliminato in 90 giorni se nessun altro li ha salvati nel suo CryptDrive.", "settings_deleteButton": "Cancella il tuo account", "padNotPinnedVariable": "Questo pad scadrà dopo {4} giorni di inattività, {0}accedi{1} o {2}registrati{3} per conservarlo.", - "storageStatus": "Spazio:
{0} utilizzato su {1}", + "storageStatus": "Spazio:
{0} utilizzato su {1}", "uploadFolderButton": "Carica cartella", "fm_morePads": "Altro", "fc_color": "Cambia colore", @@ -910,7 +910,7 @@ "admin_flushCacheButton": "Svuota la cache", "admin_diskUsageHint": "Lo spazio di memoria disponibile è stato esaurito da varie risorse CryptPad", "profile_info": "Altri utenti possono trovare il tuo profilo tramite il tuo avatar nella lista degli utenti dei documenti.", - "fm_info_sharedFolderHistory": "questa è solo la cronologia delle tue cartelle condivise: {0}
Il tuo CryptDrive rimarrà in sola lettura durante la navigazione.", + "fm_info_sharedFolderHistory": "questa è solo la cronologia delle tue cartelle condivise: {0}
Il tuo CryptDrive rimarrà in sola lettura durante la navigazione.", "admin_supportInitHelp": "Il tuo server non è ancora configurato per avere una mailbox di supporto. Se vuoi una mailbox di supporto per ricevere messaggi dai tuoi utenti, chiedi all'amministratore del server di avviare lo script posizionato in \"./scripts/generate-admin-keys.js\", quindi salvare la chiave pubblica nel file \"config.js\" ed inviarti la chiave privata.", "admin_supportInitPrivate": "La tua installazione CryptPad è configurata per usare una mailbox di supporto ma il tuo account non ha la chiave privata corretta per accedervi. Usa il modulo che segue per aggiungere o aggiornare la chiave privata del tuo account.", "admin_supportInitHint": "Puoi configurare una mailbox di supporto per dare agli utenti del tuo CryptPad un modo per contattarti in maniera sicura se hanno problemi con i loro account.", diff --git a/www/common/translations/messages.ja.json b/www/common/translations/messages.ja.json index 96b678f22..55bb0b8c5 100644 --- a/www/common/translations/messages.ja.json +++ b/www/common/translations/messages.ja.json @@ -86,7 +86,7 @@ "settings_trimHistoryTitle": "履歴の削除", "trimHistory_success": "履歴を削除しました", "trimHistory_button": "履歴を削除", - "storageStatus": "ストレージ使用量:
{1} の内 {0}", + "storageStatus": "ストレージ使用量:
{1} の内 {0}", "formattedKB": "{0} KB", "formattedGB": "{0} GB", "formattedMB": "{0} MB", @@ -1149,7 +1149,7 @@ "support_disabledTitle": "サポートは有効になっていません", "admin_supportListHint": "ユーザーからサポートのメールボックスに送信されたチケットの一覧です。管理者はメッセージと回答を閲覧できます。終了したチケットは再開することができます。終了したチケットについては削除する(隠す)ことができますが、他の管理者には引き続き表示されます。", "drive_sfPassword": "共有フォルダ「 {0} 」は利用できません。オーナーにより削除されたか、新しいパスワードで保護されています。CryptDriveから削除するか、新しいパスワードを使ってアクセスを回復できます。", - "fm_info_sharedFolderHistory": "これは共有フォルダの履歴です: {0}
CryptDriveは閲覧モードを継続します。", + "fm_info_sharedFolderHistory": "これは共有フォルダの履歴です: {0}
CryptDriveは閲覧モードを継続します。", "notification_folderShared": "{0}があなたとフォルダを共有しました: {1}", "convertFolderToSF_SFChildren": "このフォルダは共有フォルダを含んでいるため、共有フォルダに変更できません。続けるには、このフォルダを共有フォルダの外に移動してください。", "sharedFolders_share": "このリンクを登録ユーザーと共有すると、共有フォルダへのアクセスが可能になります。相手がリンクを開くと、CryptDriveに共有フォルダが追加されます。", diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json index 3311e1768..ce2f0ab57 100644 --- a/www/common/translations/messages.json +++ b/www/common/translations/messages.json @@ -62,7 +62,7 @@ "language": "Language", "upgrade": "Upgrade", "upgradeAccount": "Upgrade account", - "storageStatus": "Storage:
{0} used out of {1}", + "storageStatus": "Storage:
{0} used out of {1}", "MB": "MB", "GB": "GB", "KB": "KB", @@ -701,7 +701,7 @@ "share_linkFriends": "Share with contacts", "share_withFriends": "Share", "notifications_dismiss": "Dismiss", - "fm_info_sharedFolderHistory": "This is only the history of your shared folder: {0}
Your CryptDrive will stay in read-only mode while you navigate.", + "fm_info_sharedFolderHistory": "This is only the history of your shared folder: {0}
Your CryptDrive will stay in read-only mode while you navigate.", "supportPage": "Support", "admin_cat_support": "Support", "admin_supportInitHelp": "Your server is not yet configured to have a support mailbox. If you want a support mailbox to receive messages from your users, you should ask your server administrator to run the script located in \"./scripts/generate-admin-keys.js\", then store the public key in the \"config.js\" file and send you the private key.", diff --git a/www/common/translations/messages.lt.json b/www/common/translations/messages.lt.json index 9d252e196..0041ac00e 100644 --- a/www/common/translations/messages.lt.json +++ b/www/common/translations/messages.lt.json @@ -46,7 +46,7 @@ "KB": "KB", "GB": "GB", "MB": "MB", - "storageStatus": "Saugykla:
{0} sunaudota iš {1} ", + "storageStatus": "Saugykla:
{0} sunaudota iš {1} ", "upgrade": "Atnaujinti", "upgradeAccount": "Atnaujinti paskyrą", "language": "Kalba", diff --git a/www/common/translations/messages.nb.json b/www/common/translations/messages.nb.json index d222f81d7..0503f867f 100644 --- a/www/common/translations/messages.nb.json +++ b/www/common/translations/messages.nb.json @@ -265,7 +265,7 @@ "formattedKB": "{0} KB", "formattedGB": "{0} GB", "formattedMB": "{0} MB", - "storageStatus": "Lagringsplass:
{0} brukt, av {1}", + "storageStatus": "Lagringsplass:
{0} brukt, av {1}", "padNotPinnedVariable": "Denne dokumentet utløper etter {4] dager med inaktivitet, {0}logg inn{1} eller {2}registrer deg{3} for å bevare det.", "history_restoreTitle": "Gjenopprett den valgte dokumentversjonen", "history_closeTitle": "Lukk historikken", diff --git a/www/common/translations/messages.nl.json b/www/common/translations/messages.nl.json index 393b91a05..abc163cd7 100644 --- a/www/common/translations/messages.nl.json +++ b/www/common/translations/messages.nl.json @@ -131,7 +131,7 @@ "KB": "KB", "GB": "GB", "MB": "MB", - "storageStatus": "Opslag:
{0} verbruikt van {1}", + "storageStatus": "Opslag:
{0} verbruikt van {1}", "upgradeAccount": "Account opwaarderen", "upgrade": "Opwaarderen", "language": "Taal", diff --git a/www/common/translations/messages.pt-br.json b/www/common/translations/messages.pt-br.json index 81237753d..a84f312bf 100644 --- a/www/common/translations/messages.pt-br.json +++ b/www/common/translations/messages.pt-br.json @@ -322,7 +322,7 @@ "oo_uploaded": "Seu envio foi completado. Clique OK para recarregar a página ou cancele para continuar no modo somente leitura.", "canvas_opacityLabel": "Opacidade: {0}", "canvas_widthLabel": "Largura: {0}", - "storageStatus": "Armazenamento:
{0} usados do total {1}", + "storageStatus": "Armazenamento:
{0} usados do total {1}", "upgradeAccount": "Atualizar conta", "padNotPinnedVariable": "Este pad vai expirar em {4} dias de inatividade, {0} faça login{1} ou {2}registre-se{3} para preserva-lo.", "settings_cursorColorTitle": "Cor do cursor", @@ -791,7 +791,7 @@ "admin_supportInitHelp": "Seu servidor ainda não está configurado para ter uma caixa de correio de suporte. Se você deseja que uma caixa de correio de suporte receba mensagens de seus usuários, peça ao administrador do servidor para executar o script localizado em \"./scripts/generate-admin-keys.js\" e, em seguida, armazene a chave pública em \"config.js \"arquivo e enviar a chave privada.", "admin_cat_support": "Suporte", "supportPage": "Suporte", - "fm_info_sharedFolderHistory": "Este é apenas o histórico da sua pasta compartilhada: {0}
Seu CryptDrive permanecerá no modo somente leitura enquanto você navega.", + "fm_info_sharedFolderHistory": "Este é apenas o histórico da sua pasta compartilhada: {0}
Seu CryptDrive permanecerá no modo somente leitura enquanto você navega.", "notifications_dismiss": "Recusar", "share_withFriends": "Compartilhar", "share_linkFriends": "Compartilhar com contatos", diff --git a/www/common/translations/messages.ro.json b/www/common/translations/messages.ro.json index 0c0fe1f0e..abd56ff20 100644 --- a/www/common/translations/messages.ro.json +++ b/www/common/translations/messages.ro.json @@ -443,7 +443,7 @@ "fc_color": "Schimbă culoarea", "fm_morePads": "Mai mult", "uploadFolderButton": "Încarcă dosar", - "storageStatus": "Capacitate de stocare:
{0} utilizat din {1}", + "storageStatus": "Capacitate de stocare:
{0} utilizat din {1}", "fc_collapseAll": "Restrânge", "settings_padSpellcheckLabel": "Activați verificarea ortografică", "settings_padSpellcheckHint": "Această opțiune vă permite să activați verificarea ortografică în editorul de text. Erorile de ortografie vor fi subliniate cu roșu și va trebui să țineți apăsată tasta Ctrl sau tasta Meta în timp ce faceți clic dreapta pentru a vedea opțiunile corecte.", diff --git a/www/common/translations/messages.ru.json b/www/common/translations/messages.ru.json index a46232761..56245dd92 100644 --- a/www/common/translations/messages.ru.json +++ b/www/common/translations/messages.ru.json @@ -442,7 +442,7 @@ "fc_openInCode": "Открыть в редакторе кода", "fm_morePads": "Ещё", "uploadFolderButton": "Загрузить папку", - "storageStatus": "Хранилище:
{0} использовано из {1}", + "storageStatus": "Хранилище:
{0} использовано из {1}", "padNotPinnedVariable": "Этот документ исчезнет через {4} дней неактивности, {0}войдите{1} или {2}зарегистируйтесь{3} чтобы сохранить его.", "creation_passwordValue": "Пароль", "creation_owners": "Владельцы", diff --git a/www/common/translations/messages.sv.json b/www/common/translations/messages.sv.json index 6b286912c..c2b18dcde 100644 --- a/www/common/translations/messages.sv.json +++ b/www/common/translations/messages.sv.json @@ -102,7 +102,7 @@ "KB": "KB", "GB": "GB", "MB": "MB", - "storageStatus": "Lagring:
{0} använd av {1}", + "storageStatus": "Lagring:
{0} använd av {1}", "upgradeAccount": "Uppgradera konto", "upgrade": "Uppgradera", "language": "Språk", From 7f41f8765ec3c072dc5cf332648afe756d292517 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:02:25 +0530 Subject: [PATCH 21/26] avoid bypassing guards against raw HTML in some dialogs --- www/common/common-ui-elements.js | 15 +++++++++++++++ www/common/inner/access.js | 4 ++-- www/drive/inner.js | 5 +++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index c0b052737..67f39f3ff 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -3703,6 +3703,21 @@ define([ return false; }; + UIElements.fixInlineBRs = function (htmlString) { + if (!htmlString && typeof(htmlString) === 'string') { return; } + var lines = htmlString.split('
'); + if (lines.length === 1) { return lines; } + var len = lines.length - 1; + var result = []; + for (var i = 0; i <= len; i++) { + result.push(lines[i]); + if (i < len) { + result.push(h('br')); + } + } + return result; + }; + UIElements.openSnapshotsModal = function (common, load, make, remove) { var modal; var readOnly = common.getMetadataMgr().getPrivateData().readOnly; diff --git a/www/common/inner/access.js b/www/common/inner/access.js index a1d2c37a1..3f281dc47 100644 --- a/www/common/inner/access.js +++ b/www/common/inner/access.js @@ -981,11 +981,11 @@ define([ common.gotoURL(_href); }, {force: true}); } - return void UI.alert(Messages.properties_passwordSuccess, function () { + return void UI.alert(UIElements.fixInlineBRs(Messages.properties_passwordSuccess), function () { if (!isSharedFolder) { common.gotoURL(_href); } - }, {force: true}); + }); }); }); }); diff --git a/www/drive/inner.js b/www/drive/inner.js index e8586e8e0..79c9974a4 100644 --- a/www/drive/inner.js +++ b/www/drive/inner.js @@ -279,10 +279,11 @@ define([ tippy: Messages.fm_burnThisDriveButton, drawer: false }, function () { - UI.confirm(Messages.fm_burnThisDrive, function (yes) { + var confirmContent = UIElements.fixInlineBRs(Messages.fm_burnThisDrive); + UI.confirm(confirmContent, function (yes) { if (!yes) { return; } common.getSframeChannel().event('EV_BURN_ANON_DRIVE'); - }, null, true); + }); }); } From 6413be24f362cc9e4cd9603679646a43e28d04bd Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:04:09 +0530 Subject: [PATCH 22/26] apply a click handler with vanilla js instead of jquery the jquery method only worked ~50% of the time in Firefox 90 for a completely unknown reason --- www/common/common-ui-elements.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 67f39f3ff..19a124180 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -919,10 +919,13 @@ define([ }, [ h('i.fa.' + icon), h('span.cp-toolbar-name'+drawerCls, data.text) - ])).click(common.prepareFeedback(data.name || 'DEFAULT')); - if (callback) { - button.click(callback); - } + ])); + var feedbackHandler = common.prepareFeedback(data.name || 'DEFAULT'); + button[0].addEventListener('click', function () { + feedbackHandler(); + if (typeof(callback) !== 'function') { return; } + callback(); + }); if (data.style) { button.attr('style', data.style); } if (data.id) { button.attr('id', data.id); } if (data.hiddenReadOnly) { button.addClass('cp-hidden-if-readonly'); } From 8d17ae64f3f2169ed9fa85d22b0b694f0231e468 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:08:18 +0530 Subject: [PATCH 23/26] log an error with a channel if we try to pin an invalid channel --- www/common/pinpad.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/common/pinpad.js b/www/common/pinpad.js index de93f066f..206bbbaee 100644 --- a/www/common/pinpad.js +++ b/www/common/pinpad.js @@ -134,6 +134,7 @@ var factory = function (Util, Rpc) { exp.removeOwnedChannel = function (channel, cb) { if (typeof(channel) !== 'string' || [32,48].indexOf(channel.length) === -1) { // can't use this on files because files can't be owned... + console.error('invalid channel to unpin', channel); return void cb('INVALID_ARGUMENTS'); } rpc.send('REMOVE_OWNED_CHANNEL', channel, function (e, response) { From 036248a6598684dda124c4ae935edb11c0bef665 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:14:30 +0530 Subject: [PATCH 24/26] handle warnings from history trim, not just errors --- www/common/inner/properties.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/www/common/inner/properties.js b/www/common/inner/properties.js index c946ed208..0c5a05959 100644 --- a/www/common/inner/properties.js +++ b/www/common/inner/properties.js @@ -170,7 +170,8 @@ define([ teamId: typeof(owned) === "number" && owned }, function (obj) { spinner.hide(); - if (obj && obj.error) { + if (obj && obj.error || obj.warning) { + console.error(obj.warning); $(size).append(h('div.alert.alert-danger', Messages.trimHistory_error)); return; } From e4879b5117bddad4eff86ac7dc7fee6346bc4a16 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:15:52 +0530 Subject: [PATCH 25/26] guard against possibly undefined team data in 'setPadMetadata' --- www/common/outer/async-store.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/www/common/outer/async-store.js b/www/common/outer/async-store.js index c4702727d..130926e6a 100644 --- a/www/common/outer/async-store.js +++ b/www/common/outer/async-store.js @@ -2159,6 +2159,8 @@ define([ if (!data.channel) { return void cb({ error: 'ENOTFOUND'}); } if (!data.command) { return void cb({ error: 'EINVAL' }); } var s = getStore(data.teamId); + if (!s) { return void cb({ error: 'ENOTFOUND' }); } + var otherChannels = data.channels; delete data.channels; s.rpc.setMetadata(data, function (err, res) { From 375bf7a62e51d8d48540e141046c57ed427f0694 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 12 Aug 2021 19:21:33 +0530 Subject: [PATCH 26/26] correct an inaccurate comment --- www/common/pinpad.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/www/common/pinpad.js b/www/common/pinpad.js index 206bbbaee..5ee02314c 100644 --- a/www/common/pinpad.js +++ b/www/common/pinpad.js @@ -133,8 +133,7 @@ var factory = function (Util, Rpc) { exp.removeOwnedChannel = function (channel, cb) { if (typeof(channel) !== 'string' || [32,48].indexOf(channel.length) === -1) { - // can't use this on files because files can't be owned... - console.error('invalid channel to unpin', channel); + console.error('invalid channel to remove', channel); return void cb('INVALID_ARGUMENTS'); } rpc.send('REMOVE_OWNED_CHANNEL', channel, function (e, response) {