“User:Irukaza/common.css”与“User:Irukaza/common.js”:页面之间的差异
< User:Irukaza(页面间差异)
跳到导航
跳到搜索
imported>=海豚= (以“.CodeMirror { font-family: Microsoft YaHei!important; font-size: 14px!important; height: 400px!important; }”替换内容) |
imported>=海豚= 无编辑摘要 |
||
第1行: | 第1行: | ||
. | $(window).scroll(function(){ | ||
if (mw.config.get("wgAction") === "view"&& !document.querySelector("#NewuserTips")&& $(this).scrollTop() > 500 && !window.localStorage.getItem('NewuserTips')) { | |||
var url = new mw.Uri(); | |||
var wgUserVariant = mw.config.get("wgUserVariant"); | |||
$("body").append('<div id="NewuserTips" style="background: #a7a93cf0; color: white; text-align: center; padding: .17rem; position: fixed; top: 0; left: 0; right: 0; box-shadow: 0 0 2.5px #000; z-index: 9999;"><p>我们鼓励您编辑条目,创建账号成为本站的一员,登录后您可以建立自己的用户页并署名贡献(<a style=" color: #f4ff7f;" href="https://www.hmoegirl.com/%E7%89%B9%E6%AE%8A:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7"> 注册 </a>|<a style="color: #f4ff7f;" href="https://www.hmoegirl.com/%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95"> 登录 </a>|<a a style="color: #f4ff7f;" href="https://www.hmoegirl.com/H%E8%90%8C%E5%A8%98:%E5%AE%98%E6%96%B9%E7%BE%A4%E7%BB%84"> 加入社群 </a>)<span id="NewuserTips-disable" a style="color: #f4ff7f;" class="mw-ui-destructive"> [ 不再提示 ] </span></div>'); | |||
} | } | ||
$(".mw-ui-destructive").on("click", function(e) { | |||
$("#NewuserTips").remove(); | |||
window.localStorage.setItem('NewuserTips', true); | |||
}); | |||
}); | |||
localStorage.removeItem('NewuserTips'); |
2021年8月6日 (五) 21:34的版本
$(window).scroll(function(){
if (mw.config.get("wgAction") === "view"&& !document.querySelector("#NewuserTips")&& $(this).scrollTop() > 500 && !window.localStorage.getItem('NewuserTips')) {
var url = new mw.Uri();
var wgUserVariant = mw.config.get("wgUserVariant");
$("body").append('<div id="NewuserTips" style="background: #a7a93cf0; color: white; text-align: center; padding: .17rem; position: fixed; top: 0; left: 0; right: 0; box-shadow: 0 0 2.5px #000; z-index: 9999;"><p>我们鼓励您编辑条目,创建账号成为本站的一员,登录后您可以建立自己的用户页并署名贡献(<a style=" color: #f4ff7f;" href="https://www.hmoegirl.com/%E7%89%B9%E6%AE%8A:%E5%88%9B%E5%BB%BA%E8%B4%A6%E6%88%B7"> 注册 </a>|<a style="color: #f4ff7f;" href="https://www.hmoegirl.com/%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95"> 登录 </a>|<a a style="color: #f4ff7f;" href="https://www.hmoegirl.com/H%E8%90%8C%E5%A8%98:%E5%AE%98%E6%96%B9%E7%BE%A4%E7%BB%84"> 加入社群 </a>)<span id="NewuserTips-disable" a style="color: #f4ff7f;" class="mw-ui-destructive"> [ 不再提示 ] </span></div>');
}
$(".mw-ui-destructive").on("click", function(e) {
$("#NewuserTips").remove();
window.localStorage.setItem('NewuserTips', true);
});
});
localStorage.removeItem('NewuserTips');