本帖最后由 风一样自由 于 2022-3-14 10:53 编辑
谷歌浏览器插件
效果:动态太大了
文件:
代码:jquery网上下载
manifest.json:
[JavaScript] 纯文本查看 复制代码 {
"manifest_version": 3,
"name": "cnblogs flow",
"version": "1.0",
"description": "none",
"content_scripts": [{
"matches": ["https://*.cnblogs.com/*", "http://*.cnblogs.com/*"],
"css": ["rewrite.css"],
"js": ["jquery-3.1.1.min.js", "flow.js"],
"run_at": "document_start"
}],
"host_permissions": ["https://*.cnblogs.com/*"]
}
rewrite.css:
[CSS] 纯文本查看 复制代码 .post-list>.post-item {
width: 47%;
float: left;
margin-right: 3%;
height: 170px;
}
#pager_bottom {
display: none;
}
flow.js:
[JavaScript] 纯文本查看 复制代码 $(function(){
var oldpage = 1;
$(window).scroll(function(){
var newpage = Math.ceil(eval($(window).scrollTop() / 1300));
if( newpage - oldpage == 1 ){
oldpage = newpage;
$.ajax({
method: "POST",
contentType: "application/json",
url: "https://www.cnblogs.com/AggSite/AggSitePostList",
data: '{"CategoryType":"SiteHome","ParentCategoryId":0,"CategoryId":808,"PageIndex":'+newpage+',"TotalPostCount":4000,"ItemListActionName":"AggSitePostList"}'
}).done(function (content) {
$('#post_list').append(content);
});
}
})
}) |