「モジュール:SHOWROOM」の版間の差分

ページの作成:「local p = {}; local function setProperty(sr_name) -- メイン空間のみ if not mw.title.getCurrentTitle().namespace == 0 then return true; end if not mw.smw…」
 
Motodai (トーク | 投稿記録)
エラー解消
 
(他の1人の利用者による、間の1版が非表示)
32行目: 32行目:
-- SHOWROOM URL
-- SHOWROOM URL
local formatterURL = "https://www.showroom-live.com/$1";
local formatterURL = "https://www.showroom-live.com/$1";
local url = mw.ustring.gsub(formatterURL, "\$1", sr_name);
local url = mw.ustring.gsub(formatterURL, "$1", sr_name);
-- SHOWROOM 表示名
-- SHOWROOM 表示名
48行目: 48行目:
end
end


local sr_name2 = '(@' .. sr_name  ..')';
return '[' ..url ..' ' ..name ..'] - [[SHOWROOM]]';
if mw.ustring.match(name, '%(' .. sr_name .. '%)$') then
sr_name2 = '';
end
 
return '[' ..url ..' ' ..name ..'] ' ..sr_name2 ..' - [[SHOWROOM]]';
end
end


return p;
return p;