E621/926 API Parser

Images direct links ripper for pages with search results

Versione datata 10/03/2016. Vedi la nuova versione l'ultima versione.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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); // спойлер прицепить в текст