打开/关闭搜索
搜索
打开/关闭菜单
26
6679
46
1.2万
OGAS数据中枢
导航
首页
最近更改
随机页面
特殊页面
上传文件
少女前线
简介
战术人形
装备图鉴
BGM
任务
少前2:追放
逆向坍塌:面包房行动
打开/关闭外观设置菜单
通知
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
注册
登录
查看“︁Widget:GameSwitcher”︁的源代码
来自OGAS数据中枢
更多操作
←
Widget:GameSwitcher
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
管理员
您没有权限编辑
Widget
命名空间内的页面。
您可以查看和复制此页面的源代码。
<noinclude> 本Widget为少女前线系列多游戏首页提供切换交互逻辑。 不接受参数,直接在首页调用:<code><nowiki>{{#widget:GFHomepageSwitcher}}</nowiki></code> </noinclude><includeonly><script> (function () { 'use strict'; function init() { var tabs = document.querySelectorAll('#gf-homepage .gf-tab'); var heroSlides = document.querySelectorAll('#gf-homepage .gf-hero-slide'); var contentPanels = document.querySelectorAll('#gf-homepage .gf-content-panel'); if (!tabs.length) return; tabs.forEach(function (tab) { tab.addEventListener('click', function () { var game = this.getAttribute('data-game'); tabs.forEach(function (t) { t.classList.remove('active'); t.setAttribute('aria-selected', 'false'); }); this.classList.add('active'); this.setAttribute('aria-selected', 'true'); heroSlides.forEach(function (s) { s.classList.remove('active'); if (s.id === 'hero-' + game) { s.classList.add('active'); } }); contentPanels.forEach(function (p) { p.classList.remove('active'); if (p.id === 'content-' + game) { p.classList.add('active'); } }); }); }); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })(); </script></includeonly>
返回
Widget:GameSwitcher
。
查看“︁Widget:GameSwitcher”︁的源代码
来自OGAS数据中枢