Changeset 8538 for lang/javascript
- Timestamp:
- 03/31/08 02:55:22 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/hatebuclippingsiteremover.user.js
r8481 r8538 4 4 // @description remove clipping sites 5 5 // @include http://b.hatena.ne.jp/entry/* 6 // @version 1.0. 16 // @version 1.0.2 7 7 // ==/UserScript== 8 8 (function() { 9 var bookmarklist = getElementsByXPath('//ul[ @class="bookmarklist"and not(@id="bookmarked_user")]//li/a[@href]');9 var bookmarklist = getElementsByXPath('//ul[contains(concat(" ", normalize-space(@class), " "), " bookmarklist ") and not(@id="bookmarked_user")]//li/a[@href]'); 10 10 if (!bookmarklist) return; 11 11 … … 20 20 ,"http://d.hatena.ne.jp/hengsu/" 21 21 ]; 22 const LABEL = "Clipping site REMOVED";22 const LABEL = '<span style="font-size: smaller">Clipping site REMOVED</span>'; 23 23 24 24 if (typeof bookmarklist.forEach == "function") … … 39 39 return url.indexOf(site) == 0; 40 40 }); 41 else for (var i = CLIPPINGSITELIST.length; i --> 0; )41 else for (var i = CLIPPINGSITELIST.length; i --> 0;) 42 42 if (url.indexOf(CLIPPINGSITELIST[i]) == 0) 43 43 return true; … … 46 46 47 47 function getElementsByXPath(xpath, node) { 48 var node = node || document; 49 var results = document.evaluate(xpath, node, null, 48 var results = document.evaluate(xpath, node || document, null, 50 49 XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); 51 50 var nodes = [];
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)