Execute javascript code on website

  • Автор темы Автор темы qlwik
  • Дата начала Дата начала

qlwik

Client
Регистрация
03.04.2013
Сообщения
208
Реакции
5
Баллы
18
Hi,
I want to execute javascript code on https://example.com website, I know I can simply enter this website in ZP web browser, but I want to run in on many websites and I need it to be fast, so question is:
Can I run javascript code on custom website with javascript or C block in ZP?
 
So nobody on entire forum doesn't know how to do it?
 
you have action step called "javascript" and there you can add javascript functions, for example, this my code take number of characters from variable uvodjava and back me number

681bf4008ba8b85398d70044c8bfddba.png


and you can see on top, you can change locally to current page, and make action connected with current page in browser.
 
Thank You for tip, I know about it, as mentioned on first topic, I don't want to load website in to browser, because it is too slow and I will use it on many websites.
 
So nobody on entire forum doesn't know how to do it?

Hi, your question is really not easy answerable.
First of all You do not load webpages with javascript. You can look in GET/POST request way for that.
Second of all you need page-load or at least some data to input in javascript functions. Sometimes it is very complex to find what exactly you need.
You need pretty good programming knowledge to work from there in general, it is not like simple one-sentence answer, that's why there is not much answers :)
 
Thank You for answer, I know I have to load website first and I want to do it with get, then I search javascript code with regex, how can I execute that code on that website?
 
Thank You for answer, I know I have to load website first and I want to do it with get, then I search javascript code with regex, how can I execute that code on that website?

Javascript can do many different things mate.
You look what javascript does and You replicate that.
So for example, if javascript sends some requests then You have to make same request with your own GET/POST, if javascript does something other You have to replicate that as well, it all depends.
 
Okay lets say I want to execute analitics code, how can I do that?
 
Google analytics is statisctisc for websites, it show any pagewievs on website, I want to simulate that pageview, its code looks like this:
JavaScript:
Развернуть Свернуть Копировать
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
            ga('create', 'UA-152788937-1', 'auto');
            ga('send', 'pageview');
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)