Skip to content

Instantly share code, notes, and snippets.

@alan5281
Last active May 4, 2017 06:24
Show Gist options
  • Save alan5281/fcb71a97edd57c25a99c437b4f815329 to your computer and use it in GitHub Desktop.
Save alan5281/fcb71a97edd57c25a99c437b4f815329 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name tieba.baidu
// @namespace http://tieba.baidu.com/
// @version 0.3.3
// @author You
// @match http://tieba.baidu.com/p/*
// @match https://tieba.baidu.com/p/*
// @grant GM_addStyle
// @noframes
// ==/UserScript==
(function() {
'use strict';
GM_addStyle('.lzl_post_hidden {display: initial !important;} .lzl_pager {display: initial !important;}');
var elements = document.querySelectorAll('.l_pager a');
Array.prototype.forEach.call(elements, function(el, i){
el.addEventListener('click', function(e){
e.preventDefault ();
e.stopPropagation ();
window.location = this.href;
return false;
}, false);
});
$('.l_posts_num > li').off('click');
document.getElementById("lzonly_cntn").addEventListener("click",function(e) {
e.preventDefault ();
e.stopPropagation ();
window.location = this.href;
return false;
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment