eai04191
6/11/2017 - 12:26 PM

It is a plug-in that converts '5000 trillion yen' to 5000 trillion yen. regex by https://github.com/nekowen/5000-trillion-yen-converter

It is a plug-in that converts '5000 trillion yen' to 5000 trillion yen. regex by https://github.com/nekowen/5000-trillion-yen-converter

//META{"name":"_5kTriYen"}*//

var _5kTriYen = function () {};

_5kTriYen.prototype.convert = function () {
    var style = `
        height: 3em;
        vertical-align: top;
        `;
    $('.markup').each(function() {
        var txt = $(this).html();
        $(this).html(txt
            .replace(/(5000|5000)兆円/g, `<img src="https://i.imgur.com/fLG2rJf.png" style="${style}">`)
            .replace(/円/g, `<img src="https://i.imgur.com/fIWY4u6.png" style="${style}">`)
            .replace(/(ほ|欲)しい/g, `<img src="https://i.imgur.com/TiU8D8i.png" style="${style}">`)
            .replace(/!/g, `<img src="https://i.imgur.com/XFrjU7D.png" style="${style}">`)
            .replace(/森(鴎|鷗)外/g, `<img src="https://i.imgur.com/9v7kPLL.png" style="${style}">`)
        );
    });
}

_5kTriYen.prototype.start = function () {
    this.convert();
};

_5kTriYen.prototype.load = function () {

};

_5kTriYen.prototype.unload = function () {}
;

_5kTriYen.prototype.stop = function () {

};

_5kTriYen.prototype.onMessage = function () {
    //called when a message is received
    this.convert();
};

_5kTriYen.prototype.onSwitch = function () {
    //called when a server or channel is switched
    this.convert();
};

_5kTriYen.prototype.observer = function (e) {
    //raw MutationObserver event for each mutation
};

_5kTriYen.prototype.getSettingsPanel = function () {
    return "<h3>Nothing</h3>";
};

_5kTriYen.prototype.getName = function () {
    return "5000 trillion yen Converter";
};

_5kTriYen.prototype.getDescription = function () {
    return "It is a plug-in that converts '5000 trillion yen' to 5000 trillion yen";
};

_5kTriYen.prototype.getVersion = function () {
    return "0.4.1";
};

_5kTriYen.prototype.getAuthor = function () {
    return "Eai";
};