From 4a10ca1e4c7caf55de550837cb59ec14236f61f9 Mon Sep 17 00:00:00 2001 From: AlexeyMatveev686 Date: Tue, 26 Sep 2023 16:06:50 +0300 Subject: [PATCH] Change how some plugins work in viewer. --- sdkjs-plugins/content/apertium/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/apertium/config.json | 2 +- .../content/apertium/scripts/apertium.js | 3 +++ sdkjs-plugins/content/chess/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/chess/config.json | 2 +- sdkjs-plugins/content/deepl/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/deepl/scripts/deepL.js | 3 +++ sdkjs-plugins/content/doc2md/CHANGELOG.md | 4 ++++ sdkjs-plugins/content/doc2md/config.json | 2 +- sdkjs-plugins/content/grammalecte/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/grammalecte/config.json | 2 +- .../content/grammalecte/scripts/gramma.js | 3 +++ sdkjs-plugins/content/jitsi/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/jitsi/config.json | 2 +- sdkjs-plugins/content/languagetool/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/languagetool/config.json | 2 +- .../content/languagetool/scripts/langTool.js | 3 +++ .../content/speechrecognition/CHANGELOG.md | 6 +++++- .../content/speechrecognition/config.json | 2 +- sdkjs-plugins/content/thesaurus/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/thesaurus/config.json | 2 +- .../content/thesaurus/scripts/synonim.js | 3 ++- sdkjs-plugins/content/translator/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/typograf/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/typograf/config.json | 2 +- sdkjs-plugins/content/youtube/CHANGELOG.md | 6 +++++- sdkjs-plugins/content/youtube/config.json | 2 +- store/plugin/CHANGELOG.md | 15 +++++++++++++++ 28 files changed, 98 insertions(+), 22 deletions(-) create mode 100644 store/plugin/CHANGELOG.md diff --git a/sdkjs-plugins/content/apertium/CHANGELOG.md b/sdkjs-plugins/content/apertium/CHANGELOG.md index 54d3dd9b..2fd98b7b 100644 --- a/sdkjs-plugins/content/apertium/CHANGELOG.md +++ b/sdkjs-plugins/content/apertium/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Hide "Insert to document" button for viewer. \ No newline at end of file diff --git a/sdkjs-plugins/content/apertium/config.json b/sdkjs-plugins/content/apertium/config.json index 2cdbafa6..5d174ec8 100644 --- a/sdkjs-plugins/content/apertium/config.json +++ b/sdkjs-plugins/content/apertium/config.json @@ -7,7 +7,7 @@ "de": "Apertium" }, "guid": "asc.{9b224050-2354-4c1b-822b-03a97f61c79d}", - "version": "1.0.0", + "version": "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/apertium/scripts/apertium.js b/sdkjs-plugins/content/apertium/scripts/apertium.js index a3541fed..decde6a0 100644 --- a/sdkjs-plugins/content/apertium/scripts/apertium.js +++ b/sdkjs-plugins/content/apertium/scripts/apertium.js @@ -73,6 +73,9 @@ function getMessage(key) { window.Asc.plugin.init = function(text) { + if (window.Asc.plugin.info.isViewMode) + document.getElementById("paste").classList.add('hidden'); + txt = text; updateScroll(); diff --git a/sdkjs-plugins/content/chess/CHANGELOG.md b/sdkjs-plugins/content/chess/CHANGELOG.md index 54d3dd9b..e643f696 100644 --- a/sdkjs-plugins/content/chess/CHANGELOG.md +++ b/sdkjs-plugins/content/chess/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Change working for viewer mode. \ No newline at end of file diff --git a/sdkjs-plugins/content/chess/config.json b/sdkjs-plugins/content/chess/config.json index 6866ade3..809902e4 100644 --- a/sdkjs-plugins/content/chess/config.json +++ b/sdkjs-plugins/content/chess/config.json @@ -7,7 +7,7 @@ "de": "Schach" }, "guid": "asc.{FFE1F462-1EA2-4391-990D-4CC84940B754}", - "version": "1.0.0", + "version": "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/deepl/CHANGELOG.md b/sdkjs-plugins/content/deepl/CHANGELOG.md index 54d3dd9b..2fd98b7b 100644 --- a/sdkjs-plugins/content/deepl/CHANGELOG.md +++ b/sdkjs-plugins/content/deepl/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Hide "Insert to document" button for viewer. \ No newline at end of file diff --git a/sdkjs-plugins/content/deepl/scripts/deepL.js b/sdkjs-plugins/content/deepl/scripts/deepL.js index 55912ffe..b120e894 100644 --- a/sdkjs-plugins/content/deepl/scripts/deepL.js +++ b/sdkjs-plugins/content/deepl/scripts/deepL.js @@ -71,6 +71,9 @@ function getMessage(key) { window.Asc.plugin.init = function(text) { + if (window.Asc.plugin.info.isViewMode) + document.getElementById("paste").classList.add('hidden'); + $('#select_example').select2({ minimumResultsForSearch: Infinity, }); diff --git a/sdkjs-plugins/content/doc2md/CHANGELOG.md b/sdkjs-plugins/content/doc2md/CHANGELOG.md index 680dd7f3..c999a9c4 100644 --- a/sdkjs-plugins/content/doc2md/CHANGELOG.md +++ b/sdkjs-plugins/content/doc2md/CHANGELOG.md @@ -9,3 +9,7 @@ * Fix some poblems with plugin. * Change resources from remoute to local. * Add preview window. + +## 1.0.2 + +* Fix problem with preview window in viewer mode. \ No newline at end of file diff --git a/sdkjs-plugins/content/doc2md/config.json b/sdkjs-plugins/content/doc2md/config.json index 7e4fb074..9696f790 100644 --- a/sdkjs-plugins/content/doc2md/config.json +++ b/sdkjs-plugins/content/doc2md/config.json @@ -7,7 +7,7 @@ "de": "Doc2md" }, "guid": "asc.{5aff455d-96c4-4bd8-9658-16e5bc143738}", - "version": "1.0.1", + "version": "1.0.2", "minVersion" : "7.4.0", "variations": [ { diff --git a/sdkjs-plugins/content/grammalecte/CHANGELOG.md b/sdkjs-plugins/content/grammalecte/CHANGELOG.md index 54d3dd9b..2fd98b7b 100644 --- a/sdkjs-plugins/content/grammalecte/CHANGELOG.md +++ b/sdkjs-plugins/content/grammalecte/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Hide "Insert to document" button for viewer. \ No newline at end of file diff --git a/sdkjs-plugins/content/grammalecte/config.json b/sdkjs-plugins/content/grammalecte/config.json index 0d35df23..ee6e250e 100644 --- a/sdkjs-plugins/content/grammalecte/config.json +++ b/sdkjs-plugins/content/grammalecte/config.json @@ -7,7 +7,7 @@ "de": "Grammalecte" }, "guid": "asc.{6ef67492-a111-4ca5-bd4f-bf02645afc61}", - "version": "1.0.0", + "version": "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/grammalecte/scripts/gramma.js b/sdkjs-plugins/content/grammalecte/scripts/gramma.js index 03bdb491..84090500 100644 --- a/sdkjs-plugins/content/grammalecte/scripts/gramma.js +++ b/sdkjs-plugins/content/grammalecte/scripts/gramma.js @@ -121,6 +121,9 @@ function checkInternetExplorer(){ }; window.Asc.plugin.init = function(text) { + if (window.Asc.plugin.info.isViewMode) + document.getElementById("replace").classList.add('hidden'); + if (!canAddText) { return; } diff --git a/sdkjs-plugins/content/jitsi/CHANGELOG.md b/sdkjs-plugins/content/jitsi/CHANGELOG.md index 7ec81fd2..902e2dea 100644 --- a/sdkjs-plugins/content/jitsi/CHANGELOG.md +++ b/sdkjs-plugins/content/jitsi/CHANGELOG.md @@ -6,4 +6,8 @@ ## 1.0.1 -* Add translations for Japan and Chine languages. \ No newline at end of file +* Add translations for Japan and Chine languages. + +## 1.0.2 + +* Enable plugin for viewer mode. \ No newline at end of file diff --git a/sdkjs-plugins/content/jitsi/config.json b/sdkjs-plugins/content/jitsi/config.json index 8c4578cf..b6a27289 100644 --- a/sdkjs-plugins/content/jitsi/config.json +++ b/sdkjs-plugins/content/jitsi/config.json @@ -7,7 +7,7 @@ "de": "Jitsi" }, "guid" : "asc.{7645D461-84BC-4FB0-A42C-98118C14A1CD}", - "version": "1.0.1", + "version": "1.0.2", "variations" : [ { diff --git a/sdkjs-plugins/content/languagetool/CHANGELOG.md b/sdkjs-plugins/content/languagetool/CHANGELOG.md index 54d3dd9b..2fd98b7b 100644 --- a/sdkjs-plugins/content/languagetool/CHANGELOG.md +++ b/sdkjs-plugins/content/languagetool/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Hide "Insert to document" button for viewer. \ No newline at end of file diff --git a/sdkjs-plugins/content/languagetool/config.json b/sdkjs-plugins/content/languagetool/config.json index 2fc29899..1d4eeb4a 100644 --- a/sdkjs-plugins/content/languagetool/config.json +++ b/sdkjs-plugins/content/languagetool/config.json @@ -7,7 +7,7 @@ "de": "LanguageTool" }, "guid": "asc.{7CDB02C9-A0BF-4B56-9A1A-71C860B8498F}", - "version": "1.0.0", + "version": "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/languagetool/scripts/langTool.js b/sdkjs-plugins/content/languagetool/scripts/langTool.js index 1dcc4a1c..a1c1f546 100644 --- a/sdkjs-plugins/content/languagetool/scripts/langTool.js +++ b/sdkjs-plugins/content/languagetool/scripts/langTool.js @@ -80,6 +80,9 @@ function checkInternetExplorer(){ }; window.Asc.plugin.init = function(text) { + if (window.Asc.plugin.info.isViewMode) + document.getElementById("replace").classList.add('hidden'); + if (!canAddText) { return; } diff --git a/sdkjs-plugins/content/speechrecognition/CHANGELOG.md b/sdkjs-plugins/content/speechrecognition/CHANGELOG.md index 54d3dd9b..94b9240e 100644 --- a/sdkjs-plugins/content/speechrecognition/CHANGELOG.md +++ b/sdkjs-plugins/content/speechrecognition/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Disable plugin for viewer. \ No newline at end of file diff --git a/sdkjs-plugins/content/speechrecognition/config.json b/sdkjs-plugins/content/speechrecognition/config.json index b84b9f25..8aff28e2 100644 --- a/sdkjs-plugins/content/speechrecognition/config.json +++ b/sdkjs-plugins/content/speechrecognition/config.json @@ -7,7 +7,7 @@ "de": "Spracheingabe" }, "guid": "asc.{F30BDD79-23A0-4B05-8DE3-2AB77D03A1B4}", - "version" : "1.0.0", + "version" : "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/thesaurus/CHANGELOG.md b/sdkjs-plugins/content/thesaurus/CHANGELOG.md index 54d3dd9b..e643f696 100644 --- a/sdkjs-plugins/content/thesaurus/CHANGELOG.md +++ b/sdkjs-plugins/content/thesaurus/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Change working for viewer mode. \ No newline at end of file diff --git a/sdkjs-plugins/content/thesaurus/config.json b/sdkjs-plugins/content/thesaurus/config.json index 7811b6ec..6fb3a550 100644 --- a/sdkjs-plugins/content/thesaurus/config.json +++ b/sdkjs-plugins/content/thesaurus/config.json @@ -7,7 +7,7 @@ "de": "Thesaurus" }, "guid": "asc.{BE5CBF95-C0AD-4842-B157-AC40FEDD9840}", - "version": "1.0.0", + "version": "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/thesaurus/scripts/synonim.js b/sdkjs-plugins/content/thesaurus/scripts/synonim.js index 72050441..d05c1e4d 100644 --- a/sdkjs-plugins/content/thesaurus/scripts/synonim.js +++ b/sdkjs-plugins/content/thesaurus/scripts/synonim.js @@ -44,7 +44,8 @@ }); //event click label $('body').on('click', '.label-words', function() { - window.Asc.plugin.executeMethod("PasteText", [$(this).text() +" "]); + if (!window.Asc.plugin.info.isViewMode) + window.Asc.plugin.executeMethod("PasteText", [$(this).text() +" "]); }); //event button click btn_search = document.getElementById("btn_search"); diff --git a/sdkjs-plugins/content/translator/CHANGELOG.md b/sdkjs-plugins/content/translator/CHANGELOG.md index f0c99dd2..30773793 100644 --- a/sdkjs-plugins/content/translator/CHANGELOG.md +++ b/sdkjs-plugins/content/translator/CHANGELOG.md @@ -14,4 +14,8 @@ ## 1.0.3 -* Fix problem with google services. \ No newline at end of file +* Fix problem with google services. + +## 1.0.4 + +* Change working for viewer mode. \ No newline at end of file diff --git a/sdkjs-plugins/content/typograf/CHANGELOG.md b/sdkjs-plugins/content/typograf/CHANGELOG.md index 54d3dd9b..94b9240e 100644 --- a/sdkjs-plugins/content/typograf/CHANGELOG.md +++ b/sdkjs-plugins/content/typograf/CHANGELOG.md @@ -2,4 +2,8 @@ ## 1.0.0 -* Initial release. \ No newline at end of file +* Initial release. + +## 1.0.1 + +* Disable plugin for viewer. \ No newline at end of file diff --git a/sdkjs-plugins/content/typograf/config.json b/sdkjs-plugins/content/typograf/config.json index 183b0402..1a71c33b 100644 --- a/sdkjs-plugins/content/typograf/config.json +++ b/sdkjs-plugins/content/typograf/config.json @@ -7,7 +7,7 @@ "de": "Typograf" }, "guid": "asc.{55159EC6-C91A-4DDB-8E1E-558454666461}", - "version": "1.0.0", + "version": "1.0.1", "variations": [ { diff --git a/sdkjs-plugins/content/youtube/CHANGELOG.md b/sdkjs-plugins/content/youtube/CHANGELOG.md index 8a3f4cd9..0dba0af4 100644 --- a/sdkjs-plugins/content/youtube/CHANGELOG.md +++ b/sdkjs-plugins/content/youtube/CHANGELOG.md @@ -10,4 +10,8 @@ ## 1.0.2 -* Othet improvements. \ No newline at end of file +* Othet improvements. + +## 1.0.3 + +* Change working for viewer mode. \ No newline at end of file diff --git a/sdkjs-plugins/content/youtube/config.json b/sdkjs-plugins/content/youtube/config.json index d7d63db4..1c185150 100644 --- a/sdkjs-plugins/content/youtube/config.json +++ b/sdkjs-plugins/content/youtube/config.json @@ -7,7 +7,7 @@ "de": "YouTube" }, "guid": "asc.{38E022EA-AD92-45FC-B22B-49DF39746DB4}", - "version": "1.0.2", + "version": "1.0.3", "variations": [ { diff --git a/store/plugin/CHANGELOG.md b/store/plugin/CHANGELOG.md new file mode 100644 index 00000000..e30d86d2 --- /dev/null +++ b/store/plugin/CHANGELOG.md @@ -0,0 +1,15 @@ +# Change Log + +## 1.0.0 + +* Initial release. + +## 1.0.1 + +* Add loader. +* Fix problem with internet checking. +* Fix problem for Windows XP. + +## 1.0.2 + +* Enable plugin for viewer mode. \ No newline at end of file