Changeset 18591 for lang/javascript/userscripts
- Timestamp:
- 09/01/08 22:07:17 (3 months ago)
- Files:
-
- 1 modified
-
lang/javascript/userscripts/poptip.user.js (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/userscripts/poptip.user.js
r18581 r18591 27 27 20080824 0.0.8 Bug fix in position adjustment logic 28 28 Add 2 rules to SITEINFO (Slashdot.org, YouTube in Hatena Bookmark) 29 20080824 0.0.9 "excludeUrl" option 30 Add 2 rules to SITEINFO (Yahoo Chiebukuro, Hatena Keyword) 29 31 */ 30 32 31 var VERSION = '0.0. 5';33 var VERSION = '0.0.9'; 32 34 var DEFAULT_DELAY_MSEC = 400; 33 35 var HIDE_DELAY_MSEC = 400; … … 44 46 var SITEINFO = [ 45 47 { 46 url: '^http://mixi .jp/*',48 url: '^http://mixi\\.jp/*', 47 49 linkElement: 'id("mymixiList")//td/a', 48 50 popupElement: 'id("profile")', … … 56 58 }, 57 59 { 58 url: '^http://mixi .jp/*',60 url: '^http://mixi\\.jp/*', 59 61 targetElement: 'id("myProfile")//div[@class="contents01"]/img', 60 62 linkElement: 'id("myProfile")//div[@class="contents03"]//a', … … 70 72 { 71 73 description: 'mixi community recent topics', 72 url: '^http://mixi .jp/*',74 url: '^http://mixi\\.jp/*', 73 75 linkElement: 'id("communityList")//td/a', 74 76 popupElement: 'id("newCommunityTopic")//dl', … … 84 86 { 85 87 description: 'mixi footprint', 86 url: '^http://mixi .jp/show_log.pl',88 url: '^http://mixi\\.jp/show_log\\.pl', 87 89 linkElement: 'id("log_color")/ul/li/a', 88 90 popupElement: 'id("profile")', … … 93 95 }, 94 96 { 95 url: '^http://(www|)flickr .com/.*',97 url: '^http://(www|)flickr\\.com/.*', 96 98 linkElement: '//span[@class="photo_container pc_s"]/a', 97 99 popupElement: '//div[@class="photoImgDiv"]//img', … … 102 104 { 103 105 descript: 'Flickr Exif info', 104 url: '^http://(www|)flickr .com/.*',106 url: '^http://(www|)flickr\\.com/.*', 105 107 linkElement: '//li[@class="Stats"]/a[.="More properties"]', 106 108 popupElement: 'id("GoodStuff")', … … 114 116 }, 115 117 { 116 url: '^http://(www|)flickr .com/.*',118 url: '^http://(www|)flickr\\.com/.*', 117 119 linkElement: '//span[@class="photo_container pc_s"]/a', 118 120 popupElement: '//div[@class="photoImgDiv"]//img', … … 123 125 { 124 126 description: 'Awasete-Yomitai more info', 125 url: '^http://awasete .com/show.phtml\\?u=',127 url: '^http://awasete\\.com/show\\.phtml\\?u=', 126 128 exampleUrl: 'http://awasete.com/show.phtml?u=http%3A%2F%2Fwww.madin.jp%2Fdiary%2F', 127 129 linkElement: '//div[@class="inner"]/ul/li/nobr/a', … … 138 140 { 139 141 description: 'Hatena Bookmark', 140 url: '^http://b .hatena.ne.jp/*',142 url: '^http://b\\.hatena\\.ne\\.jp/*', 141 143 linkElement: '//div[@class="entry-footer"]//*//a', 142 144 popupElement: 'id("entry-info")//blockquote', … … 149 151 { 150 152 description: 'Hatena Bookmark', 151 url: '^http://b .hatena.ne.jp/*',153 url: '^http://b\\.hatena\\.ne\\.jp/*', 152 154 linkElement: '//dd[@class="users"]//a', 153 155 popupElement: 'id("entry-info")//blockquote', … … 160 162 { 161 163 description: 'Hatena Diary Keyword', 162 url: '^http://d.hatena.ne.jp/*', 164 url: '^http://d\\.hatena\\.ne\\.jp/*', 165 excludeUrl: '^http://d\\.hatena\\.ne\\.jp/keyword/.*', 163 166 linkElement: '//a[@class="keyword"]', 164 167 popupElement: '//div[@class="box-curve-bar"]//div[@class="section"]', … … 175 178 }, 176 179 { 177 url: '^http://mixi.jp/(search|list)_community\\.pl.*', 180 description: 'Hatena Keyword', 181 url: '^http://d\\.hatena\\.ne\\.jp/keyword/.*', 182 linkElement: '//a[@class="keyword"]', 183 popupElement: 'id("body")//div[@class="keyword-body"]/div[@class="section"]/p', 184 delay: 1000, 185 stripe: true, 186 style: { 187 fontSize: '80%', 188 padding: '2px', 189 border: 'solid 1px blue', 190 color: 'black', 191 backgroundColor: 'white', 192 textAlign: 'left' 193 } 194 }, 195 { 196 url: '^http://mixi\\.jp/(search|list)_community\\.pl.*', 178 197 linkElement: '//div[@class="iconList03"]//a', 179 198 popupElement: 'id("newCommunityTopic")//dl', … … 186 205 } 187 206 }, 207 { 208 description: 'Yahoo Chiebukuro related question', 209 url: '^http://detail\\.chiebukuro\\.yahoo\\.co\\.jp/qa/question_detail/.+', 210 linkElement: 'id("recommend")//dd[@class="recombox"]/a', 211 popupElement: '//div[@class="bestAnswer Extends-details"]//div[@class="qa"]', 212 style : { 213 backgroundColor : 'white', 214 borderWidth : '1px', 215 padding : '8px', 216 borderColor: 'blue', 217 fontSize: '80%', 218 textAlign: 'left', 219 borderStyle: 'solid' 220 }, 221 containerHTML: '<h2>Best Answer</h2><popup:container/>' 222 }, 188 223 189 224 { 190 225 description: 'Twitter icon enlargement', 191 url: '^http://twitter .com/*',226 url: '^http://twitter\\.com/*', 192 227 targetElement: '//td[@class="thumb vcard author"]//img[@class="photo fn"]', 193 228 linkElement: '//td[@class="thumb vcard author"]//a[@class="url"]', … … 200 235 { 201 236 description: 'Twitter timeline', 202 url: '^http://twitter .com/*',237 url: '^http://twitter\\.com/*', 203 238 linkElement: 'id("content")//td[@class="content"]/strong/a', 204 239 popupElement: 'id("side")', … … 211 246 { 212 247 description: 'Twitter following & followers', 213 url: '^http://twitter .com.*/(friends|followers)',248 url: '^http://twitter\\.com.*/(friends|followers)', 214 249 targetElement: '//td[@class="thumb"]//img[@class="photo fn"]', 215 250 linkElement: '//td[@class="thumb"]//a[@rel="contact"]', … … 222 257 { 223 258 description: 'Hatena Fotolife', 224 url: '^http://f .hatena.ne.jp/.*',259 url: '^http://f\\.hatena\\.ne\\.jp/.*', 225 260 linkElement: '//ul[@class="fotolist"]/li/a', 226 261 popupElement: 'id("container")/div[2]/div[3]/img', … … 230 265 { 231 266 description: 'Pixiv thumbnails', 232 url: '^http://www .pixiv.net/tags.php\\?tag=.*',267 url: '^http://www\\.pixiv\\.net/tags\\.php\\?tag=.*', 233 268 linkElement: 'id("illust_c5")/ul/li/a[1]', 234 269 popupElement: 'id("content2")/div[6]/a/img', … … 239 274 { 240 275 description: 'Amazon.co.jp ListMania', 241 url: '^http://www .amazon.co.jp/.*/lm/.*',276 url: '^http://www\\.amazon\\.co\\.jp/.*/lm/.*', 242 277 targetElement: '//td[@class="listItem"]/a/img[position()=1]', 243 278 linkElement: '//td[@class="listItem"]//strong/a', … … 253 288 { 254 289 description: 'Amazon.co.jp SearchResult', 255 url: '^http://www .amazon.co.jp/s/.*',290 url: '^http://www\\.amazon\\.co\\.jp/s/.*', 256 291 linkElement: '//td[@class="imageColumn"]//a', 257 292 popupElement: 'id("productDescription")', … … 267 302 { 268 303 description: 'slashdot.jp recent 3 stories', 269 url: '^http://slashdot .(jp|org)/topics.(pl|shtml)',304 url: '^http://slashdot\\.(jp|org)/topics\\.(pl|shtml)', 270 305 exampleUrl: 'http://slashdot.jp/topics.pl', 271 306 targetElement: '//div[@class="generalbody"]/table//td[@align="center"]/a/img', … … 280 315 { 281 316 description: 'Youtube in Hatena Bookmark', 282 url: '^http://b .hatena.ne.jp/.*',317 url: '^http://b\\.hatena\\.ne\\.jp/.*', 283 318 linkElement: '//a[contains(@href,"youtube.com/") and contains(text(),"users")]', 284 319 popupElement: 'id("video")', … … 357 392 for (var i in SITEINFO) { 358 393 if (SITEINFO[i].disabled) continue; 359 if (!location.href.match(new RegExp(SITEINFO[i].url)) ) continue;394 if (!location.href.match(new RegExp(SITEINFO[i].url)) || (SITEINFO[i].excludeUrl && location.href.match(new RegExp(SITEINFO[i].excludeUrl)))) continue; 360 395 var targetElementList = getElementsByXPath((SITEINFO[i].targetElement)?SITEINFO[i].targetElement:SITEINFO[i].linkElement); 361 396 var linkElementList = getElementsByXPath(SITEINFO[i].linkElement);
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)