E621/926 API Parser

Images direct links ripper for pages with search results

Tính đến 10-03-2016. Xem phiên bản mới nhất.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

Bạn sẽ cần cài đặt một tiện ích mở rộng như Tampermonkey hoặc Violentmonkey để cài đặt kịch bản này.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(Tôi đã có Trình quản lý tập lệnh người dùng, hãy cài đặt nó!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name            E621/926 API Parser
// @description     Images direct links ripper for pages with search results
// @description:ru  Рипалка ссылок в результатах поиска, для менеджеров закачки
// @include         http*://e621.net/*
// @include         http*://e926.net/*
// @icon           http://www.faunaurbana.com.br/wp-content/uploads/2010/09/20100531083526E621Logo.png
// @grant           none
// @version 0.0.1.20160310094723
// @namespace https://greasyfork.org/users/7568
// ==/UserScript==

var skript = document.getElementById("blacklisted-images").innerHTML, // жабаем текст скрипта в конце страницы
    regulyarka = /\"file_url\":\"([^\"]+)\"/g, // с чем сравниваем
    poisk, // заранее готовим исполнитель поиска
    tekst = '', // текстуха для сборки итогов
    spanka = document.createElement('span'), // вставка
    mesto = document.getElementById("subnav"); // куда класть вставку
while ((poisk = regulyarka.exec(skript)) !== null) { // пока в скрипте есть годные строки
 if (window.location.href.indexOf('e926') !== -1) {poisk[1]='http:'+poisk[1];} // поправочка для e926.net - дописать протокол http: в ссылки
 tekst += '<a href="'+poisk[1]+'">Линк</a> '; // выдрать адреса из строк и соорудить ссылки
/* раскомментировать, если нужно видеть ссылки по одной на строку
 tekst += '<a href="'+poisk[1]+'">'+poisk[1]+'</a><br />'; // выдрать адреса из строк и соорудить ссылки
*/
}
spanka.innerHTML = tekst; // втыкнуть всё это во вставку
/* раскомментировать, если ссылки некрасиво торчат
spanka.style = 'display: none;' // скрытие
*/
mesto.appendChild(spanka); // спойлер прицепить в текст