custom url for blogger || title to custom URL for blogger

Replacing spaces with underscores


Using This Tool You can convert a Title in URL Like this take a look!
Use this tool, You can save your time to to converting a title in URL like
Remove space than  add - or _ etc.
In update I will add more Special charecter like - " - + _ ";

After converting the text just copy and past in custom url section in your blog right side and update it.

Project Using jQuery UI - Live demo

Source code ---

<html> 
    <head> 
        <title> 
            Replacing spaces with underscores
        </title>
    </head> 
      
    <body style = "text-align:center;">    
        <input type="text" id="Pre_sufix" placeholder="add any for a prefix or sufix!" >
       <select name = "sel" id="prefix" >
            <option value="prefix">Prifix</option>
            <option value="sufix">Sufix</option>
        </select>      
        <input type="text" id = "inputTxt" style = "font-size: 16px; font-weight: bold;">   
          
        <button onclick = "convert_fun()"> 
            Click here
        </button>
          
        <p id = "output" style = 
            "color:green; font-size: 20px; font-weight: bold;">
        </p>
        <input type='text' id='copyText' style="display:none;">
         <button id="copy" onclick="myFunction();">Copy text</button> <button type="reset" id="reset">Reset</button>
       <br/> <div id="alert"> </div>
 
 
       <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js">
</script>
        <script>
 

          function convert_fun() {
           
           

             var el_down = document.getElementById("output");
              
            var text  =  document.getElementById("inputTxt").value;
               var str = text.toLowerCase();   
               var newstr;  
               if($("#prefix").val() == "prefix"){
                newstr = $('#Pre_sufix').val()+str;
                }else
                {
                    newstr =  str+$('#Pre_sufix').val();
                }  

                el_down.innerHTML = newstr.split(' ').join('-');
               document.getElementById('copyText').value =  newstr.split(' ').join('-');
            
            }  
            
            $(document).ready(function(){
                $('#Pre_sufix').val(localStorage.getItem("Pre_sufix"));
                localStorage.setItem("Pre_sufix",$('#Pre_sufix').val());
              $("#copy").click(function() {
                var copyText = document.getElementById("copyText");

                    /* Select the text field */
                    copyText.select();
                    copyText.setSelectionRange(0, 99999); /* For mobile devices */

                    /* Copy the text inside the text field */
                    navigator.clipboard.writeText(copyText.value);
                    
                    /* Alert the copied text */
                    const myTimeout = setTimeout($('#alert').val(''), 500);
                    $('#alert').val("Copied the text: " + copyText.value);
            });

          
            


            $("#reset").click(function() {
                $("#Pre_sufix").val("");
                $("#inputTxt").val("");
                $("#copyText").val("");
            });


         });
        </script> 
    </body> 
</html>    

More About JavaScript- Project on js


Note - If You like this post than please comment a nice line and share it.
Tags -

custom domain for blogger,how to change url in blogger,how to create customized blog url in blogger,how to create custom url in blogger,how to connect custom domain on blogger,how to setup custom domain on blogger,how to add custom domain on blogger,custom domain,how to change blogspot domain,blogger,blogger me customized url kaise banaye,customized,custom,blogging,blogging mafia,url,for,how to buy domain from godaddy,beginners,uttam_kumar,set,post,posts,sabdss,how,tips

Post a Comment

0 Comments