Scripts:Animepage:Sourcecode1: Difference between revisions

Jump to navigation Jump to search
Fix for recent site changes which broke decimal vote
No edit summary
(Fix for recent site changes which broke decimal vote)
 
(2 intermediate revisions by 2 users not shown)
Line 36: Line 36:
       // look up the grouplist table (using the bold "Group Info:" as an anchor, as it's fast to find)
       // 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;
       var group_table = document.evaluate("//b/text()[starts-with(.,'Group') and contains(., 'Info:')]/../../../..", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
 
      // when css convert of page happens //
      var group_table = document.evaluate("//div[class="anime_group"]/table", document, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;
      // will want checking though... //
       if (group_table == null){
       if (group_table == null){
         return;
         return;
Line 119: Line 121:
   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

Navigation menu

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