Changeset 20905

Show
Ignore:
Timestamp:
10/07/08 18:52:26 (3 months ago)
Author:
kotas
Message:

Supports new style menu bar.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/niconicomylistanywhere.user.js

    r20626 r20905  
    3030        if (uri && document.evaluate) { 
    3131                var h = document.evaluate( 
    32                         "id('PAGEHEADER')//a[contains(@href, 'logout')]/..", 
     32                        "id('PAGEHEADER')//td/a[contains(@href, 'my')]/../..", 
    3333                        document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null 
    3434                        ).singleNodeValue; 
     
    3737                        a.href = uri; 
    3838                        a.title = title; 
    39                         a.style.color = "#FFF"; 
    4039                        a.innerHTML = title.length > 20 ? (title.substr(0, 20) + "...") : title; 
    41                         h.insertBefore(document.createTextNode(" | "), h.firstChild); 
    42                         h.insertBefore(a, h.firstChild); 
     40                        var td = document.createElement("td"); 
     41                        td.appendChild(a); 
     42                        h.insertBefore(td, h.firstChild); 
    4343                } 
    4444        }