App-Alice

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

MANIFEST			This list of files
MANIFEST.SKIP
META.yml
share/commands.pl
share/log.db
share/log.sql
share/static/alice-dark.css
share/static/alice-default.css
share/static/alice.js
share/static/favicon.ico
share/static/image/alice.png
share/static/image/aquaTabClose.png
share/static/image/background-self.png
share/static/image/background.png
share/static/image/config.png
share/static/image/formatting.png
share/static/image/overflow-active.png
share/static/image/overflow.png
share/static/image/pause.png
share/static/image/play.png
share/static/image/privateChatTab.png
share/static/image/privateChatTabNewMessage.png
share/static/image/roomTab.png
share/static/image/roomTabDisabled.png
share/static/image/roomTabNewHighlightMessage.png
share/static/image/roomTabNewMessage.png
share/static/image/shadow-bottom.png
share/static/image/shadow-top.png
share/static/image/smartTranscriptTab.png
share/static/image/smartTranscriptTabActivity.png
share/static/image/speech.png
share/static/image/sprites.acorn
share/static/image/sprites.png
share/static/image/terminal.png
share/templates/announcement.html
share/templates/avatargrid.html
share/templates/event.html
share/templates/help.html
share/templates/index_footer.html
share/templates/index_head.html
share/templates/login.html
share/templates/logs.html
share/templates/message.html
share/templates/new_server.html

lib/App/Alice/IRC.pm  view on Meta::CPAN


sub nick_avatar {
  my ($self, $nick) = @_;
  my $info = $self->get_nick_info($nick);
  if ($info and $info->{real}) {
    if ($info->{real} =~ /([^<\s]+@[^\s>]+\.[^\s>]+)/) {
      my $email = $1;
      return "http://www.gravatar.com/avatar/"
           . md5_hex($email) . "?s=32&amp;r=x";
    }
    elsif ($info->{real} =~ /(https?:\/\/\S+(?:jpe?g|png|gif))/) {
      return $1;
    }
    else {
      return undef;
    }
  }
}

sub whois_table {
  my ($self, $nick) = @_;

share/static/alice-dark.css  view on Meta::CPAN

  border: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  font-size: 12px; }

select#tab_overflow_overlay option.unread {
  font-weight: bold; }

li#tab_overflow_button {
  background: url(image/sprites.png) 3px -174px no-repeat; }

li#tab_overflow_button.unread {
  background: url(image/sprites.png) 3px -194px no-repeat; }

li#config_button {
  background: url(image/sprites.png) 4px -216px no-repeat; }

body {
  font-family: "Lucida Grande", Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  background: #222222; }

a:link, a:visited, a:hover, a:active {
  color: white; }

a:hover {

share/static/alice-dark.css  view on Meta::CPAN

  overflow: hidden;
  position: absolute;
  right: -170px;
  padding-right: 8px;
  top: -3px;
  width: 180px;
  height: 20px;
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
  background: url(image/sprites.png) 0px -240px no-repeat black;
  z-index: 902;
  opacity: 0.2;
  -webkit-transition-property: right;
  -webkit-transition-duration: 0.3s; }

tr.input div.editor_toolbar button {
  visibility: hidden;
  display: block;
  float: left;
  color: #222222;

share/static/alice-dark.css  view on Meta::CPAN

  color: white;
  text-decoration: none; }

div.tab_button {
  width: 16px;
  height: 16px;
  float: left;
  margin-right: 6px; }

li.channel_tab div.tab_button {
  background: url(image/sprites.png) 0px -80px no-repeat; }

li.privmsg_tab div.tab_button {
  background: url(image/sprites.png) 0px -120px no-repeat; }

li.info_tab div.tab_button {
  background: url(image/sprites.png) 0px 0px no-repeat; }

ul#tabs li.active div.tab_button:hover {
  background: url(image/sprites.png) 1px -260px no-repeat; }

ul#tabs li.unread.channel_tab div.tab_button {
  background: url(image/sprites.png) 0px -20px no-repeat; }

ul#tabs li.unread.privmsg_tab div.tab_button {
  background: url(image/sprites.png) 0 -100px no-repeat; }

ul#tabs li.highlight.channel_tab div.tab_button {
  background: url(image/sprites.png) 0 -40px no-repeat; }

