Module:EmailTracking

De Wikivoyage

La documentation pour ce module peut être créée à Module:EmailTracking/doc

local i = {}
 
function i.EmailTracking(frame)
    local output = '';
    local email = frame.args["email"] or '';
    local demo = frame.args["demo"] or '';
    local catprefix = '';

    if mw.ustring.match(email,'@.*@') ~= nil then
        if demo == 'true' then
            catprefix = ':';
        end
        output = '[[' .. catprefix .. 'Catégorie:Listing avec plusieurs adresses email]]<span class="mailinfo debuginfo" style="display:none;">PLUSIEURS-ADRESSES-EMAIL</span>';
    end
    if mw.title.getCurrentTitle().namespace ~= 0 and demo == '' then
        output = '';
    end
    return output;
end
 
return i;