跳至主要內容

TOOLFK tool-online Morse code translation and conversion tool

The [TOOLFK] online Morse code translation and conversion tool to be recommended in this article provides an online Morse code conversion function.

Code teaching

This tool [Online Morse Code Translation and Conversion Tool] depends on the following plugins
https://github.com/hustcc/xmorse
STEP 1 interface

STEP2
The front-end code of online Morse code is as follows
var sourceArea = toolfk.create_codeMirror('code');
var targetArea = toolfk.create_codeMirror('result');

sourceArea.setValue(DEFAULT_VALUE);
$(".btn-encode").click(function(){
    toolfk.encode_morse({
        source:sourceArea,
        target:targetArea
    });
});

$(".btn-decode").click(function(){
    toolfk.decode_morse({
        source:sourceArea,
        target:targetArea
    });
});

$(".copy-code").click(function(){
    toolfk.code_code({
        source:sourceArea,
        target:targetArea,
    });
});
decode_morse:function(options){
        if (toolfk.beautify_default.beautify_in_progress) {
            return;
        }
        var opts = $.extend({},toolfk.beautify_default, options);

        var source = opts.source.getValue();
        if(source==''){
            return layer.msg(NOT_EMPTY);
        }
        toolfk.beautify_default.beautify_in_progress = true;

        var index   = layer.load();
        var value   = xmorse.decode(source);

        if(!value){
            value   =   DEFAULT_VALUE;
        }
        opts.target.setValue(value);

        layer.close(index);
        toolfk.report('morse_decode',value);
        toolfk.beautify_default.beautify_in_progress = false;
    },


留言

此網誌的熱門文章

BASE64-line encryption and decryption, UrlEncode encoding / decoding, native / ascii online conversion tool - toolfk online Programmer toolbox

   This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox  ,...

Use PHP CURL simulate HTTP requests for online tool -toolfk online Programmer toolbox

      This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox...

PHP to achieve pseudo-original free online tools - toolfk online Programmer toolbox

      This paper to recommend [ToolFk] is a programmers often use a free online test kit, ToolFk feature is focused on everyday programmer development tools, without having to install any software, as long as the content execution affixed by a button, able to obtain the contents of the desired results. ToolFk also supports    BarCode Barcode generated online  ,   QueryList collector  ,   PHP code is run online  ,   PHP confusion, encryption, decryption  ,   Python code is run online  ,  JavaScript online operation  , YAML formatting tools  ,  HTTP simulation query tool  ,  HTML online toolbox  ,  JavaScript online Toolbox  , CSS online toolbox  ,  JSON online toolbox  ,  unixtime timestamp conversion  ,  Base64 / the URL of / native2ascii conversion  ,  CSV conversion kit  ,  XML online toolbox...