Changeset 19600

Show
Ignore:
Timestamp:
09/19/08 16:26:22 (5 years ago)
Author:
drry
Message:
  • fixed @include and @exclude.
  • fixed regexes.
  • et cetera.
Location:
lang/javascript/userscripts/hatena
Files:
12 modified

Legend:

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

    r19564 r19600  
    33// @namespace      http://www.trashsuite.org/ 
    44// @include        http://h.hatena.ne.jp/* 
    5 // @version        1.0.0 
     5// @include        http://h.hatena.com/* 
     6// @version        1.0.1 
    67// ==/UserScript== 
    78(function(){ 
     
    1112  ) 
    1213  var html = header.snapshotItem(0).innerHTML 
    13   if (html.match('さんのエントリー')) { 
    14     var user_id = location.href.split('/')[3] 
     14  if (~html.indexOf('さんのエントリー')) { 
     15    var user_id = location.href.split('/', 5)[3] 
    1516    var link    = '<a href="http://d.hatena.ne.jp/' + user_id + '/"><img src="http://b.hatena.ne.jp/images/mysite.gif" /></a>' 
    16     header.snapshotItem(0).innerHTML = html.replace('さんのエントリー', 'さんのエントリー ' + link) 
     17    header.snapshotItem(0).innerHTML = html.replace('さんのエントリー', '$& ' + link) 
    1718  } 
    1819})() 
  • lang/javascript/userscripts/hatena/hatena_haiku_byebye_chinko_switch.user.js

    r19564 r19600  
    33// @namespace      http://www.trashsuite.org/ 
    44// @include        http://h.hatena.ne.jp/*/following* 
    5 // @version        0.0.1 
     5// @include        http://h.hatena.com/*/following* 
     6// @version        0.0.2 
    67// ==/UserScript== 
    78(function(){ 
  • lang/javascript/userscripts/hatena/hatena_haiku_following_force_updater.user.js

    r19564 r19600  
    33// @namespace      http://www.trashsuite.org/ 
    44// @include        http://h.hatena.ne.jp/*/following 
    5 // @version        1.0.0 
     5// @include        http://h.hatena.com/*/following 
     6// @version        1.0.1 
    67// ==/UserScript== 
    78 
    89(function(){ 
    910 
    10 // 認証には,はてな id とパスワード(投稿用アドレスの@より前)を入力して下さい 
     11// 認証には,はてな ID とパスワード(投稿用アドレスの@より前)を入力して下さい 
    1112// 投稿用アドレスは,http://h.hatena.ne.jp/settings で確認できます 
    1213 
    1314// ================================================================ // 
    14 //                 ここから下は編集しないで下さい                    // 
     15//                 ここから下は編集しないで下さい                   // 
    1516// ================================================================ // 
    1617 
     
    3132 
    3233  document.getElementById('update-trigger').addEventListener('click', function(){ 
    33     var id = location.href.split('/')[3] 
     34    var id = location.href.split('/', 5)[3] 
    3435    var post_uri   = 'http://h.hatena.ne.jp/api/statuses/update.json' 
    3536    var remove_uri = 'http://h.hatena.ne.jp/api/statuses/destroy/' 
     
    6061    }) 
    6162  }, true) 
    62    
     63 
    6364  GM_addStyle(<><![CDATA[ 
    6465    a#update-trigger { 
     
    7172      color: #FFF; 
    7273      background-color: #000; 
    73       display:none; 
     74      display: none; 
    7475    } 
    7576  ]]></>) 
    76    
     77 
    7778})() 
  • lang/javascript/userscripts/hatena/hatena_haiku_following_update_checker.user.js

    r19564 r19600  
    33// @namespace      http://diary.trashsuite.org/ 
    44// @include        http://h.hatena.ne.jp/*/following 
    5 // @version        1.2.1 
     5// @include        http://h.hatena.com/*/following 
     6// @version        1.2.2 
    67// ==/UserScript== 
    78 
     
    3940    if(newentry <= max_newentry_count) { 
    4041      GM_xmlhttpRequest({ 
    41         method : 'GET',  
    42         url    : location.href + '.body',  
     42        method : 'GET', 
     43        url    : location.href + '.body', 
    4344        onload : function(res){ 
    4445          var doc = document.createElement('div') 
     
    5960            var newentry_label = '' 
    6061            if(newentry >= max_newentry_count) { 
    61               newentry_label = max_newentry_count + '+'  
     62              newentry_label = max_newentry_count + '+' 
    6263            } else { 
    6364              newentry_label = newentry 
     
    7071      }) 
    7172    } 
    72   },10000) 
     73  }, 10000) 
    7374 
    7475  GM_addStyle(<><![CDATA[ 
     
    7980      color: #FFF; 
    8081      background-color: #000; 
    81       display:none; 
     82      display: none; 
    8283    } 
    8384  ]]></>) 
  • lang/javascript/userscripts/hatena/hatena_haiku_following_without_id.user.js

    r19564 r19600  
    77// @exclude        http://h.hatena.ne.jp/keywords* 
    88// @exclude        http://h.hatena.ne.jp/hotkeywords* 
    9 // @version        0.0.1 
     9// @include        http://h.hatena.com/* 
     10// @exclude        http://h.hatena.com/album* 
     11// @exclude        http://h.hatena.com/keywords* 
     12// @exclude        http://h.hatena.com/hotkeywords* 
     13// @version        0.0.2 
    1014// ==/UserScript== 
    1115(function(){ 
     
    2125  if(keywords.snapshotLength) { 
    2226    for(var n = 0; n < keywords.snapshotLength; n++) { 
    23       if(keywords.snapshotItem(n).match(/^id:[a-zA-Z0-9_]*$/)) { 
     27      if(/^id:[a-zA-Z][-\w]{1,30}[a-zA-Z\d]$/.test(keywords.snapshotItem(n))) { 
    2428        keywords.snapshotItem(n).style.display = 'none' 
    2529      } 
  • lang/javascript/userscripts/hatena/hatena_haiku_hidden_entries.user.js

    r19564 r19600  
    77// @exclude        http://h.hatena.ne.jp/keywords* 
    88// @exclude        http://h.hatena.ne.jp/hotkeywords* 
    9 // @version        0.1.0 
     9// @include        http://h.hatena.com/* 
     10// @exclude        http://h.hatena.com/album* 
     11// @exclude        http://h.hatena.com/keywords* 
     12// @exclude        http://h.hatena.com/hotkeywords* 
     13// @version        0.1.1 
    1014// ==/UserScript== 
    1115 
    12 // 'foo' の部分を,非表示にしたい id で置き換えてください 
    13 // 複数の id を非表示にしたい場合は,'foo bar' のように空白で id を区切って入力してください 
     16// 'foo' の部分を,非表示にしたい ID で置き換えてください 
     17// 複数の ID を非表示にしたい場合は,'foo bar' のように空白で ID を区切って入力してください 
    1418var invalid_users = 'foo' 
    1519 
     
    1923 
    2024// ================================================================ // 
    21 //                 ここから下は編集しないで下さい                    // 
     25//                 ここから下は編集しないで下さい                   // 
    2226// ================================================================ // 
    2327 
     
    3236function hidden_invalid_entries() { 
    3337  var entries = xpath(document, "//div[@class='entry']") 
    34    
     38 
    3539  for(var i=0; i < entries.snapshotLength; i++) { 
    3640    var entry = entries.snapshotItem(i) 
     
    5155      if(keyword.snapshotItem(0)) { 
    5256        // ID Keyword 
    53         if(keyword.snapshotItem(0).innerHTML.match(/^<img\s.*alt="([^"]+)"/)) { 
     57        if(/^<img(?:\s[^>]*?)?\salt="([^"]+)/.test(keyword.snapshotItem(0).innerHTML)) { 
    5458          keyword = 'id:' + RegExp.$1 
    5559        // Other Keyword 
     
    7074 
    7175hidden_invalid_entries() 
    72 unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', function(){ 
    73   hidden_invalid_entries() 
    74 }) 
     76unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', hidden_invalid_entries) 
  • lang/javascript/userscripts/hatena/hatena_haiku_hidden_users.user.js

    r19564 r19600  
    77// @exclude        http://h.hatena.ne.jp/keywords* 
    88// @exclude        http://h.hatena.ne.jp/hotkeywords* 
    9 // @version        0.0.2 
     9// @include        http://h.hatena.com/* 
     10// @exclude        http://h.hatena.com/album* 
     11// @exclude        http://h.hatena.com/keywords* 
     12// @exclude        http://h.hatena.com/hotkeywords* 
     13// @version        0.0.4 
    1014// ==/UserScript== 
    1115 
    12 // 'foo' の部分を,非表示にしたい id で置き換えてください 
    13 // 複数の id を非表示にしたい場合は、'foo bar' のように空白で id を区切って入力してください 
     16// 'foo' の部分を,非表示にしたい ID で置き換えてください 
     17// 複数の ID を非表示にしたい場合は、'foo bar' のように空白で ID を区切って入力してください 
    1418var invalid_users = 'foo' 
    1519 
     
    2630function hidden_invalid_users(users) { 
    2731  var entries = xpath(document, "//div[@class='entry']") 
    28    
     32 
    2933  for(var i=0; i < entries.snapshotLength; i++) 
    3034  { 
     
    3943} 
    4044 
    41 invalid_users = invalid_users.split(/ +/) 
     45invalid_users = invalid_users.split(/\s+/) 
    4246 
    4347hidden_invalid_users(invalid_users) 
  • lang/javascript/userscripts/hatena/hatena_haiku_id_bookmark.user.js

    r19564 r19600  
    33// @namespace      http://www.trashsuite.org/ 
    44// @include        http://h.hatena.ne.jp/* 
    5 // @version        1.0.1 
     5// @include        http://h.hatena.com/* 
     6// @version        1.0.2 
    67// ==/UserScript== 
    78 
    89(function(){ 
    910 
    10   // ブックマークしたい id をスペースで区切って入力して下さい 
     11  // ブックマークしたい ID をスペースで区切って入力して下さい 
    1112  var ids = 'trashsuite' 
    1213 
    1314// ================================================================ // 
    14 //                 ここから下は編集しないで下さい                    // 
     15//                 ここから下は編集しないで下さい                   // 
    1516// ================================================================ // 
    1617 
     
    2930  var bookmark  = document.createElement('div') 
    3031  bookmark.id   = 'bookmark' 
    31    
     32 
    3233  var bookmarks = document.createElement('ul') 
    3334  bookmarks.id   = 'bookmarks' 
     
    3637    var li = document.createElement('li') 
    3738    li.innerHTML = '<a href="/' + ids[i] + '/">' + 
    38                     '<img src="http://www.hatena.ne.jp/users/' + ids[i].substring(0,2) +'/' + ids[i] + '/profile_s.gif" />' + 
     39                    '<img src="http://www.hatena.ne.jp/users/' + ids[i].substring(0, 2) +'/' + ids[i] + '/profile_s.gif" />' + 
    3940                    '&nbsp;' + ids[i] + '</a>' 
    4041    bookmarks.appendChild(li) 
     
    6667    } 
    6768  ]]></>) 
    68    
     69 
    6970  document.getElementById('bookmark-trigger').addEventListener('click', function(){ 
    7071    if(bookmarks.style.display == '') { 
     
    7475    } 
    7576  }, true) 
    76    
     77 
    7778})() 
  • lang/javascript/userscripts/hatena/hatena_haiku_keyword_search_box.user.js

    r19564 r19600  
    77// @exclude        http://h.hatena.ne.jp/keywords* 
    88// @exclude        http://h.hatena.ne.jp/hotkeywords* 
    9 // @version        0.1.0 
     9// @include        http://h.hatena.com/* 
     10// @exclude        http://h.hatena.com/album* 
     11// @exclude        http://h.hatena.com/keywords* 
     12// @exclude        http://h.hatena.com/hotkeywords* 
     13// @version        0.1.1 
    1014// ==/UserScript== 
    1115(function(){ 
     
    1418    XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null 
    1519  ) 
    16   if (box_title.snapshotItem(1).innerHTML.match(/(Following|Related) Keywords/)) { 
     20  if (/(?:Following|Related) Keywords/.test(box_title.snapshotItem(1).innerHTML)) { 
    1721    var keywords = document.evaluate( 
    1822      "//ul[@class='list-keyword']", document, null, 
  • lang/javascript/userscripts/hatena/hatena_haiku_kill_googleafc.user.js

    r19564 r19600  
    99// @exclude        http://h.hatena.ne.jp/hotkeywords 
    1010// @exclude        http://h.hatena.ne.jp/keywords* 
    11 // @version        0.0.1 
     11// @include        http://h.hatena.com/* 
     12// @exclude        http://h.hatena.com/album 
     13// @exclude        http://h.hatena.com/settings 
     14// @exclude        http://h.hatena.com/help 
     15// @exclude        http://h.hatena.com/invite 
     16// @exclude        http://h.hatena.com/hotkeywords 
     17// @exclude        http://h.hatena.com/keywords* 
     18// @version        0.0.2 
    1219// ==/UserScript== 
    1320(function(){ 
  • lang/javascript/userscripts/hatena/hatena_haiku_reply_icon_repositioning.user.js

    r19564 r19600  
    66// @exclude        http://h.hatena.ne.jp/keywords* 
    77// @exclude        http://h.hatena.ne.jp/hotkeywords* 
    8 // @version        0.0.1 
     8// @include        http://h.hatena.com/* 
     9// @exclude        http://h.hatena.com/album* 
     10// @exclude        http://h.hatena.com/keywords* 
     11// @exclude        http://h.hatena.com/hotkeywords* 
     12// @version        0.0.2 
    913// ==/UserScript== 
    1014 
     
    3337 
    3438  repositioning_reply_icon() 
    35   unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', function(){repositioning_reply_icon()}) 
     39  unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', repositioning_reply_icon) 
    3640})() 
  • lang/javascript/userscripts/hatena/hatena_star_starfriend_counter.user.js

    r19564 r19600  
    44// @description    count of star friends 
    55// @include        http://s.hatena.ne.jp/* 
    6 // @version        0.0.1 
     6// @include        http://s.hatena.com/* 
     7// @version        0.0.2 
    78// ==/UserScript== 
    89(function(){