Changes

Jump to navigation Jump to search
no edit summary
Line 1: Line 1: −
mw.notify( $('<span>storage</span>') );
   
mw.loader.using( 'oojs-ui-core' ).done( function () {
 
mw.loader.using( 'oojs-ui-core' ).done( function () {
 
$( function () {
 
$( function () {
Line 30: Line 29:       −
save.on( 'click', function () {
+
        save.on( 'click', function () {
            alert(radio.getData());
   
    if (radio.getData() == "cookie") {
 
    if (radio.getData() == "cookie") {
 
             mw.cookie.set( key.getValue(), value.getValue() );
 
             mw.cookie.set( key.getValue(), value.getValue() );
Line 38: Line 36:  
             mw.storage.set( key.getValue(), value.getValue() );
 
             mw.storage.set( key.getValue(), value.getValue() );
 
  }});
 
  }});
 +
 +
show.on( 'click', function () {
 +
  if (radio.getData() == "cookie") {
 +
            info.setLabel(mw.cookie.get(key.getValue()));}
 +
      else {
 +
            info.setLabel(mw.storage.get(key.getValue()));}
 +
          mw.notify($('<span>'+radio.getData()+'</span>') );
 +
          });
 
 
 
   $( '#mw-content-text' ).prepend(
 
   $( '#mw-content-text' ).prepend(

Navigation menu