Changeset 5440
- Timestamp:
- 01/25/08 00:04:04 (5 years ago)
- Location:
- lang/javascript/userscripts
- Files:
-
- 2 modified
-
autopagerizehatenastar.user.js (modified) (1 prop)
-
hatebuclippingsiteremover.user.js (modified) (3 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/autopagerizehatenastar.user.js
- Property svn:executable deleted
-
lang/javascript/userscripts/hatebuclippingsiteremover.user.js
- Property svn:mime-type deleted
r438 r5440 4 4 // @description remove to clipping site 5 5 // @include http://b.hatena.ne.jp/entry/* 6 // @version 1.0.06 // @version 1.0.0 7 7 // ==/UserScript== 8 8 (function(){ 9 9 var CLIPPINGSITELIST = [ 10 'http://d.hatena.ne.jp/ringod/',11 'http://d.hatena.ne.jp/johzan/',12 'http://d.hatena.ne.jp/chips2004/',13 'http://d.hatena.ne.jp/gorilla-boots/',14 'http://d.hatena.ne.jp/hsada/',15 'http://d.hatena.ne.jp/f-star/',16 'http://d.hatena.ne.jp/fashi2/',17 'http://d.hatena.ne.jp/hengsu/'10 'http://d.hatena.ne.jp/ringod/', 11 'http://d.hatena.ne.jp/johzan/', 12 'http://d.hatena.ne.jp/chips2004/', 13 'http://d.hatena.ne.jp/gorilla-boots/', 14 'http://d.hatena.ne.jp/hsada/', 15 'http://d.hatena.ne.jp/f-star/', 16 'http://d.hatena.ne.jp/fashi2/', 17 'http://d.hatena.ne.jp/hengsu/' 18 18 ]; 19 19 … … 21 21 var node = node || document; 22 22 var results = document.evaluate(xpath, node, null, 23 XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);23 XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); 24 24 var nodes = []; 25 25 var len = results.snapshotLength; 26 for(var i=0; i < len; i++){ 27 nodes.push(results.snapshotItem(i)); 28 } 26 for (var i = 0; i < len; nodes.push(results.snapshotItem(i++))) 27 ; 29 28 return nodes.length ? nodes : null; 30 29 } 31 30 32 31 function is_clippingsite(url) { 33 var len = CLIPPINGSITELIST.length; 34 for (var i = 0; i < len; i++) { 35 if (url.indexOf(CLIPPINGSITELIST[i], 0) == 0) return 1; 32 for (var i = CLIPPINGSITELIST.length; i-->0; ) { 33 if (url.indexOf(CLIPPINGSITELIST[i], 0) == 0) return true; 36 34 } 37 return 0;35 return false; 38 36 } 39 37 … … 43 41 if (!bookmarklist.length) return; 44 42 45 var ul_len = bookmarklist.length; 46 for (var ul_i = 0; ul_i < ul_len; ul_i++) { 43 for (var ul_i = bookmarklist.length; ul_i-->0; ) { 47 44 var li = getElementsByXPath('li/a', bookmarklist[ul_i]); 48 45 if (!li) continue; 49 var li_len = li.length; 50 for (var li_i = 0; li_i < li_len; li_i++) { 46 for (var li_i = li.length; li_i-->0; ) { 51 47 if (is_clippingsite(li[li_i].href)) { 52 48 li[li_i].parentNode.innerHTML = 'removed to clipping site';
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)