MediaWiki:Citizen.js:修订间差异
MediaWiki界面页面
更多操作
创建页面,内容为“→这里所有JavaScript都会加载给Citizen皮肤的用户: console.log("mobile"); →这里的任何JavaScript将为使用移动版网站的用户加载: $(function () { →战舰少女R导航: (function ($, de) { →导航栏悬浮、点击展开: $(".banner1").hover(function () { $(this).find(".banner2").eq(0).show(); }, function () { $(this).find(".banner2").eq(0)…” 标签:移动版编辑 移动版网页编辑 高级移动版编辑 |
无编辑摘要 |
||
| (未显示同一用户的2个中间版本) | |||
| 第71行: | 第71行: | ||
// 获取对应内容 | // 获取对应内容 | ||
const content = document.getElementById(contentId); | const content = document.getElementById(contentId); | ||
contentContainer.innerHTML = '<span style="font-size:1.5em; font-weight:bold;">' + contentId.slice(0, | contentContainer.innerHTML = '<span style="font-size: 1.5em; font-weight: bold; position: relative; top: 16px; line-height: 0;">' + contentId.slice(0, -2) + '</span>'; | ||
content.style.display = 'grid'; // 解除源内容的隐藏 | content.style.display = 'grid'; // 解除源内容的隐藏 | ||
| 第91行: | 第91行: | ||
} | } | ||
if (content.firstElementChild.nextElementSibling.getAttribute("colspan") == 12) { | if (content.firstElementChild.nextElementSibling.getAttribute("colspan") == 12) { | ||
contentContainer.innerHTML = '<center><span style="font-size:1.5em; font-weight:bold;">' + contentId.slice(0, 3) + '<br/><br/>' + content.firstElementChild.innerHTML + '</span><br/><br/>' + content.firstElementChild.nextElementSibling.innerHTML; + '</center>' | contentContainer.innerHTML = '<center><span style="font-size: 1.5em; font-weight: bold; position: relative; top: 16px; line-height: 0;">' + contentId.slice(0, 3) + '<br/><br/>' + content.firstElementChild.innerHTML + '</span><br/><br/>' + content.firstElementChild.nextElementSibling.innerHTML; + '</center>' | ||
} | } | ||