Giter Site home page Giter Site logo

johndduncaniii / messagefaces Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 0.0 1.14 MB

displays 'face' images in the message header section of e-mails and newsgroup messages in Mozilla SeaMonkey. These face images are intended to represent the sender, in the form of photos, cartoons, logos and so on.

Home Page: http://cs.gettysburg.edu/~duncjo01/sites/messagefaces/

JavaScript 98.86% CSS 1.14%

messagefaces's People

Contributors

johndduncaniii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

messagefaces's Issues

gravatar/picon need their own vbox

If there is no Face or X-Face, the picon will always display because mfSetImage is always called on the same (one) box (whatever is last).

X-Face custom colors

Given the black&white nature of X-Faces I want to make them blend with my UI colors better by having the white as the "dialog" color, and the black as the "dialog" text color. So I'm trying to apply the following CSS rules (either using userChrome.css, or using the Stylish extension):

  #fromBuddyIconXFace {
    image-rendering: -moz-crisp-edges;
    color: -moz-DialogText;
    background-color: transparent;
  }

If -moz-DialogText is actually green on my system, I'm currently seeing:

x-face_bw

while I would like to see:

x-face_color

This has been previously implemented by the Mnenhy extension:

function ReadCSSColor(aoComputedStyle, asColorName, asDefaultValue)
{
  let sColor = aoComputedStyle.getPropertyCSSValue(asColorName).cssText;
  if (/^rgba\(/.test(sColor))
  {
    // have rgba values
    sColor = sColor.substr(5, sColor.length - 6);
  }
  else if (/^rgb\(/.test(sColor))
  {
    // only rgb values, assume opaque
    sColor = sColor.substr(4, sColor.length - 5) + ",1";
  }
  else if (sColor == "transparent")
  {
    // special value
    sColor = "0,0,0,0";
  }
  else
  {
    // default: plain opaque white
    sColor = asDefaultValue;
  }
  return sColor;
}


//
//  Create data URL for X-Face-PNG
//
let goPNGFace = new PNGFace();

function FaceURL(asFace, aoComputedStyle)
{
  UnCompAll(asFace.replace(/[^!-~]/g, "")); // eliminate illegal chars
  Gen();

  // set colour values:
  //  #fromBuddyIcon
  //  {
  //    color:            green;
  //    color:            -moz-rgba(50%, 50%, 50%, 0.5);
  //    background-color: red;
  //    background-color: transparent;
  //    padding:          0 ! important;
  //    margin:           5px;
  //  }
  // Unfortunately, the alpha channel value of -moz-rgba is retrievable
  // only on trunk since about 2007-01-24...

  // background; defaults to plain opaque white
  let sBackColors = ReadCSSColor(aoComputedStyle, "background-color", "255,255,255,1");
  goPNGFace.Color(0, sBackColors);
  // foreground; defaults to plain opaque black
  let oForeColors = ReadCSSColor(aoComputedStyle, "color", "0,0,0,1");
  goPNGFace.Color(1, oForeColors);

  return "data:image/png;base64," + btoa(goPNGFace.URL(F));
}

Stuck loading IMAP message

The issue is not apparent if the message has already been preloaded locally – that is using the default Syncronization & Storage account setting (checked):

☑ Keep messages for this account on this computer

Unchecking this causes any new (not preloaded locally) message to get stuck loading ("Downloading message...") while selecting it to view, given the MessageFaces extension has been installed and enabled. Preloading the message by other means like using the "Download Now" button from the Folder Properties / Synchronization tab also enables it to be viewed along side with the MessageFaces shown. Keeping all messages loaded locally may not be feasible for some IMAP usages (like with the "All Mail" folder of Gmail).

This is all using SeaMonkey 2.49.3 but happens with previous versions, also. Can't really say about Thunderbird as the extension doesn't appear to function properly with the current version 52.7.0 for me – no face images, and enlarged message header with blank area. Loading IMAP messages doesn't get stuck using this version of Thunderbird, though.

Note, after a message gets stuck loading the SeaMonkey process doesn't exit normally and should be forced to stop.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.