ul#tabs li.disabled.channel_tab div.tab_button {
  background: url(image/sprites.png) 0 -60px no-repeat; }

div#logsearch {
  background: #eee;
  border-bottom: 1px solid #999;
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  height: 28px;
  padding: 5px 0 0 0; }

share/static/alice-dark.css  view on Meta::CPAN

  list-style: none; }

ul#logresults li.context ul li {
  border: none;
  margin: 0;
  padding: 2px 0; }

ul#logresults li.context {
  border-top: 1px solid #999;
  border-bottom: 1px solid #999;
  background: url(image/shadow-bottom.png) bottom left repeat-x, url(image/shadow-top.png) top left repeat-x #eeeeee; }

ul#logresults span.metadata {
  font-size: 0.7em;
  color: #666; }

div#help {
  position: absolute;
  z-index: 999;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;

share/static/alice-default.css  view on Meta::CPAN

  border: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  font-size: 12px; }

select#tab_overflow_overlay option.unread {
  font-weight: bold; }

li#tab_overflow_button {
  background: url(image/sprites.png) 3px -174px no-repeat; }

li#tab_overflow_button.unread {
  background: url(image/sprites.png) 3px -194px no-repeat; }

li#config_button {
  background: url(image/sprites.png) 4px -216px no-repeat; }

body {
  font-family: "Lucida Grande", Helvetica, sans-serif;
  text-rendering: optimizeLegibility;
  background: white; }

a:link, a:visited, a:hover, a:active {
  color: #0033cc; }

a:hover {

share/static/alice-default.css  view on Meta::CPAN

  overflow: hidden;
  position: absolute;
  right: -170px;
  padding-right: 8px;
  top: -3px;
  width: 180px;
  height: 20px;
  -webkit-border-radius: 3px 0 0 3px;
  -moz-border-radius: 3px 0 0 3px;
  border-radius: 3px 0 0 3px;
  background: url(image/sprites.png) 0px -240px no-repeat black;
  z-index: 902;
  opacity: 0.2;
  -webkit-transition-property: right;
  -webkit-transition-duration: 0.3s; }

tr.input div.editor_toolbar button {
  visibility: hidden;
  display: block;
  float: left;
  color: #eeeeee;

share/static/alice-default.css  view on Meta::CPAN

  color: black;
  text-decoration: none; }

div.tab_button {
  width: 16px;
  height: 16px;
  float: left;
  margin-right: 6px; }

li.channel_tab div.tab_button {
  background: url(image/sprites.png) 0px -80px no-repeat; }

li.privmsg_tab div.tab_button {
  background: url(image/sprites.png) 0px -120px no-repeat; }

li.info_tab div.tab_button {
  background: url(image/sprites.png) 0px 0px no-repeat; }

ul#tabs li.active div.tab_button:hover {
  background: url(image/sprites.png) 1px -260px no-repeat; }

ul#tabs li.unread.channel_tab div.tab_button {
  background: url(image/sprites.png) 0px -20px no-repeat; }

ul#tabs li.unread.privmsg_tab div.tab_button {
  background: url(image/sprites.png) 0 -100px no-repeat; }

ul#tabs li.highlight.channel_tab div.tab_button {
  background: url(image/sprites.png) 0 -40px no-repeat; }

ul#tabs li.disabled.channel_tab div.tab_button {
  background: url(image/sprites.png) 0 -60px no-repeat; }

div#logsearch {
  background: #eee;
  border-bottom: 1px solid #999;
  position: fixed;
  top: 0px;
  left: 0px;
  right: 0px;
  height: 28px;
  padding: 5px 0 0 0; }

share/static/alice-default.css  view on Meta::CPAN

  list-style: none; }

ul#logresults li.context ul li {
  border: none;
  margin: 0;
  padding: 2px 0; }

ul#logresults li.context {
  border-top: 1px solid #999;
  border-bottom: 1px solid #999;
  background: url(image/shadow-bottom.png) bottom left repeat-x, url(image/shadow-top.png) top left repeat-x #eeeeee; }

ul#logresults span.metadata {
  font-size: 0.7em;
  color: #666; }

div#help {
  position: absolute;
  z-index: 999;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;

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

        title: message.window.title + ": " + message.nick,
        description: message.body.unescapeHTML(),
        priority: 1,
        sticky: false,
        identifier: message.msgid
      });
    }
    else if (window.webkitNotifications) {
      if (window.webkitNotifications.checkPermission() == 0) {
        var popup = window.webkitNotifications.createNotification(
          "http://static.usealice.org/image/alice.png",
          message.window.title + ": " + message.nick,
          message.body.unescapeHTML()
        );

        popup.ondisplay = function() {
          setTimeout(function () {popup.cancel();}, 3000);
        };

        popup.show();
      }

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

    }
    image.style.display = 'block';
    image.style.visibility = 'visible';
    setTimeout(function () {
      var messagelist = image.up(".message_wrap");
      messagelist.scrollTop = messagelist.scrollHeight;
    }, 50);
  },

  playAudio: function(image, audio) {
    image.src = '/static/image/pause.png';
    if (! audio) {
      var url = image.nextSibling.href;
      audio = new Audio(url);
      audio.addEventListener('ended', function () {
        image.src = '/static/image/play.png';
        image.onclick = function () { Alice.playAudio(image, audio) };
      });
    }
    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;

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

    window.onorientationchange = function() {
      alice.activeWindow().scrollToBottom(true);
    };


    alice.addFilters([
      function(content) {
        var filtered = content;
        filtered = filtered.replace(
          /(<a href=\"(:?.*?\.(:?wav|mp3|ogg|aiff|m4a))")/gi,
          "<img src=\"/static/image/play.png\" " +
          "onclick=\"Alice.playAudio(this)\" class=\"audio\"/>$1");
        return filtered;
      },
      function (content) {
        var filtered = content;
        if (alice.options.images == "show") {
          filtered = filtered.replace(
            /(<a[^>]*>)([^<]*\.(:?jpe?g|gif|png|bmp|svg)(:?\?v=0)?)</gi,
            "$1<img src=\"http://i.usealice.org/$2\" onload=\"Alice.loadInlineImage(this)\" " +
            "alt=\"Loading Image...\" title=\"$2\" style=\"display:none\"/><");
        }
        return filtered;
      }
    ]);
  });
}

share/templates/index_head.html  view on Meta::CPAN

? my ($app, @windows) = @_;
? my $titlewin = @windows > 1 ? $windows[1] : $windows[0];
<!DOCTYPE html>
<html>
  <head>
    <title><?= $titlewin->title ?></title>
    <script type="text/javascript" src="<?= $app->static_url("alice.js") ?>?images=<?= $_[0]->config->images || 'show' ?>&amp;debug=<?= $app->config->show_debug ? 'true' : 'false' ?>&amp;timeformat=<?= $app->config->timeformat ?>&amp;mtime=1272819991...
    <link rel="shortcut icon" href="<?= $app->static_url("favicon.ico") ?>">
    <link type="text/css" rel="stylesheet" href="<?= $app->static_url("alice-".$app->config->style.".css") ?>" />
    <link rel="apple-touch-icon" href="<?= $app->static_url("image/alice.png") ?>" />
    <link rel="apple-touch-startup-image" href="<?= $app->static_url("image/alice.png") ?>" />
    <meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
  </head>
  <body>
    <img style="position:absolute;top:-100px;left:-100px" src="<?= $app->static_url("image/sprites.png") ?>" />
    <div id="container">
      <ul id="controls">
        <li id="config_button">
          <select class="select_overlay" id="config_overlay">
            <option value="Logs">Logs</option>
            <option value="Preferences">Preferences</option>
            <option value="Connections">Connections</option>
            <option value="Help">Help</option>
            <? if ($_[0]->auth_enabled) { ?>
            <option disabled>──────</option>

share/templates/login.html  view on Meta::CPAN

        font-size: 16px;
        margin-bottom: 0;
        margin-top: 30px;
      }
      .error {
        color: #d00b0b;
        display: block;
        margin-top: 15px;
      }
    </style>
    <link rel="apple-touch-icon" href="<?= $app->static_url("image/alice.png") ?>" />
    <link rel="apple-touch-startup-image" href="<?= $app->static_url("image/alice.png") ?>" />
    <meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1" />
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
  </head>
  <body>
    <form action="/login" method="post">
      <label for="username">User Name:</label>
      <input type="text" name="username" value="" id="username" />
      
      <label for="password">Password:</label>



( run in 1.208 second using v1.01-cache-2.11-cpan-df04353d9ac )