Всем Привет!
Вчера после обновления Google Chrome, появилась ошибка Uncaught ReferenceError: $ is not defined
Помогите исправить
function load() {
var t = $(".search-results__result-item")
, o = []
, n = "\r\n";
$.each(t, function(t, e) {
var i = sanitizeHtml($(this).children().find(".result-lockup__name").children("a").html())
, n = sanitizeHtml($(this).children().find(".result-lockup__highlight-keyword").children().closest("span").html())
, l = sanitizeHtml($(this).children().find(".result-lockup__position-company").children().closest("span").find("a").find("span").html())
, s = extractWebsite($(this))
, r = i.split(" ")[0]
, c = i.split(" ")[1];
o.push([l, "", r, c, n, s])
});
var l = "Company;;Firstname;Lastname;Title;Sitelink" + n;
o.forEach(function(t, e) {
var i = t.join(";");
l += i + n
});
var e = new Blob([l],{
type: "text/csv;charset=utf-8;"
})
, i = document.createElement("a");
if (void 0 !== i.download) {
var s = URL.createObjectURL(e);
i.setAttribute("href", s),
i.setAttribute("download", "list.csv"),
i.style.visibility = "hidden",
document.body.appendChild(i),
i.click(),
document.body.removeChild(i)
}
}
function extractWebsite(t) {
return "https://www.linkedin.com" + t.children().find(".result-lockup__position-company").children().closest("a").attr("href")
}
function sanitizeHtml(t) {
return t.trim().replace(/<(?:.|\n)*?>/gm, "").replace(/&/gm, "&")
}
window.scrollTo(0, document.body.scrollHeight),
setTimeout(load, 2e3);