App-Alice

 view release on metacpan or  search on metacpan

inc/Module/Install/Makefile.pm  view on Meta::CPAN

BEGIN {
	$VERSION = '1.00';
	@ISA     = 'Module::Install::Base';
	$ISCORE  = 1;
}

sub Makefile { $_[0] }

my %seen = ();

sub prompt {
	shift;

	# Infinite loop protection
	my @c = caller();
	if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
		die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
	}

	# In automated testing or non-interactive session, always use defaults
	if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) {
		local $ENV{PERL_MM_USE_DEFAULT} = 1;
		goto &ExtUtils::MakeMaker::prompt;
	} else {
		goto &ExtUtils::MakeMaker::prompt;
	}
}

# Store a cleaned up version of the MakeMaker version,
# since we need to behave differently in a variety of
# ways based on the MM version.
my $makemaker = eval $ExtUtils::MakeMaker::VERSION;

# If we are passed a param, do a "newer than" comparison.
# Otherwise, just return the MakeMaker version.

share/static/alice.js  view on Meta::CPAN

    audio.play();
    image.onclick = function() {
      audio.pause();
      this.src = '/static/image/play.png';
      this.onclick = function () { Alice.playAudio(this, audio) };
    };
  },

  prefs: {
    addHighlight: function (alias) {
		  var channel = prompt("Enter a word to highlight.");
		  if (channel)
		    $('highlights').insert("<option value=\""+channel+"\">"+channel+"</option>");
		  return false;
		},

    removeHighlights: function (alias) {
		  $A($('highlights').options).each(function (option) {
		    if (option.selected) option.remove()});
		  return false;
		},

share/static/alice.js  view on Meta::CPAN

		  };
		},

    showConnection: function (alias) {
		  $$("div#servers .active").invoke("removeClassName","active");
			$("setting_" + alias).addClassName("active");
			$("menu_" + alias).addClassName("active");
	  },

    addChannel: function (alias) {
			var channel = prompt("Please enter a channel name.");
			if (channel)
			  $("channels_" + alias).insert("<option value=\""+channel+"\">"+channel+"</option>");
			return false;
	  },

    addCommand: function (alias) {
			var command = prompt("Please enter a channel name.");
			if (command)
			  $("on_connect_" + alias).insert("<option value=\""+command+"\">"+command+"</option>");
			return false;
		},

    removeCommands: function (alias) {
			$A($("on_connect_" + alias).options).each(function (option) {
			if (option.selected) option.remove()});
			  return false;
		},

    removeChannels: function (alias) {
			$A($("channels_" + alias).options).each(function (option) {
			if (option.selected) option.remove()});
			  return false;
		},

    addServer: function () {
			var name = prompt("Please enter a name for this server.");
			if (! name) return;
			new Ajax.Request("/serverconfig", {
			  parameters: {name: name},
			  method: 'get',
			  onSuccess: function (trans) {
			    var data = trans.responseText.evalJSON();
			    $$('#config_data div.setting').invoke('removeClassName',"active");
			    $$('#servers li').invoke('removeClassName',"active");
			    $('config_data').insert(data.config);
			    $('connections').insert(data.listitem);



( run in 2.319 seconds using v1.01-cache-2.11-cpan-6aa56a78535 )