Skip to content

Instantly share code, notes, and snippets.

@swdyh
Created May 7, 2009 04:31
Show Gist options
  • Select an option

  • Save swdyh/107915 to your computer and use it in GitHub Desktop.

Select an option

Save swdyh/107915 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name AutoPagerizeTwitterFilter
// @namespace http://relucks.org/
// @include http://twitter.com/
// ==/UserScript==
(function() {
var reqfl = function(opt) {
opt['headers'] = opt['headers'] || {}
opt['headers']['Accept'] = 'application/json, text/javascript, */*'
}
var resfl = function(res, url) {
var r = eval('(' + res.responseText + ')')
res.responseText = '<html><body><div>' +
r['#pagination'] + r['#timeline'] +
'</div></body></html>'
res.finalUrl = null
}
setTimeout(function() {
if (window.AutoPagerize) {
if (window.AutoPagerize.addResponseFilter) {
window.AutoPagerize.addResponseFilter(resfl)
}
if (window.AutoPagerize.addRequestFilter) {
window.AutoPagerize.addRequestFilter(reqfl)
}
}
}, 0)
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment