Scripts:Animepage:Sourcecode3: Difference between revisions

Fix for recent site changes which broke decimal vote
No edit summary
(Fix for recent site changes which broke decimal vote)
 
(3 intermediate revisions by 3 users not shown)
Line 3: Line 3:
// - Replace vote-dropdowns with textfields (enter integers from 100 to 1000)
// - Replace vote-dropdowns with textfields (enter integers from 100 to 1000)
//
//
// Version 20051204.01
// 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 9: Line 9:
// 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==
// @name          AniDB-Site-Enhancer: Decimal Vote
// @name          AniDB-Site-Enhancer: Decimal Vote
// @namespace  lupin_sanseis_scripts
// @namespace  lupin_sanseis_scripts
// @description  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.net/perl-bin/animedb.pl?show=anime&*
// ==/UserScript==
// ==/UserScript==


Line 29: Line 32:
   function decimal_vote() {
   function decimal_vote() {
       // replace vote-dropdowns with textfields
       // replace vote-dropdowns with textfields
       var selects = document.evaluate("//select[../input[@name = 'votea.tmpratenow' or @name = 'votea.ratenow']]", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
       var selects = document.evaluate("//select[@name = 'votea.rate']", document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
       for (var i = 0; i < selects.snapshotLength; i++) {
       for (var i = 0; i < selects.snapshotLength; i++) {
         var textfield = document.createElement('input');
         var textfield = document.createElement('input');
3

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.