Endless Danbooru Comments

By ttfn Last update Nov 28, 2008 — Installed 157 times.

Quick fix for comment search

in
Subscribe to Quick fix for comment search 1 post, 1 voice

Mango Scriptwright

This script activates for comment searches (http://danbooru.donmai.us/comment/search?) and pulls from the regular list instead.

Making the following rough additions seems to fix it (line before and after addition supplied for locating):
===================================
var pending = false;

if (/comment\/search/.test(window.location.href)) {
danbooruURL = window.location.href;//.replace(/&page=[0-9]+/,'');
danbooruQuery = '&page=';
}

var crlf = String.fromCharCode(10) + String.fromCharCode(13);
====================================
function findMainTable(doc) {
if (/comment\/search/.test(window.location.href)) return doc.getElementsByTagName("tbody")[0];
return doc.evaluate("//div[@id='comment-list']", doc, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
====================================
while ((child = source.childNodes[0])) {

if (child.className == "even" || child.className == "odd") {
document.getElementsByTagName("tbody")[0].appendChild(child);
continue;
}

if (child.className == "post") {
====================================

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel