打开/关闭菜单
切换首选项菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

测试20:修订间差异

来自珠海交通维基
无编辑摘要
无编辑摘要
第6行: 第6行:


     <div class="zhbus-led-screen">
     <div class="zhbus-led-screen">
       <!-- 24行精准硬切 LED 点阵遮罩层(消除半亮灯珠) -->
       <!-- 24行硬边缘点阵遮罩层(彻底消除半亮灯珠) -->
       <div class="zhbus-led-overlay"></div>
       <div class="zhbus-led-overlay"></div>
        
        
第66行: 第66行:
}
}


/* 硬边缘点阵遮罩层:0.7px 到 0.75px 极窄过渡,彻底杜绝灯珠亮一半 */
/* 硬边缘点阵遮罩层:0.7px 到 0.75px 极窄过渡,杜绝灯珠亮一半 */
.zhbus-led-overlay {
.zhbus-led-overlay {
   position: absolute;
   position: absolute;
第85行: 第85行:
}
}


/* 专为真 LED 效果优化的字体与高对比度渲染 */
/* 专为 LED 点阵优化的像素字体与渲染 */
.zhbus-led-text {
.zhbus-led-text {
   font-family: "SimSun-ExtB", "NSimSun", "SimSun", "Courier New", monospace !important;
   font-family: "SimSun-ExtB", "NSimSun", "SimSun", "Courier New", monospace !important;
第97行: 第97行:
   align-items: center;
   align-items: center;
    
    
   /* 强制关闭字体平滑(抗锯齿),还原真实像素点 */
   /* 强制关闭抗锯齿,保留纯粹像素点 */
   -webkit-font-smoothing: none !important;
   -webkit-font-smoothing: none !important;
   -moz-osx-font-smoothing: unset !important;
   -moz-osx-font-smoothing: unset !important;
   font-smooth: never !important;
   font-smooth: never !important;


   /* 使用 300% 对比度滤镜进行二值化,使字边缘要么全亮要么完全不亮 */
   /* 高对比度二值化滤镜 */
   filter: contrast(300%) drop-shadow(0 0 1px #ffc400);
   filter: contrast(300%) drop-shadow(0 0 1px #ffc400);
}
}
第121行: 第121行:
</style>
</style>


<img src="x" onerror="
<!-- 利用图片 onerror 绕过 MediaWiki 对 script 标签的剥离与过滤机制 -->
(async () => {
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" style="display:none;" onerror="
   const API_URL = 'https://apiv2.zhbuswx.com/ContentPublish/GetAll?appType=notice&pageIndex=1&pageSize=20';
(function() {
   const FIXED_FIRST = '珠海巴士频道公交调整信息';
   var API_URL = 'https://apiv2.zhbuswx.com/ContentPublish/GetAll?appType=notice&pageIndex=1&pageSize=20';
   const SEP = '<span class=&quot;zhbus-sep&quot;>※</span>';
   var FIXED_FIRST = '珠海巴士频道公交调整信息';
   const FALLBACK = ['关于调整公交201路、K4路运行路线及停靠站点的公告','关于优化调整部分公交线路首尾班车时间的通告','关于针对雷雨恶劣天气实施公交应急保障预案的通知'];
   var SEP = '<span class=&quot;zhbus-sep&quot;>※</span>';
    
 
  const track = document.getElementById('zhbusLedTrack');
   var FALLBACK = [
  const content = document.getElementById('zhbusLedContent');
    '关于调整公交201路、K4路运行路线及停靠站点的公告',
  const contentClone = document.getElementById('zhbusLedContentClone');
    '关于优化调整部分公交线路首尾班车时间的通告',
  if (!track || !content || !contentClone || track.dataset.inited) return;
    '关于针对雷雨恶劣天气实施公交应急保障预案的通知',
  track.dataset.inited = 'true';
    '关于乘车码刷码系统升级维护的温馨提示',
    '关于开通高考专线及学生高考免费乘车政策的通告'
  ];
 
   function runLed() {
    var track = document.getElementById('zhbusLedTrack');
    var content = document.getElementById('zhbusLedContent');
    var contentClone = document.getElementById('zhbusLedContentClone');
 
    if (!track || !content || !contentClone || track.dataset.inited) return;
    track.dataset.inited = 'true';
 
    var controller = new AbortController();
    var timer = setTimeout(function() { controller.abort(); }, 3000);
 
    fetch(API_URL, { signal: controller.signal })
      .then(function(res) {
        clearTimeout(timer);
        if (!res.ok) throw new Error();
        return res.json();
      })
      .then(function(data) {
        var items = data.data || data.Data || (data.data && data.data.list) || data;
        var titles = [];
        if (Array.isArray(items)) {
          titles = items
            .map(function(i) { return i.Title || i.title; })
            .filter(Boolean)
            .filter(function(t) { return t.indexOf('【已恢复】') === -1; });
        }
        if (!titles.length) throw new Error();
        render(titles);
      })
      .catch(function() {
        clearTimeout(timer);
        var safeFallback = FALLBACK.filter(function(t) { return t.indexOf('【已恢复】') === -1; });
        render(safeFallback);
      });
 
    function render(titles) {
      var allTitles = [FIXED_FIRST].concat(titles);
      var fullHtml = SEP + allTitles.join(SEP) + SEP;
 
      content.innerHTML = fullHtml;
      contentClone.innerHTML = fullHtml;
 
      var tempDiv = document.createElement('div');
      tempDiv.innerHTML = fullHtml;
      var charCount = (tempDiv.textContent || tempDiv.innerText || '').length;
      var duration = Math.max(charCount / 3, 2);


  let titles = [];
       track.style.animation = 'zhbusMarquee ' + duration + 's linear infinite';
  try {
    const controller = new AbortController();
    const id = setTimeout(() => controller.abort(), 3000);
    const res = await fetch(API_URL, { signal: controller.signal });
    clearTimeout(id);
    const data = await res.json();
    const items = data.data || data.Data || data;
    if (Array.isArray(items)) {
       titles = items.map(i => i.Title || i.title).filter(Boolean).filter(t => !t.includes('【已恢复】'));
     }
     }
   } catch(e) {}
   }
 
 
  if (!titles.length) titles = FALLBACK.filter(t => !t.includes('【已恢复】'));
   setTimeout(runLed, 50);
  const fullHtml = SEP + [FIXED_FIRST, ...titles].join(SEP) + SEP;
  content.innerHTML = fullHtml;
  contentClone.innerHTML = fullHtml;
   const tempDiv = document.createElement('div');
  tempDiv.innerHTML = fullHtml;
  const duration = Math.max((tempDiv.textContent || '').length / 3, 2);
  track.style.animation = 'zhbusMarquee ' + duration + 's linear infinite';
})();
})();
" style="display:none;" />
" />
</html>

2026年7月29日 (三) 17:39的版本

加载中...
加载中...