Skip to content

Instantly share code, notes, and snippets.

View makssof's full-sized avatar

Max Markov makssof

View GitHub Profile
@makssof
makssof / ArticlesParser.js
Last active February 22, 2019 15:16
Parse all VK articles | Спарсить вк все статьи на странице закладок
function findFirstChildByClass(element, className) {
var foundElement = null, found;
function recurse(element, className, found) {
for (var i = 0; i < element.childNodes.length && !found; i++) {
var el = element.childNodes[i];
var classes = el.className != undefined? el.className.split(" ") : [];
for (var j = 0, jl = classes.length; j < jl; j++) {
if (classes[j] == className) {
found = true;
foundElement = element.childNodes[i];