Last active
December 24, 2015 21:29
-
-
Save to/6865490 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LDRで最後に選択したフィードでないものを表示してしまう不具合を直すパッチ
アイテムの取得に時間が掛かり到着と表示が前後した場合に異常にならないようにする