24
edits
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<pre> | <pre> | ||
// AniDB-Site-Enhancements | // AniDB-Site-Enhancements: Full | ||
// - Select all files of a group | // - Select all files of a group | ||
// - Replace vote-dropdowns with textfields (enter integers from 100 to 1000) | // - Replace vote-dropdowns with textfields (enter integers from 100 to 1000) | ||
// | // | ||
// Version | // Version 20051210.01 | ||
// works with FF1.5 and greasemonkey 0.6.4 | // works with FF1.5 and greasemonkey 0.6.4 | ||
// Copyright (c) 2005, Lupin III. | // Copyright (c) 2005, Lupin III. | ||
Line 10: | Line 10: | ||
// http://www.gnu.org/copyleft/gpl.html | // http://www.gnu.org/copyleft/gpl.html | ||
// | // | ||
// Thanks to | |||
// TechNiko for the webspace | |||
// visnu for some advice on speedups for long animelists | |||
// | // | ||
// ==UserScript== | // ==UserScript== | ||
Line 15: | Line 18: | ||
// @namespace lupin_sanseis_scripts | // @namespace lupin_sanseis_scripts | ||
// @description selects all files of a release group, replaces vote dropdowns with textfields | // @description selects all files of a release group, replaces vote dropdowns with textfields | ||
// @include http://anidb.info/perl-bin/animedb.pl?show=anime* | // @include http://anidb.info/perl-bin/animedb.pl?show=anime&* | ||
// ==/UserScript== | // ==/UserScript== | ||
Line 30: | Line 33: | ||
function group_selects () { | function group_selects () { | ||
// look up the grouplist table (using the bold "Group Info:" as an anchor, as it's fast to find) | |||
var group_table = document.evaluate("//b/text()[starts-with(.,'Group') and contains(., 'Info:')]/../../../..", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue; | |||
if (group_table == null){ | |||
return; | |||
} | |||
// search for trs of the group-list-table | // search for trs of the group-list-table | ||
var trs = document.evaluate("//tr | var trs = document.evaluate(".//tr", group_table, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); | ||
var regexp = /gid=(\d+)"/; | var regexp = /gid=(\d+)"/; |
edits