Skip to content

Instantly share code, notes, and snippets.

@dorentus
Created December 11, 2012 09:29
Show Gist options
  • Save dorentus/4257301 to your computer and use it in GitHub Desktop.
Save dorentus/4257301 to your computer and use it in GitHub Desktop.
Restore #pager_top and get rid of ajax page switching
// ==UserScript==
// @name CnblogsPaginatorFix
// @namespace cnblogs
// @include http://www.cnblogs.com/*
// ==/UserScript==
Array.prototype.slice.call(document.querySelectorAll('#paging_block .pager a')).forEach(function (elm) {
elm.removeAttribute('onClick');
});
var pager_top = document.querySelector('#pager_top');
if (pager_top) {
pager_top.removeAttribute('style');
pager_top.innerHTML = document.querySelector('#pager_bottom').innerHTML;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment