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
// ==UserScript== | |
// @name nCore - Thumbnail preview | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Adds cover image lext to list view | |
// @author You | |
// @match https://ncore.cc/torrents.php* | |
// @grant none | |
// ==/UserScript== |
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
function buildTree($flat, $pidKey, $idKey = null) { | |
$grouped = array(); | |
foreach ($flat as $sub) { | |
$sub->depth = 0; | |
$grouped[$sub->{$pidKey}][] = $sub; | |
} | |
$fnBuilder = function ($siblings, $depth) use (&$fnBuilder, $grouped, $idKey) { | |
foreach ($siblings as $k => $sibling) { | |
$id = $sibling->{$idKey}; |
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
$$('.apt-list__list .apt-list__item').map(parent => ({ | |
name: parent.querySelector('.apt-list__item-name').textContent, | |
address: parent.querySelector('.apt-list__item-address').textContent, | |
/*findMe: parent.querySelector('.apt-list__item-find-me').textContent,*/ | |
})) | |
.map(place => `<option value="${place.name}">${place.name} (${place.address})</option>`).join('\n') |
OlderNewer