V
V
vladislavik952018-02-08 14:59:46
JavaScript
vladislavik95, 2018-02-08 14:59:46

How to understand how the extension works?

I want to create a coupon extension for the browser. But there are many questions, since there are few such extensions. And there is practically no information about their creation. So, there is a similar extension. The principle of its work is that when you make online purchases, go to the payment page, a popup window of this extension appears, which offers to use the coupon. That is, whenever you go to the payment page in any online store, this window appears. Here the first question arises - how do they determine what exactly this is the payment page and what the coupon needs to be shown to the person ???

5a7c3951a9008180718120.png

Then I click on the button to use the coupon, another window appears in the center, which starts looking for coupons. There are several coupons. And here the second question arises ---- how does the extension determine which coupon to give you ??? That is, it automatically inserts into the coupon field. But most likely I understood what the principle is here --- the extension starts inserting each coupon into the coupon field and inserts the one that gives the greatest benefit.
5a7c3baf2432b822052599.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alex, 2018-02-08
@streetflush

You can read how to make extensions in Google.
THAT it works in "any online store" I doubt very much.
And so the usual DOM manipulator that substitutes codes from a known code base in a field found by Id or class.

V
VVVVVV dad, 2018-08-10
@Vadyanga

It's a secret, don't tell anyone
Заходишь по пути:
C:\Users\Yes\AppData\Local\Google\Chrome Beta\User Data\Default\Extensions
..лежит исходный код в папке, которую через ид ищешь :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question