Changeset 33682
- Timestamp:
- 05/31/09 09:27:22 (4 years ago)
- Files:
-
- 1 modified
-
lang/javascript/vimperator-plugins/trunk/pino.js (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/javascript/vimperator-plugins/trunk/pino.js
r33676 r33682 42 42 <author mail="snaka.gml@gmail.com" homepage="http://vimperator.g.hatena.ne.jp/snaka72/">snaka</author> 43 43 <license>MIT style license</license> 44 <version>1.3. 0</version>44 <version>1.3.1</version> 45 45 <detail><![CDATA[ 46 46 == Subject == … … 148 148 let pins = new Pins(); 149 149 let items = pins.items(); 150 if ( items.length == 0) {150 if (!items || items.length == 0) { 151 151 liberator.echo("Pinned item doesn't exists."); 152 152 return; … … 226 226 ? this.cache 227 227 : this.cache = this._getPinnedItems(); 228 return result.sort(this.sortOrder);228 return (result || []).sort(this.sortOrder); 229 229 }, 230 230 … … 271 271 272 272 request.addEventListener("onSuccess", function(data) { 273 liberator.log(data); 273 if (isLoginPage(data)) { 274 liberator.echoerr("Can't get pinned list. Maybe you should login to livedoor."); 275 return; 276 } 274 277 result = liberator.eval(data.responseText); 275 278 }); 276 279 request.addEventListener("onFailure", function(data) { 277 280 liberator.echoerr("Can't get pinned list!!!"); 278 liberator.log(data);279 281 }); 280 282 request.post(); … … 316 318 ].join('&'); 317 319 320 function isLoginPage(response) 321 response.responseText.substr(0, 5) == '<?xml' 322 318 323 // }}} 319 324 // API /////////////////////////////////////////////////////////// {{{
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)