Last active
October 22, 2020 22:32
-
-
Save yarkovaleksei/847f56669007c8eb6e0e1749191b8f6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Идем на страницу http://www.useragentstring.com/pages/useragentstring.php?name=All, открываем консоль и вставляем туда этот код. | |
// Потом жмем на ссылку DOWNLOAD USERAGENT LIST! и список скачан )) | |
function getAllUA(){ | |
let liArray = document.querySelectorAll("li>a[href*='?id=']"); | |
let uaList = []; | |
[].forEach.call(liArray, function(el){ | |
let ua = el.innerText; | |
uaList.push(ua); | |
}); | |
uaList = new Set(uaList); | |
let a = document.createElement("a"); | |
a.href = "data:text/octet-stream;base64," + window.btoa(JSON.stringify([...uaList], null, "\t")); | |
a.download = 'ua.json'; | |
a.textContent = 'DOWNLOAD USERAGENT LIST!'; | |
document.body.appendChild(a); | |
} | |
getAllUA(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment