K
K
krlljs2014-05-15 20:04:18
JavaScript
krlljs, 2014-05-15 20:04:18

Is it possible to load the JS library I need through the web browser console?

I want to get a list of id persons from VKontakte with whom I have ever had a connection. To bookmark them all. I found a script that analyzes my personal messages and builds a table based on them. From the table I have a list of these same persons. There is only one thing left: load JQuery, and turn the list into an array.

Question: How can I load JQuery so that I can do the necessary manipulation for me?

372fef7c5fbc4ee294380bfd927d3c8b.png

Answer the question

In order to leave comments, you need to log in

4 answer(s)
K
krlljs, 2014-05-15
@krlljs

(function(d,s){s=d.createElement('script');s.src='https://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.js';(d.head||d.documentElement).appendChild(s)})(document);

A SCRIPT element is created, a property containing a link to the library is assigned to it, then it is added to the page using appendChild().
Suggested by user @gwer

V
Vladlen Grachev, 2014-05-15
@gwer

It 's too complicated .

E
elmander, 2014-05-16
@elmander

Are you going to use the jQuery to turn the list into an array? 10 thousand lines of code to do this?

S
sasha, 2014-05-15
@madmages

install any extension that uses jQuery and you will definitely have it in the console. it's very likely that you already have it. type $ in the console and give out a function, then you have it, if it says undefined, then put the extension

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question