PageSourceSearch

https://yc100.github.io/anzhiyu/random.js

js yc100.github.io collected 2026-10-03 10:12:40 UTC 5,090 bytes, 56 lines download raw bytes

1var posts=["2023/05/26/20230526-1/","2023/05/31/20230531-1/","2023/05/27/20230601-1/","2023/06/05/20230605-1/","2023/06/08/20230608-1/","2024/05/23/20240523-1/","2024/06/05/20240605-1/","2024/05/27/20240527-1/","2024/06/12/20240607-1/","2024/06/17/20240617-1/","2024/06/17/20240617-2/","2024/06/19/20240619-1/","2024/06/18/20240618-1/","2021/06/03/hello-world/"];function toRandomPost(){
2    pjax.loadUrl('/'+posts[Math.floor(Math.random() * posts.length)]);
3  };var friend_link_list=[{"name":"Hexo","link":"https://hexo.io/zh-tw/","avatar":"https://d33wubrfki0l68.cloudfront.net/6657ba50e702d84afb32fe846bed54fba1a77add/827ae/logo.svg","descr":"快速、简单且强大的网站框架"},{"name":"anzhiyu主题","link":"https://blog.anheyu.com/","avatar":"https://npm.elemecdn.com/[email protected]/img/avatar.jpg","descr":"生活明朗,万物可爱","siteshot":"https://npm.elemecdn.com/[email protected]/img/post/common/anzhiy.cn.jpg"},{"name":"安知鱼","hundredSuffix":"","link":"https://blog.anheyu.com/","avatar":"https://npm.elemecdn.com/[email protected]/img/avatar.jpg","descr":"生活明朗,万物可爱","siteshot":"https://npm.elemecdn.com/[email protected]/img/post/common/anzhiy.cn.jpg"},{"name":"安知鱼","hundredSuffix":"","link":"https://blog.anheyu.com","avatar":"https://npm.elemecdn.com/[email protected]/img/avatar.jpg","descr":"生活明朗,万物可爱"},{"name":"李程ic","link":"https://www.licic.net/","avatar":"https://admin.licic.net/favicon.png","descr":"中华人民共和国万岁!","siteshot":"https://admin.licic.net/screenshot.png"},{"name":"Cisyam","hundredSuffix":"","link":"https://manamn.space/","avatar":"https://gaoziman.oss-cn-hangzhou.aliyuncs.com/img/202307151545455.jpg","descr":"分享思想,留下痕迹"},{"name":"科学上网","hundredSuffix":"","link":"https://clashgithub.com","avatar":"https://clashgithub.com/wp-content/themes/modown/static/img/logo.png","descr":"免费公益SSR/V2ray/Shadowrocket/Clash节点/小火箭订阅链接|科学上网|免费梯子"},{"name":"小白API","hundredSuffix":"","link":"https://xiaobai.klizi.cn/","avatar":"http://q2.qlogo.cn/headimg_dl?dst_uin=1242619315&spec=3","descr":"免费的API"},{"name":"呆鱼","link":"https://daiyu.fun/","avatar":"https://daiyu.fun/img/avatar.png","descr":"Hello World!","screenshot":"https://daiyu.fun/img/screenshot.png"},{"name":"ScaredCube’s Site","link":"https://sccube.link","avatar":"https://s.scc.lol/avatar-s","descr":"Hello World!"},{"name":"btwoa","link":"https://blog.btwoa.com","avatar":"https://blog.btwoa.com/btwoa.jpg","descr":"世界为你简单"},{"name":"静若安然","link":"https://www.imets.cn","avatar":"https://www.imets.cn/favicon.ico","descr":"一个宁静的世界"},{"name":"gywlg","link":"http://gywlg.cn","avatar":"http://gywlg.cn/imageHead/1717065139350.jpg","descr":"一个珍藏故事与探讨智慧的地方","siteshot":"http://gywlg.cn/file/1719648068846.jpg"},{"name":"满久琦的个人网站","link":"https://www.manjiuqi.com/","avatar":"https://static.yhdzz.cn/logos/512x512.png","descr":"天上如是,地下亦然","siteshot":"https://static.yhdzz.cn/imgs/index.png"}];
4    var refreshNum = 1;
5    function friendChainRandomTransmission() {
6      const randomIndex = Math.floor(Math.random() * friend_link_list.length);
7      const { name, link } = friend_link_list.splice(randomIndex, 1)[0];
8      Snackbar.show({
9        text:
10          "点击前往按钮进入随机一个友链,不保证跳转网站的安全性和可用性。本次随机到的是本站友链:「" + name + "」",
11        duration: 8000,
12        pos: "top-center",
13        actionText: "前往",
14        onActionClick: function (element) {
15          element.style.opacity = 0;
16          window.open(link, "_blank");
17        },
18      });
19    }
20    function addFriendLinksInFooter() {
21      var footerRandomFriendsBtn = document.getElementById("footer-random-friends-btn");
22      if(!footerRandomFriendsBtn) return;
23      footerRandomFriendsBtn.style.opacity = "0.2";
24      footerRandomFriendsBtn.style.transitionDuration = "0.3s";
25      footerRandomFriendsBtn.style.transform = "rotate(" + 360 * refreshNum++ + "deg)";
26      const finalLinkList = [];
27  
28      let count = 0;
29
30      while (friend_link_list.length && count < 3) {
31        const randomIndex = Math.floor(Math.random() * friend_link_list.length);
32        const { name, link, avatar } = friend_link_list.splice(randomIndex, 1)[0];
33  
34        finalLinkList.push({
35          name,
36          link,
37          avatar,
38        });
39        count++;
40      }
41  
42      let html = finalLinkList
43        .map(({ name, link }) => {
44          const returnInfo = "<a class='footer-item' href='" + link + "' target='_blank' rel='noopener nofollow'>
44" + name + "</a>"
45          return returnInfo;
46        })
47        .join("");
48  
49      html += "<a class='footer-item' href='/link/'>更多</a>";
50
51      document.getElementById("friend-links-in-footer").innerHTML = html;
52
53      setTimeout(()=>{
54        footerRandomFriendsBtn.style.opacity = "1";
55      }, 300)
56    };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.