pretty.js
/* The protocol includes the colon at the end */
The protocol includes the colon at the end
The protocol includes the colon at the end
function prettyProtocol(value) {
    var replacements = [
        { protocol: "http:"  , replacement: ""    },
        { protocol: "https:" , replacement: "🔒 " },
        { protocol: "mailto:", replacement: "✉️ " },
        { protocol: "tel:"   , replacement: "☎️ " },
    ];
    var item = replacements.find(r => r.protocol === value);
    if (item) {
        return item.replacement;
    }
    return protocol + "//";
}
function prettyProtocol ( value ) { var replacements = [ { protocol : "http:" , replacement : "" } , { protocol : "https:" , replacement : "🔒 " }, { protocol : "mailto:" , replacement : "✉️ " }, { protocol : "tel:" , replacement : "☎️ " }, ] ; var item = replacements . find ( r => r . protocol === value ) ; if ( item ) { return item . replacement ; } return protocol + "//" ; }
The protocol includes the colon at the end
The protocol includes the colon at the end