| 262 | | /* |
| 263 | | * user.js のページにインストールURLを追加する. |
| 264 | | * |
| 265 | | */ |
| 266 | | , addGreasemonkeyInstallLink : function () { |
| 267 | | if (($.browser.mozilla || $.browser.safari) && (new RegExp("^/share/browser/lang/javascript/userscripts/.*\\.user\\.js")).test(location.pathname)) { |
| 268 | | var uri = location.protocol + '//svn.coderepos.org' + location.pathname.replace('browser/', '').replace('user.js?', 'user.js'); |
| 269 | | $('<a></a>') |
| 270 | | .attr({ |
| 271 | | href : uri |
| 272 | | ,title : uri.split('/').slice(-1) + ' をインストールする' |
| 273 | | }) |
| 274 | | .text('インストール - ' + uri) |
| 275 | | .insertAfter($('h1:first')); |
| 276 | | } |
| 277 | | } |
| | 262 | /* |
| | 263 | * user.js のページにインストールURLを追加する. |
| | 264 | * |
| | 265 | */ |
| | 266 | , addGreasemonkeyInstallLink : function () { |
| | 267 | if (!(new RegExp("^/share/browser/lang/javascript/userscripts/.*\\.user\\.js")).test(location.pathname) || |
| | 268 | !$.browser.mozilla && !$.browser.safari) |
| | 269 | return; |
| | 270 | var uri = location.protocol + '//svn.coderepos.org' + location.pathname.replace('browser/', ''); |
| | 271 | $('<a/>') |
| | 272 | .attr({ |
| | 273 | href : uri, |
| | 274 | title : uri.split('/').slice(-1) + ' をインストールする' |
| | 275 | }) |
| | 276 | .text('インストール - ' + uri) |
| | 277 | .insertAfter($('h1:first')); |
| | 278 | } |