A
A
Alexander Litvinenko2016-02-15 04:53:28
JavaScript
Alexander Litvinenko, 2016-02-15 04:53:28

Widget Visibility Determination?

There is a widget that is integrated into the site, the styles of the widget are custom, i.e. the exact appearance is not known.
You can get a screenshot of the site, but it is clear that without knowing the appearance of the widget, you cannot find the widget on it.
How can you determine at what height from the top of the site, the widget is installed, having access only to the widget itself?
So far, I see the option to only send coordinates to the server from the widget itself with Ajax.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem Kustikov, 2016-02-25
@art1z

In general, no way. Any responsive and adaptive + possible zoom in the browser. Kill all calculations.
The ability to transfer through the current dimensions and offset through the server will not help either, the screenshot can open the page in that resolution, etc.
The most working option is to screw the mode controlled from GET parameters to the debug widget (? superwidget-debug=1), then create DIV[style="position: absolute; z-index: 9999; top: 0; background: # 0c0; height: 10px;"] and write all the necessary information in it with a large font. Then this text can be run through OCR and get the real parameters of the widget.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question