Changeset 19600
- Timestamp:
- 09/19/08 16:26:22 (5 years ago)
- Location:
- lang/javascript/userscripts/hatena
- Files:
-
- 12 modified
-
hatena_haiku_append_diary_link.user.js (modified) (2 diffs)
-
hatena_haiku_byebye_chinko_switch.user.js (modified) (1 diff)
-
hatena_haiku_following_force_updater.user.js (modified) (4 diffs)
-
hatena_haiku_following_update_checker.user.js (modified) (5 diffs)
-
hatena_haiku_following_without_id.user.js (modified) (2 diffs)
-
hatena_haiku_hidden_entries.user.js (modified) (5 diffs)
-
hatena_haiku_hidden_users.user.js (modified) (3 diffs)
-
hatena_haiku_id_bookmark.user.js (modified) (5 diffs)
-
hatena_haiku_keyword_search_box.user.js (modified) (2 diffs)
-
hatena_haiku_kill_googleafc.user.js (modified) (1 diff)
-
hatena_haiku_reply_icon_repositioning.user.js (modified) (2 diffs)
-
hatena_star_starfriend_counter.user.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/hatena/hatena_haiku_append_diary_link.user.js
r19564 r19600 3 3 // @namespace http://www.trashsuite.org/ 4 4 // @include http://h.hatena.ne.jp/* 5 // @version 1.0.0 5 // @include http://h.hatena.com/* 6 // @version 1.0.1 6 7 // ==/UserScript== 7 8 (function(){ … … 11 12 ) 12 13 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] 15 16 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) 17 18 } 18 19 })() -
lang/javascript/userscripts/hatena/hatena_haiku_byebye_chinko_switch.user.js
r19564 r19600 3 3 // @namespace http://www.trashsuite.org/ 4 4 // @include http://h.hatena.ne.jp/*/following* 5 // @version 0.0.1 5 // @include http://h.hatena.com/*/following* 6 // @version 0.0.2 6 7 // ==/UserScript== 7 8 (function(){ -
lang/javascript/userscripts/hatena/hatena_haiku_following_force_updater.user.js
r19564 r19600 3 3 // @namespace http://www.trashsuite.org/ 4 4 // @include http://h.hatena.ne.jp/*/following 5 // @version 1.0.0 5 // @include http://h.hatena.com/*/following 6 // @version 1.0.1 6 7 // ==/UserScript== 7 8 8 9 (function(){ 9 10 10 // 認証には,はてな idとパスワード(投稿用アドレスの@より前)を入力して下さい11 // 認証には,はてな ID とパスワード(投稿用アドレスの@より前)を入力して下さい 11 12 // 投稿用アドレスは,http://h.hatena.ne.jp/settings で確認できます 12 13 13 14 // ================================================================ // 14 // ここから下は編集しないで下さい //15 // ここから下は編集しないで下さい // 15 16 // ================================================================ // 16 17 … … 31 32 32 33 document.getElementById('update-trigger').addEventListener('click', function(){ 33 var id = location.href.split('/' )[3]34 var id = location.href.split('/', 5)[3] 34 35 var post_uri = 'http://h.hatena.ne.jp/api/statuses/update.json' 35 36 var remove_uri = 'http://h.hatena.ne.jp/api/statuses/destroy/' … … 60 61 }) 61 62 }, true) 62 63 63 64 GM_addStyle(<><![CDATA[ 64 65 a#update-trigger { … … 71 72 color: #FFF; 72 73 background-color: #000; 73 display: none;74 display: none; 74 75 } 75 76 ]]></>) 76 77 77 78 })() -
lang/javascript/userscripts/hatena/hatena_haiku_following_update_checker.user.js
r19564 r19600 3 3 // @namespace http://diary.trashsuite.org/ 4 4 // @include http://h.hatena.ne.jp/*/following 5 // @version 1.2.1 5 // @include http://h.hatena.com/*/following 6 // @version 1.2.2 6 7 // ==/UserScript== 7 8 … … 39 40 if(newentry <= max_newentry_count) { 40 41 GM_xmlhttpRequest({ 41 method : 'GET', 42 url : location.href + '.body', 42 method : 'GET', 43 url : location.href + '.body', 43 44 onload : function(res){ 44 45 var doc = document.createElement('div') … … 59 60 var newentry_label = '' 60 61 if(newentry >= max_newentry_count) { 61 newentry_label = max_newentry_count + '+' 62 newentry_label = max_newentry_count + '+' 62 63 } else { 63 64 newentry_label = newentry … … 70 71 }) 71 72 } 72 }, 10000)73 }, 10000) 73 74 74 75 GM_addStyle(<><![CDATA[ … … 79 80 color: #FFF; 80 81 background-color: #000; 81 display: none;82 display: none; 82 83 } 83 84 ]]></>) -
lang/javascript/userscripts/hatena/hatena_haiku_following_without_id.user.js
r19564 r19600 7 7 // @exclude http://h.hatena.ne.jp/keywords* 8 8 // @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 10 14 // ==/UserScript== 11 15 (function(){ … … 21 25 if(keywords.snapshotLength) { 22 26 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))) { 24 28 keywords.snapshotItem(n).style.display = 'none' 25 29 } -
lang/javascript/userscripts/hatena/hatena_haiku_hidden_entries.user.js
r19564 r19600 7 7 // @exclude http://h.hatena.ne.jp/keywords* 8 8 // @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 10 14 // ==/UserScript== 11 15 12 // 'foo' の部分を,非表示にしたい idで置き換えてください13 // 複数の id を非表示にしたい場合は,'foo bar' のように空白で idを区切って入力してください16 // 'foo' の部分を,非表示にしたい ID で置き換えてください 17 // 複数の ID を非表示にしたい場合は,'foo bar' のように空白で ID を区切って入力してください 14 18 var invalid_users = 'foo' 15 19 … … 19 23 20 24 // ================================================================ // 21 // ここから下は編集しないで下さい //25 // ここから下は編集しないで下さい // 22 26 // ================================================================ // 23 27 … … 32 36 function hidden_invalid_entries() { 33 37 var entries = xpath(document, "//div[@class='entry']") 34 38 35 39 for(var i=0; i < entries.snapshotLength; i++) { 36 40 var entry = entries.snapshotItem(i) … … 51 55 if(keyword.snapshotItem(0)) { 52 56 // ID Keyword 53 if( keyword.snapshotItem(0).innerHTML.match(/^<img\s.*alt="([^"]+)"/)) {57 if(/^<img(?:\s[^>]*?)?\salt="([^"]+)/.test(keyword.snapshotItem(0).innerHTML)) { 54 58 keyword = 'id:' + RegExp.$1 55 59 // Other Keyword … … 70 74 71 75 hidden_invalid_entries() 72 unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', function(){ 73 hidden_invalid_entries() 74 }) 76 unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', hidden_invalid_entries) -
lang/javascript/userscripts/hatena/hatena_haiku_hidden_users.user.js
r19564 r19600 7 7 // @exclude http://h.hatena.ne.jp/keywords* 8 8 // @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 10 14 // ==/UserScript== 11 15 12 // 'foo' の部分を,非表示にしたい idで置き換えてください13 // 複数の id を非表示にしたい場合は、'foo bar' のように空白で idを区切って入力してください16 // 'foo' の部分を,非表示にしたい ID で置き換えてください 17 // 複数の ID を非表示にしたい場合は、'foo bar' のように空白で ID を区切って入力してください 14 18 var invalid_users = 'foo' 15 19 … … 26 30 function hidden_invalid_users(users) { 27 31 var entries = xpath(document, "//div[@class='entry']") 28 32 29 33 for(var i=0; i < entries.snapshotLength; i++) 30 34 { … … 39 43 } 40 44 41 invalid_users = invalid_users.split(/ +/)45 invalid_users = invalid_users.split(/\s+/) 42 46 43 47 hidden_invalid_users(invalid_users) -
lang/javascript/userscripts/hatena/hatena_haiku_id_bookmark.user.js
r19564 r19600 3 3 // @namespace http://www.trashsuite.org/ 4 4 // @include http://h.hatena.ne.jp/* 5 // @version 1.0.1 5 // @include http://h.hatena.com/* 6 // @version 1.0.2 6 7 // ==/UserScript== 7 8 8 9 (function(){ 9 10 10 // ブックマークしたい idをスペースで区切って入力して下さい11 // ブックマークしたい ID をスペースで区切って入力して下さい 11 12 var ids = 'trashsuite' 12 13 13 14 // ================================================================ // 14 // ここから下は編集しないで下さい //15 // ここから下は編集しないで下さい // 15 16 // ================================================================ // 16 17 … … 29 30 var bookmark = document.createElement('div') 30 31 bookmark.id = 'bookmark' 31 32 32 33 var bookmarks = document.createElement('ul') 33 34 bookmarks.id = 'bookmarks' … … 36 37 var li = document.createElement('li') 37 38 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" />' + 39 40 ' ' + ids[i] + '</a>' 40 41 bookmarks.appendChild(li) … … 66 67 } 67 68 ]]></>) 68 69 69 70 document.getElementById('bookmark-trigger').addEventListener('click', function(){ 70 71 if(bookmarks.style.display == '') { … … 74 75 } 75 76 }, true) 76 77 77 78 })() -
lang/javascript/userscripts/hatena/hatena_haiku_keyword_search_box.user.js
r19564 r19600 7 7 // @exclude http://h.hatena.ne.jp/keywords* 8 8 // @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 10 14 // ==/UserScript== 11 15 (function(){ … … 14 18 XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null 15 19 ) 16 if ( box_title.snapshotItem(1).innerHTML.match(/(Following|Related) Keywords/)) {20 if (/(?:Following|Related) Keywords/.test(box_title.snapshotItem(1).innerHTML)) { 17 21 var keywords = document.evaluate( 18 22 "//ul[@class='list-keyword']", document, null, -
lang/javascript/userscripts/hatena/hatena_haiku_kill_googleafc.user.js
r19564 r19600 9 9 // @exclude http://h.hatena.ne.jp/hotkeywords 10 10 // @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 12 19 // ==/UserScript== 13 20 (function(){ -
lang/javascript/userscripts/hatena/hatena_haiku_reply_icon_repositioning.user.js
r19564 r19600 6 6 // @exclude http://h.hatena.ne.jp/keywords* 7 7 // @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 9 13 // ==/UserScript== 10 14 … … 33 37 34 38 repositioning_reply_icon() 35 unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', function(){repositioning_reply_icon()})39 unsafeWindow.Hatena.Haiku.Pager.addEventListener('loadedEntries', repositioning_reply_icon) 36 40 })() -
lang/javascript/userscripts/hatena/hatena_star_starfriend_counter.user.js
r19564 r19600 4 4 // @description count of star friends 5 5 // @include http://s.hatena.ne.jp/* 6 // @version 0.0.1 6 // @include http://s.hatena.com/* 7 // @version 0.0.2 7 8 // ==/UserScript== 8 9 (function(){
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)