Window.top.document

Hello!
I’m new to the plugins and JS. I’m trying to understand, whether or not I can make a plugin button for all editors (cell, word and slide), which only appears if the version in window.top.document (I guess it’s this element) has specific text. Like class=“ver-version hidden” Onlyoffice version 8.3.3.21.

It’s just an example. For some reason I can’t get this text about version via macro or plugin. But still there is a plugin that can hide the update button via window.top.document.

Does anybody know, whether it’s possible? To get this text via macro and/or plugin which is inside the documents.

Hello @Diana
The entire scenario is a little bit unclear to me. However, there’s such method (not a plugin method) to check DS version version | ONLYOFFICE
Will it be suitable in your case?

Hi!
My current version is 8.3.3.21.

What I’m trying to do is the following: I found a plugin that uses method window.top.document to hide “Connect to cloud” option and “Update” button in the main menu of the app. And basically it allows you to do anything you want with any section there. Like “About” section and others.

So, I wonder, if I create a plugin, that works in cell, word and slide, can I via the same plugin change anything in main menu? Or it all depends on the config.json file and I need to create another plugin to change something in the main menu?

Hello,
You can try using this method to check version: GetVersion | ONLYOFFICE and trigger necessary actions on your side.