S
S
Sergey Goryachev2016-06-18 01:21:51
JavaScript
Sergey Goryachev, 2016-06-18 01:21:51

How can I do this: the script refreshes the page if it sees the desired text, calls the phone or sends SMS?

How can I do this: the script refreshes the page if it sees the desired text, calls the phone or sends SMS?
This is someone else's page, I can't insert my phone number there to call href tel.
All this needs to be done through user scripts, such as Greasemonkey, Tampermonkey.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Nevedov, 2016-06-18
@webirus

I doubt something about Greasemonkey, but you can do, for example, in PHP through curl checking the page (if not too often, otherwise they will be banned), and sending SMS through the API of some service. I remember that there is some kind of service where you can add 1 phone for a developer for free (only send SMS to yourself).

S
svarnoi420, 2016-06-18
@inomdzhon92

Sounds trivial like
1. "refreshes the page if it sees the right text"

if ( (/someword/g).test(document.body.textContent) ) {
  window.location.reload();
}

2. "calls by phone or sends SMS" - you can also find the phone. You can put it in the tag <a>c href = "tel: 8999999999" and call a click on it or find some lib

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question