mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-04-07 14:04:30 +08:00
.
This commit is contained in:
@ -94,6 +94,9 @@ window.Asc = {
|
||||
}
|
||||
};
|
||||
|
||||
const pos = location.href.indexOf('store/index.html');
|
||||
const ioUrl = location.href.substring(0, pos);
|
||||
|
||||
// get translation file
|
||||
getTranslation();
|
||||
// fetch all plugins from config
|
||||
@ -269,7 +272,7 @@ window.addEventListener('message', function(message) {
|
||||
installed = findPlugin(false, message.guid);
|
||||
let bUpdate = false;
|
||||
if (installed) {
|
||||
if (plugin && installed.obj.baseUrl.includes('onlyoffice.github.io')) {
|
||||
if (plugin && installed.obj.baseUrl.includes(ioUrl)) {
|
||||
installedPlugins = installedPlugins.filter(function(el){return el.guid !== message.guid});
|
||||
bUpdate = true;
|
||||
} else {
|
||||
@ -280,6 +283,10 @@ window.addEventListener('message', function(message) {
|
||||
if (elements.btnMyPlugins.classList.contains('btn_toolbar_active')) {
|
||||
if (bUpdate) {
|
||||
showListofPlugins(false);
|
||||
catFiltred = installedPlugins;
|
||||
let searchVal = elements.inpSearch.value.trim();
|
||||
if (searchVal !== '')
|
||||
makeSearch(searchVal.toLowerCase());
|
||||
} else {
|
||||
let btn = this.document.getElementById(message.guid).lastChild.lastChild;
|
||||
btn.innerHTML = translate['Install'];
|
||||
@ -494,11 +501,9 @@ function getAllPluginsData() {
|
||||
isPluginLoading = true;
|
||||
let count = 0;
|
||||
let Unloaded = [];
|
||||
let pos = location.href.indexOf('store/index.html');
|
||||
let ioUrl = location.href.substring(0, pos) + 'sdkjs-plugins/content/';
|
||||
allPlugins.forEach(function(pluginUrl, i, arr) {
|
||||
count++;
|
||||
pluginUrl = (pluginUrl.indexOf(":/\/") == -1) ? ioUrl + pluginUrl + '/' : pluginUrl;
|
||||
pluginUrl = (pluginUrl.indexOf(":/\/") == -1) ? ioUrl + 'sdkjs-plugins/content/' + pluginUrl + '/' : pluginUrl;
|
||||
let confUrl = pluginUrl + 'config.json';
|
||||
makeRequest(confUrl).then(
|
||||
function(response) {
|
||||
@ -1050,8 +1055,6 @@ function showMarketplace() {
|
||||
// show main window to user
|
||||
if (!isPluginLoading && !isTranslationLoading && !isFrameLoading) {
|
||||
// filter installed plugins (delete removed, that are in store)
|
||||
let pos = location.href.indexOf('store/index.html');
|
||||
let ioUrl = location.href.substring(0, pos);
|
||||
installedPlugins = installedPlugins.filter(function(plugin) {
|
||||
return !( plugin.removed && plugin.obj.baseUrl.includes(ioUrl) );
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user