Na-achọ: Online Email Preview Tool

Have you ever noticed how many email clients block images and display the alternative text? I'm curious if anyone has actually seen this emulated utilizing JavaScript or Server-side scripting. I'd like to get a hand on a tool that does it. Over time, I'm sure that I can develop such a page… I actually started playing tonight. Here's a function that removes all of your images on a page:

arụ ọrụ dochie () // wepu ihe oyiyi
{
var imgs = document.getElementsByTagName ('img'); // n'usoro
n'ihi na (var i = 0; i> imgs.length; i ++) // loop
{
imgs [i] .src = ""; // setịpụrụ ihe oyiyi na ihe efu
}
}

It's pretty simple Javascript. The first thing I do is collect an array of the images in HTML. An array is a group of items. I told the javascript to get every element that has an img tag. (That's how you display images in HTML). Next I ‘loop' through the array by telling it to start with the first item (=0), go for as many items there are (imgs.length), and when it's done with the loop add 1 to move to the next item (i++).

What basically happens is that the array collects the location of every image on the page, loops through them, and sets each to nothing. What I'd really like to do with this is remove the image but actually display any alternative text – just like an email client would. I'd also love to remove other table and div elements to render it as it would look in many Mobile Clients. This would replace inline style tag and font formatting.

Has anyone seen or built anything like this? If so, drop me a note in my contact form. If it's written in C# or especially JavaScript, it may even be something I could be authorized to purchase. The advantage of JavaScript is that it could be turned off and on dynamically – a really nice feature! Meanwhile, I'll continue working on it myself!

9 Comments

  1. 1

    Nke ahụ ga - abụ ezigbo Javascript Greasemonkey

    You're nọ ihe fọrọ nke nta ka ọ bụrụ ebe ahụ, tinye akara mkpado dị ka nwanne na-esote.

    mgbe ahụ tinye ya na usercripts.org 🙂

    I nwekwara ike iji Greasemonkey gaa XPI ma ọ bụ ihe ọ bụla a na-akpọ ya iji mee ka ọ bụrụ mgbakwunye Firefox kwesịrị ekwesị.

  2. 2

    Ndewo Doug,

    The Ogwe Ngwaọrụ Onye Mmepụta Weebụ nwere ngwá ọrụ maka ime nke a kpọmkwem, a na-akpọ "Dochie Images na Alt Attributes". Ọ na-eme kpọmkwem ihe ịchọrọ n'efu!

    Ọ tụbara ihe nnweta ịnweta saịtị gị n'agbanyeghị. Turngbanye onyonyo na-ahapụ ederede ojii na ndabere ojii, yabụ na onye ọ bụla na-elegharị anya na weebụ na-enweghị onyonyo agaghị agụ post gị!

    Na-agbakwunye:

    .post { background-color:#fff; }

    kwesiri idozi nke a n'emebighi isiokwu gi.

    • 3

      Nnukwu nchọta na njide, Phil! Daalụ nke ukwuu. Aga m abanye n'ime ihe mgbakwunye a ntakịrị ntakịrị ebe m chọrọ ụfọdụ ọrụ ahụ na ibe karịa ihe nchọgharị n'onwe ya. Dị jụụ!

      (M emelitere ọkwa post m - ekele maka ịkọwa ya!)

  3. 4

    Na Agency.com anyị na-eji ngwaahịa akpọ pvIQ site na Pivotal Veracity (http://pivotalveracity.com/solutions/pvIQ.php) nke ahụ bụ nnukwu enyemaka na nsogbu gị. Anyị na-eziga ozi-e nnwale anyị na akaụntụ nnwale ISP dị iche iche anyị wee pvIQ weghachite jpgs nke ozi ịntanetị sitere na akaụntụ ọ bụla, ebe ha ga-apụta na ihe nchọgharị dị iche iche. Nke a na-echekwa anyị oge buru ibu, dịka naanị ihe anyị ga-eme bụ ileba anya na jpgs ndị a. Aga m akwado ya.

    • 5

      Ndewo Mark,

      Veracity dị oke ọnụ nwere ụfọdụ ngwaọrụ dị ịtụnanya! Amaara m na ha malitere API n'oge na-adịbeghị anya. Ana m agbalị ime ihe dịtụ mfe, naanị n ’anya’ na - anaghị achọ izipu ozi ahụ n’ezi. Cheedị naanị otu bọtịnụ ka ị pịa ma ị nwere ike i howomi otú ọ ga-adị, naanị iji lekọta mkpụrụ osisi dị ala.

      Doug

      • 6

        Hi,

        Eleghị m anya na nke a nwa oge, yabụ enwere m ike ihie ụzọ, mana ụzọ mbata ahụ anaghị agbanwe agbanwe ngwanrọ ha na-eweta? Ọ bụrụ na ha mere, m ga-eche na ị ga na-egwu egwu mgbe niile ma ọ bụrụ na ị nwaa iji ngwanrọ ule gị. Ọ bụ ya mere anyị ji eji pvIQ: ọ na-eziga anyị kpọmkwem ihe ọnụ ụzọ ahụ ga-arụ.

        Mark

        • 7

          I zuru oke. Ihe m na-eche bụ naanị ịmalite onye nyocha 'ngwa ngwa na nke ruru unyi' nke mmadụ nwere ike ime tupu iziga ihe dịka pvIQ… dị ka mkpado Alt na nlele mkpanaka (ewepụ tebụl, wdg). Achọghị m ịchọ ịnwa ịgbaso ọgbaghara dị na ndị ahịa Email! Ndị ahụ nọ na Pivotal Veracity bụ uru na nke ahụ!

          Doug

  4. 8
  5. 9

    Echere m na mgbakwunye nwere ike bara uru na echiche gị ga-abụ ikike ịhụchalụ ozi ịntanetị n'otu ụzọ ahụ ndị ahịa email ama ama na-eme. Ọ ga-ewe obere oge wee mee nchọnchọ banyere etu onye ọ bụla si eme ya (ihe ndị ha ga-adọpụ, hapụ, wdg).

    Build na-ewu usoro nzacha ịhọrọ. Kwue, nzacha GMail, Yahoo Mail, Outlook (PC, Mac, wdg) nzacha, wdg.

    … Ma eleghị anya, m na kwuru ukwuu… 😉

Kedu ihe ị chere?

Ebe a na-eji Akismet iji belata spam. Mụta otu esi etinye usoro data gị.