v26110452 大家都在关注头像轮换:三条合起来每 3~9 秒随机换一个
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
(function () {
|
||||
'use strict';
|
||||
/* 页面版本号(YYMMDD+序号):显示在「关于兜爸心选」页底部;bump 时同步 head 注释与 ?v= */
|
||||
var VER = '26110451';
|
||||
var VER = '26110452';
|
||||
const $ = (s, c) => (c || document).querySelector(s);
|
||||
const $$ = (s, c) => Array.from((c || document).querySelectorAll(s));
|
||||
|
||||
|
||||
@@ -244,5 +244,5 @@
|
||||
}
|
||||
/* feed.js 首页默认不加载(index.html 只引了 topics.js),这里按需拉一次 */
|
||||
if (window.GC_FEED) init();
|
||||
else { var fs = document.createElement('script'); fs.src = 'guangchang/feed.js?v=26110451'; fs.onload = fs.onerror = init; document.body.appendChild(fs); }
|
||||
else { var fs = document.createElement('script'); fs.src = 'guangchang/feed.js?v=26110452'; fs.onload = fs.onerror = init; document.body.appendChild(fs); }
|
||||
})();
|
||||
|
||||
21
js/gch/v6.js
21
js/gch/v6.js
@@ -6,9 +6,9 @@
|
||||
(function () {
|
||||
var sec = document.getElementById('gcHome');
|
||||
if (!sec) return;
|
||||
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110451';
|
||||
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/gch/v4.css?v=26110452';
|
||||
document.head.appendChild(l);
|
||||
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110451';
|
||||
var s = document.createElement('script'); s.src = 'js/gch/v4.js?v=26110452';
|
||||
s.onload = function () { if (sec.querySelector('.g4-foot')) merge(); else sec.addEventListener('gc4-ready', merge, { once: true }); }; /* v4 要先拉 feed.js 才渲染 */
|
||||
document.body.appendChild(s);
|
||||
|
||||
@@ -151,17 +151,16 @@
|
||||
im.className = 'sw-o';
|
||||
setTimeout(function () { im.src = lkSrc(nx); im.className = 'sw-i'; }, 220);
|
||||
}
|
||||
/* 11-05 用户:「动的太频繁了,三个文章加一起,每 3~9 秒随机动一个」→ 不再每条各自计时:全局一个计时器,每 3~9 秒随机挑一条(前 3 条里)换一个头像 */
|
||||
function likeTick() {
|
||||
likeT.forEach(clearTimeout); likeT = [];
|
||||
[0, 1, 2].forEach(function (i) {
|
||||
(function loop() {
|
||||
likeT[i] = setTimeout(function () {
|
||||
var r = list.querySelectorAll('.g6-nt')[i];
|
||||
if (r && !document.hidden && list.offsetParent) swapOne(r);
|
||||
loop();
|
||||
}, 2000 + Math.random() * 4000);
|
||||
})();
|
||||
});
|
||||
(function loop() {
|
||||
likeT[0] = setTimeout(function () {
|
||||
var rs = list.querySelectorAll('.g6-nt'), i = Math.floor(Math.random() * Math.min(3, rs.length));
|
||||
if (rs[i] && !document.hidden && list.offsetParent) swapOne(rs[i]);
|
||||
loop();
|
||||
}, 3000 + Math.random() * 6000);
|
||||
})();
|
||||
}
|
||||
all.addEventListener('click', function () { location.href = 'guangchang/' + location.search + location.hash; });
|
||||
paintList();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if (/[?&]kit=0(?:&|$)/.test(location.search)) return;
|
||||
var box = document.getElementById('kit'), sec = document.getElementById('kitHome');
|
||||
if (!box || !sec) return;
|
||||
var V = '26110451';
|
||||
var V = '26110452';
|
||||
var l = document.createElement('link'); l.rel = 'stylesheet'; l.href = 'js/kit.css?v=' + V; document.head.appendChild(l);
|
||||
document.documentElement.classList.add('has-kit');
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
postMessage 不是实时投递,微信在分享那一刻才派发,所以每次换内容都要再报一次;子页面没引 jweixin,这里按需加载。 */
|
||||
(function (g) {
|
||||
'use strict';
|
||||
var V = '26110451';
|
||||
var V = '26110452';
|
||||
var isWx = /MicroMessenger/i.test(navigator.userAgent || '');
|
||||
var waiting = [], loading = false;
|
||||
function ready(cb) {
|
||||
|
||||
Reference in New Issue
Block a user