View source code = ADD ANONYMOUS NOTEPAD FREE WIDGET TO YOUR BLOG

 


To add this anonymous notepad as widget to your blog just add source code to htlm/javascript gadget 

1. Go to Layout (in blogger menu)

2. press ''add a gadget'' (usually on sidebar)

3.then press HTLM/JAVASCRIPT

4.copy and paste text bellow 

enjoy new widget 

------------------------------------------------------------------------

                               SOURCE CODE :

------------------------------------------------------------------------



<!doctype html>


 SIMPLE ANONYMOUS NOTEPAD


  <link rel="stylesheet" href="//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css" />


  <link rel="stylesheet" href="/resources/demos/style.css" />


  <style>


  #dialog label, #dialog input { display:block; }


  #dialog label { margin-top: 0.5em; }


  #dialog input, #dialog textarea { width: 95%; }


  #tabs { margin-top: 1em; }


  #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }


  #add_tab { cursor: pointer; }


  </style>


  <script src="https://code.jquery.com/jquery-3.6.0.js"></script>


  <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>


  <script>


  $( function() {


    var tabTitle = $( "#tab_title" ),


      tabContent = $( "#tab_content" ),


      tabTemplate = "<li><a href='#{href}'>#{label}</a> <span class='ui-icon ui-icon-close' role='presentation'>Remove Tab</span></li>",


      tabCounter = 2;


 


    var tabs = $( "#tabs" ).tabs();


 


    // Modal dialog init: custom buttons and a "close" callback resetting the form inside


    var dialog = $( "#dialog" ).dialog({


      autoOpen: false,


      modal: true,


      buttons: {


        Add: function() {


          addTab();


          $( this ).dialog( "close" );


        },


        Cancel: function() {


          $( this ).dialog( "close" );


        }


      },


      close: function() {


        form[ 0 ].reset();


      }


    });


 


    // AddTab form: calls addTab function on submit and closes the dialog


    var form = dialog.find( "form" ).on( "submit", function( event ) {


      addTab();


      dialog.dialog( "close" );


      event.preventDefault();


    });


 


    // Actual addTab function: adds new tab using the input from the form above


    function addTab() {


      var label = tabTitle.val() || "Tab " + tabCounter,


        id = "tabs-" + tabCounter,


        li = $( tabTemplate.replace( /#\{href\}/g, "#" + id ).replace( /#\{label\}/g, label ) ),


        tabContentHtml = tabContent.val() || "Tab " + tabCounter + " content.";


 


      tabs.find( ".ui-tabs-nav" ).append( li );


      tabs.append( "<div id='" + id + "'><p>" + tabContentHtml + "</p></div>" );


      tabs.tabs( "refresh" );


      tabCounter++;


    }


 


    // AddTab button: just opens the dialog


    $( "#add_tab" )


      .button()


      .on( "click", function() {


        dialog.dialog( "open" );


      });


 


    // Close icon: removing the tab on click


    tabs.on( "click", "span.ui-icon-close", function() {


      var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" );


      $( "#" + panelId ).remove();


      tabs.tabs( "refresh" );


    });


 


    tabs.on( "keyup", function( event ) {


      if ( event.altKey && event.keyCode === $.ui.keyCode.BACKSPACE ) {


        var panelId = tabs.find( ".ui-tabs-active" ).remove().attr( "aria-controls" );


        $( "#" + panelId ).remove();


        tabs.tabs( "refresh" );


      }


    });


  } );


  </script>






 


<div id="dialog" title="Tab data">


  <form>


    <fieldset class="ui-helper-reset">


      <label for="tab_title">Title</label>


      <input type="text" name="tab_title" id="tab_title" value="Tab Title" class="ui-widget-content ui-corner-all" />


      <label for="tab_content">Content</label>


      <textarea name="tab_content" id="tab_content" class="ui-widget-content ui-corner-all">Tab content</textarea>


    </fieldset>


  </form>


</div>


 


<button id="add_tab">Add Tab</button>


 


<div id="tabs">


  <ul>


    <li><a href="#tabs-1">Welcome</a> <span class="ui-icon ui-icon-close" role="presentation">Remove Tab</span></li>


  </ul>


  <div id="tabs-1">


    <p>Anonymous NOTEPAD(2.0) 1. simply click add tab + 2. write title and description + 3. content created visible to only you it's htlm with javascript + 4. once finish to delete all simply refresh the page or press (CTRL + R) </p>


  </div>


</div>


 


 




</!doctype>

Comments