跳至主要內容

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;
    },


留言

此網誌的熱門文章

TOOLFK tool-online QR code decoding tool

This article recommends [TOOLFK] online QR code decoding,  online QR code decoder  , you can get the  QR code  by dragging or uploading the QR code picture, computer camera scanning the QR code, entering the QR code picture address, etc. Content. Website name: ToolFk website link:  https://www.toolfk.com/Tool link:  https://www.toolfk.com/tool-generate-qrcode?t=qrdecode Code teaching The code base that this tool [online QR code decoding tool] depends on is  https://github.com/davidshimjs/qrcodejs STEP 1 STEP 2 The core code is as follows function renderLogo ( canvas, url ) { var img = new Image(), ctx = canvas.getContext( '2d' ), canvasSize = 200 ; if (!url) { ctx.fillStyle = 'rgb(255, 255, 255)' ; ctx.fillRect( 0 , 0 , canvasSize, canvasSize); return ; } img.onload = function ( ) { var imgSize, zoom, imgW = img.width, imgH = img.height; ...

How to Download tencent video online for free? tencent Video Downloader -VideoFK

In line to see some friends in the query how to download tencent video on the computer, and this article will be introduced "  Videofk.com  " is a free tencent video online video download site, download method is very simple, just copy the video link, paste it into the query box, click on the search button, then you can quickly save mp4 videos to your PC or mobile phone. Visit website link:  https://www.videofk.com/weishi-video-download Tutorial STEP 1 Open   Videofk   website, you need to download the tencent video link to copy and paste it into the bottom, click on the search button below to obtain cover art and movie download button. STEP 2 In  Videofk  After parsing the video?, Are the following methods for you to download? Choose. 1, click on the top cover map of the "  Download  " button to quickly download videos to the local. 2, click on the cover drawing any position, a window will pop up, w...

HTML online for code formatting, beautification, encryption, decryption, compression, turn a key 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  ,...