「モジュール:YouTube channel」の版間の差分
いったん連携中止 タグ: 手動差し戻し |
編集の要約なし |
||
| (2人の利用者による、間の4版が非表示) | |||
| 38行目: | 38行目: | ||
url = mw.ustring.gsub(formatterURL, "\$1", y_user); | url = mw.ustring.gsub(formatterURL, "\$1", y_user); | ||
end | end | ||
-- YouTube handles: A new way to identify your YouTube channel | |||
local handle = args.handle or ''; | |||
if handle == '' then | |||
v_handle = ''; | |||
else | |||
local y_handle = handle | |||
v_handle = '(@' ..handle.. ')'; | |||
formatterURL = "https://www.youtube.com/@$1"; | |||
url = mw.ustring.gsub(formatterURL, "\$1", y_handle); | |||
end | |||
-- YouTube channel 表示名 | -- YouTube channel 表示名 | ||
| 59行目: | 70行目: | ||
v_music = ''; | v_music = ''; | ||
else | else | ||
verify ='true'; | |||
v_music = '♪'; | v_music = '♪'; | ||
end | end | ||
--YouTube channel 表示名デフォルト | --YouTube channel 表示名デフォルト | ||
| 70行目: | 82行目: | ||
-- SemanticMediaWiki | -- SemanticMediaWiki | ||
local dataStore = {} | local dataStore = {} | ||
dataStore['YouTubeRecord'] = '' .. | dataStore['YouTubeRecord'] = '' ..y_id .. ';'..name .. ';'..verify | ||
-- if not args.nosmw then | -- if not args.nosmw then | ||
| 76行目: | 88行目: | ||
-- end | -- end | ||
return '[' ..url ..' ' ..name ..'] ' ..v_music ..v_veryfy ..' - [[YouTube]]'; | return '[' ..url ..' ' ..name ..']' ..v_handle ..v_music ..v_veryfy ..' - [[YouTube]]'; | ||
end | end | ||
return p; | return p; | ||