whatshot60秒读懂世界网页插件

hik
@Ta 2021-08-22发布,2022-10-07修改 12398点击

很简单,代码添加到hu60网页插件即可,https://hik.win/news.php 其实用的是 https://hu60.cn/q.php/bbs.topic.101139.html 的一句话PHP,如果嫌慢或者样式不好可用自己的页面。

导入网页插件:60秒读懂世界(当前用户:8,总安装次数:18)
<style>
	.layui-layer-content p {
		font-size: 15px;
		padding: 0px 20px 0px 20px
	}

	span .url,
	.layui-layer-content figcaption,
	.layui-layer-content figure {
		display: none;
	}

	.origin_image,
	.thumbnail,
	.content_image {
		display: none;
		max-width: 100%;
		margin: 1.4em auto
	}
</style>
<script src="https://www.layuicdn.com/layer-v3.5.1/layer.js"></script>
<script type="text/javascript">
	$(function() {
		$('.header-nav').prepend('<li onclick="news()">新闻</li>');
	})
	function news() {
		const date = new Date(Date.now() - (2000 * 60 * 60));
		const month = (date.getMonth() + 1).toString().padStart(2, '0');
		const strDate = date.getDate().toString().padStart(2, '0');
		let dateFormat = `${date.getFullYear()}${month}${strDate}`;
		let zhihuUrl =
			"https://cubox.pro/c/filters:no_upscale%28%29?imageUrl=https://www.zhihu.com/api/v4/columns/c_1261258401923026944/items?date=" +
			dateFormat;
		$.ajax({
			url: zhihuUrl,
			success: function(result) {
				let content = result.data[0].content;
				layer.open({
					title: '每天60秒看懂世界!',
					maxmin: true,
					type: 1,
					area: ['90%', '90%'],
					content: content
				});
			}
		});
	}
</script>

效果如下:

Snipaste_2021-08-22_00-05-23.png

点击后是弹窗,高宽请根据自己电脑分辨率自定义:

Snipaste_2021-08-22_00-06-19.png
https://cway.top

回复列表(3|隐藏机器人聊天)
添加新回复
回复需要登录