微件:AnchorCore:修订间差异

来自Limbo Wiki
((目移))
(测试)
第8行: 第8行:
</style>
</style>
<script>
<script>
(RLQ=window.RLQ||[]).push(function(){ mw.loader.implement("lw.anchor",function($,jQuery,require,module){
((RLQ=window.RLQ||[]).push(function(){ mw.loader.implement("lw.anchor",function($,jQuery,require,module){
  $(".lw-AnchorError").ready(function(){
  $(".lw-AnchorError").ready(function(){
$(".lw-AnchorError").hide();
$(".lw-AnchorError").hide();
第15行: 第15行:
a = $(this).attr("href");
a = $(this).attr("href");
if(a.substr(0,1) = "#"){
if(a.substr(0,1) = "#"){
alert("test");
a = $(a);
a = $(a);
if(a.length == 0){$("#Anchor-Default").show();}else{$("#Anchor-Default").css("display","DEFAULT");}
if(a.length == 0){$("#Anchor-Default").show();}
else{$("#Anchor-Default").attr("style","");}
}
}
});
});

2022年8月27日 (六) 03:45的版本

<style> .lw-Anchor {

 display:none;

} .lw-Anchor:target {

 display:block;

} </style> <script> ((RLQ=window.RLQ||[]).push(function(){ mw.loader.implement("lw.anchor",function($,jQuery,require,module){

$(".lw-AnchorError").ready(function(){

$(".lw-AnchorError").hide(); if(location.hash == ){$("#Anchor-Default").show();} $("a").click(function(){ a = $(this).attr("href"); if(a.substr(0,1) = "#"){ alert("test"); a = $(a); if(a.length == 0){$("#Anchor-Default").show();} else{$("#Anchor-Default").attr("style","");} } }); }); });});

</script>