Widget:CreateGallery:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>=海豚=
(创建页面,内容为“<noinclude>用来输出画廊图片生成代码到id为“createGalleryBox”的div,作者User:AnnAngela,源代码参见Widget:CreateGallery/源代码。…”)
 
(文本替换 - 替换“window.RLQ.push(”为“window.addEventListener('jquery-ready', ”)
 
第1行: 第1行:
<noinclude>用来输出画廊图片生成代码到id为“createGalleryBox”的div,作者[[User:AnnAngela]],源代码参见[[Widget:CreateGallery/源代码]]。</noinclude><includeonly><!--{if !isset($wgCreateGallery) || !$wgCreateGallery}--><!--{assign var="wgCreateGallery" value=true scope="global"}--><div class="nomobile" id="createGalleryTitle">画廊代码生成框</div><div class="createGalleryBoxNoDesktop">移动版不适用画廊代码自动生成,请使用桌面版。</div><div class="nomobile" id="createGalleryError">创建画廊代码生成框失败,请刷新。</div><div class="nomobile" id="createGalleryBox"></div><script type="text/javascript">window.RLQ.push(function(){!function(a,b){return a("body").hasClass("skin-minerva")||-1!=a("title").text().indexOf("iOS")?console.debug("移动版不适用画廊代码自动生成"):("undefined"==typeof b.config.get("createGallery")&&(b.config.set("createGallery","on"),a(function(){var b,c,d,e,f,g,h;a(".createGalleryBoxNoDesktop,#createGalleryError").hide(),a("#createGalleryBox").show(),a("#createGalleryBox").append('<div id="createGallery"/>'),a("#createGallery").append('<div id="createGalleryContent"/><hr/><div id="createGalleryButton"/><hr/><div id="createGalleryOutput"/>'),a("#createGalleryContent").before("<div>输入区:</div>").after("<div>如果一行中“图片名”和“页面名”有一个不是有效值则不输出该行!</div>").append('<div id="createGalleryContentMode"/><input id="createGalleryContentLine"/><ol/>').find("#createGalleryContentLine").attr("type","button").val("点击新增一行").bind("click",function(){b=a("#createGalleryContent ol").append('<li class="createGalleryContentLine"/>').find(".createGalleryContentLine:empty").append('<input class="createGalleryContentLine1"/><input class="createGalleryContentLine2"/><input class="createGalleryContentLine3"/>'),b.find(".createGalleryContentLine1").attr({type:"input",placeholder:"图片名(不带File:或Image:前缀)"}),b.find(".createGalleryContentLine2").attr({type:"input",placeholder:"页面名"}),b.find(".createGalleryContentLine3").attr({type:"input",placeholder:"链接标题(不填则使用页面名)"})}),a("#createGalleryContentMode").append('<span>模 式:</span><input id="createGalleryMode"/>').find("#createGalleryMode").attr({type:"input",placeholder:"默认为traditional"}),a("#createGalleryButton").append('<span>操 作:</span><input id="createGalleryButton2Output"/><input id="createGalleryButton2Clear"/>'),a("#createGalleryOutput").append("<div>输出区:</div><pre/>"),a("#createGalleryButton2Output").attr("type","button").val("输出").bind("click",function(){switch(_ContentMode=a("#createGalleryMode"),c=a("#createGalleryContent .createGalleryContentLine"),g=a("#createGalleryOutput pre"),_ContentMode.val()){case"traditional":case"nolines":case"packed":case"packed-overlay":case"packed-hover":g.empty().append('&lt;gallery mode="'+_ContentMode.val()+'">');break;default:g.empty().append('&lt;gallery mode="traditional">')}c.each(function(){return h=a(this),d=h.find(".createGalleryContentLine1").val(),e=h.find(".createGalleryContentLine2").val(),f=h.find(".createGalleryContentLine3").val(),!d||!e||!d.toLowerCase().indexOf("file:")+!d.toLowerCase().indexOf("image:")?!0:(f?g.append("\nImage:"+d+"|[["+e+"|"+f+"]]|link="+e+"|alt="+e):g.append("\nImage:"+d+"|[["+e+"]]|link="+e+"|alt="+e),void 0)}),g.append("\n&lt;/gallery>")}),a("#createGalleryButton2Clear").attr("type","button").val("清空").bind("click",function(){a("#createGalleryContent ol,#createGalleryOutput pre").empty()})})),void 0)}(jQuery,mediaWiki);});</script><style type="text/css">#createGalleryBox,.skin-vector #createGalleryBoxNoDesktop{display:none}#createGalleryTitle{text-align:center;font-weight:bold}#createGallery{margin:1em;border:1px solid #a7d7f9;padding:1em}#createGallery span{height:22px}#createGallery hr{margin:1em}#createGalleryContent{margin-bottom:1em;border:1px solid #a7d7f9;padding:1em}#createGalleryContentMode{margin-bottom:1em}#createGalleryContent ol input{width:30%;margin-right:1em}</style><!--{/if}--></includeonly>
<noinclude>用来输出画廊图片生成代码到id为“createGalleryBox”的div,作者[[User:AnnAngela]],源代码参见[[Widget:CreateGallery/源代码]]。</noinclude><includeonly><!--{if !isset($wgCreateGallery) || !$wgCreateGallery}--><!--{assign var="wgCreateGallery" value=true scope="global"}--><div class="nomobile" id="createGalleryTitle">画廊代码生成框</div><div class="createGalleryBoxNoDesktop">移动版不适用画廊代码自动生成,请使用桌面版。</div><div class="nomobile" id="createGalleryError">创建画廊代码生成框失败,请刷新。</div><div class="nomobile" id="createGalleryBox"></div><script type="text/javascript">window.addEventListener('jquery-ready', function(){!function(a,b){return a("body").hasClass("skin-minerva")||-1!=a("title").text().indexOf("iOS")?console.debug("移动版不适用画廊代码自动生成"):("undefined"==typeof b.config.get("createGallery")&&(b.config.set("createGallery","on"),a(function(){var b,c,d,e,f,g,h;a(".createGalleryBoxNoDesktop,#createGalleryError").hide(),a("#createGalleryBox").show(),a("#createGalleryBox").append('<div id="createGallery"/>'),a("#createGallery").append('<div id="createGalleryContent"/><hr/><div id="createGalleryButton"/><hr/><div id="createGalleryOutput"/>'),a("#createGalleryContent").before("<div>输入区:</div>").after("<div>如果一行中“图片名”和“页面名”有一个不是有效值则不输出该行!</div>").append('<div id="createGalleryContentMode"/><input id="createGalleryContentLine"/><ol/>').find("#createGalleryContentLine").attr("type","button").val("点击新增一行").bind("click",function(){b=a("#createGalleryContent ol").append('<li class="createGalleryContentLine"/>').find(".createGalleryContentLine:empty").append('<input class="createGalleryContentLine1"/><input class="createGalleryContentLine2"/><input class="createGalleryContentLine3"/>'),b.find(".createGalleryContentLine1").attr({type:"input",placeholder:"图片名(不带File:或Image:前缀)"}),b.find(".createGalleryContentLine2").attr({type:"input",placeholder:"页面名"}),b.find(".createGalleryContentLine3").attr({type:"input",placeholder:"链接标题(不填则使用页面名)"})}),a("#createGalleryContentMode").append('<span>模 式:</span><input id="createGalleryMode"/>').find("#createGalleryMode").attr({type:"input",placeholder:"默认为traditional"}),a("#createGalleryButton").append('<span>操 作:</span><input id="createGalleryButton2Output"/><input id="createGalleryButton2Clear"/>'),a("#createGalleryOutput").append("<div>输出区:</div><pre/>"),a("#createGalleryButton2Output").attr("type","button").val("输出").bind("click",function(){switch(_ContentMode=a("#createGalleryMode"),c=a("#createGalleryContent .createGalleryContentLine"),g=a("#createGalleryOutput pre"),_ContentMode.val()){case"traditional":case"nolines":case"packed":case"packed-overlay":case"packed-hover":g.empty().append('&lt;gallery mode="'+_ContentMode.val()+'">');break;default:g.empty().append('&lt;gallery mode="traditional">')}c.each(function(){return h=a(this),d=h.find(".createGalleryContentLine1").val(),e=h.find(".createGalleryContentLine2").val(),f=h.find(".createGalleryContentLine3").val(),!d||!e||!d.toLowerCase().indexOf("file:")+!d.toLowerCase().indexOf("image:")?!0:(f?g.append("\nImage:"+d+"|[["+e+"|"+f+"]]|link="+e+"|alt="+e):g.append("\nImage:"+d+"|[["+e+"]]|link="+e+"|alt="+e),void 0)}),g.append("\n&lt;/gallery>")}),a("#createGalleryButton2Clear").attr("type","button").val("清空").bind("click",function(){a("#createGalleryContent ol,#createGalleryOutput pre").empty()})})),void 0)}(jQuery,mediaWiki);});</script><style type="text/css">#createGalleryBox,.skin-vector #createGalleryBoxNoDesktop{display:none}#createGalleryTitle{text-align:center;font-weight:bold}#createGallery{margin:1em;border:1px solid #a7d7f9;padding:1em}#createGallery span{height:22px}#createGallery hr{margin:1em}#createGalleryContent{margin-bottom:1em;border:1px solid #a7d7f9;padding:1em}#createGalleryContentMode{margin-bottom:1em}#createGalleryContent ol input{width:30%;margin-right:1em}</style><!--{/if}--></includeonly>

2022年11月20日 (日) 17:14的最新版本

用来输出画廊图片生成代码到id为“createGalleryBox”的div,作者User:AnnAngela,源代码参见Widget:CreateGallery/源代码