Skip to content

Instantly share code, notes, and snippets.

@to
Last active December 24, 2015 21:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save to/6865490 to your computer and use it in GitHub Desktop.
Save to/6865490 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name LDR - Fix Unmatched Print
// @include http://reader.livedoor.com/reader/
// ==/UserScript==
with(unsafeWindow){
addAround(API.prototype, 'post', function(proceed, args, target, name){
switch(target.ap){
case '/api/unread':
case '/api/all':
var onload = args[1] || target.onload;
args[1] = function(feed){
if(State.last_id == feed.subscribe_id)
onload(feed);
}
}
return proceed(args);
});
}
function addAround(target, name, advice){
var method = target[name];
target[name] = function(){
var self = this;
return advice(
function(args){
return method.apply(self, args);
},
arguments, self, name);
};
}
@to
Copy link
Author

to commented Oct 8, 2013

LDRで最後に選択したフィードでないものを表示してしまう不具合を直すパッチ
アイテムの取得に時間が掛かり到着と表示が前後した場合に異常にならないようにする

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment