Checkbox to "not show again" tutorial

Hi, you can integrate this dialog function in github of f7,
and if it is possible for Alert and Confirm methods, it will be more appreciated, Thanks

//Checkbox to not show again

app.on(‘dialogOpen’, function (event) {

var tipo = event.params.DoNotShowAgain || false;

if (!tipo || event.app.params.dialog.DoNotShowAgain == false) return;

var hashCode = function(txt) {
  var hash = 0, i, chr;
  if (txt.length === 0) return hash;
  for (i = 0; i < txt.length; i++) {
    chr   = txt.charCodeAt(i);
    hash  = ((hash << 5) - hash) + chr;
    hash |= 0; // Convert to 32bit integer
  }
  return hash;
}

event.hash = event.params.id || hashCode((event.params.title || "") + (event.params.text || ""));

event.hashes = JSON.parse(localStorage.getItem("DoNotShowAgain") || "[]");

if (event.hashes.indexOf(event.hash) != -1) {
    event.close();
    return;
}

var msg = '<br /><br /><label class="checkbox"><input class="DoNotShowAgain" type="checkbox"><i class="icon-checkbox"></i></label> ';

msg += tipo != true ? tipo : event.app.params.dialog.DoNotShowAgain || 'No volver a mostrar este mensaje.';

event.setText((event.params.text || "") + msg);

});

app.on(‘dialogClosed’, function (event) {
var el = event.el.getElementsByClassName(“DoNotShowAgain”) || [0];
if (el[0] && el[0].checked) {
event.hashes.push(event.hash);
localStorage.setItem(“DoNotShowAgain”, JSON.stringify(event.hashes));
}
});

image