Changeset 35962

Show
Ignore:
Timestamp:
11/22/09 00:58:06 (4 years ago)
Author:
fumokmm
Message:

v0.02 Recent Entriesにアクセスしたら、Favoritesにリダイレクトするようにした。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/javascript/userscripts/hatena/hatena_haiku_avoid_recent_entries.user.js

    r35956 r35962  
    66// @include        http://h.hatena.com/* 
    77// @author         fumokmm 
    8 // @date           2009-11-21 
    9 // @version        0.01 
     8// @date           2009-11-22 
     9// @version        0.02 
    1010// ==UserScript== 
    1111 
     
    1515        var username = xpath("//p[@class='username']/a", document) 
    1616        if (username) { 
    17                 // replace link 
     17                // Redirect to Favorites page, if requested recent entries 
     18                if (location.pathname.match(/^\/$/)) { 
     19                        location.href = username[0].href 
     20                        return 
     21                } 
     22 
     23                // Replace link 
    1824                var links = xpath("//a[@href='/']", document) 
    1925                links.forEach(function(link){ 
     
    2127                }) 
    2228 
    23                 // insert keywords and hotkeywords link as tab 
     29                // Insert keywords and hotkeywords link as tab 
    2430                if (!location.href.match(/^http:\/\/h.hatena.ne.jp\/(hot)?keywords/)) { 
    2531                        var keywords = document.createElement('li')