tag:blogger.com,1999:blog-11956699631921907262024-03-19T06:16:45.664-05:00Faith, Family and Friends!Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.comBlogger422125tag:blogger.com,1999:blog-1195669963192190726.post-61716113589451122262023-08-31T16:18:00.002-05:002023-08-31T16:19:38.584-05:00Forgiveness and Love!<br /><div class="separator" style="clear: both; text-align: justify;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpXrx04guLvEb6aq8wJhrQMGIyXhFYshcOkL8U3L134OyIvppRJ1S55TvNBYe_qG3nRnSiz2B_HvjWayGSXR3RPHDxjyyAvW7XI6mSw8L4l0DHk4UPrn__4MhenHOZliGW0MXnMvtjx5rO2AyOGcjnnQmFDXfmOLf5JP3bZeeAuxaK9QsEvO2AunvhJ7Q/s960/2020-08-09.jpg" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="960" data-original-width="795" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpXrx04guLvEb6aq8wJhrQMGIyXhFYshcOkL8U3L134OyIvppRJ1S55TvNBYe_qG3nRnSiz2B_HvjWayGSXR3RPHDxjyyAvW7XI6mSw8L4l0DHk4UPrn__4MhenHOZliGW0MXnMvtjx5rO2AyOGcjnnQmFDXfmOLf5JP3bZeeAuxaK9QsEvO2AunvhJ7Q/s320/2020-08-09.jpg" width="265" /></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;">Best way to begin blogging again and a reminder that life is very short. I know many folks who</div><div class="separator" style="clear: both; text-align: center;">Just can’t or won’t get along with family or others and unfortunately I have known some who have went to their grave because of an unforgiving heart. It isn’t possible to forget, but it is possible with God to forgive. It surely doesn’t mean the other person was right, it just means we are releasing them to God, no more bitterness and holding grudges. Just being obedient to our Heavenly Father. If any of us have learned anything, we know life is just a vapor and this old corrupt world is not our home. We really are here for a short while! Eternity is forever! So as you and I make choices, let’s just remember a few things, for one, it isn’t an option! God told us to forgive and it certainly isn’t about feelings. Those will get us I trouble every time. </div><div class="separator" style="clear: both; text-align: center;">Colossians 3:13 Bear with each other and forgive one another if any of you has a grievance against someone. Forgive as the Lord forgave you.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><div class="separator" style="clear: both; text-align: center;">Blessing and Peace on you.</div><div class="separator" style="clear: both; text-align: center;"><br /></div><br />Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-14807793185683801812018-01-11T13:37:00.000-06:002018-01-11T14:18:59.783-06:00The Wellness Revelation book review!I received a book courtesy of Tyndale called The Wellness Revelation book to review. I am always interested in diet plans, so I was excited to read and then apply what the author Elisa Keeton wrote. I have to say I was intrigued from the beginning. The book was complete with a journal and calendar. But the best part of all was of course bringing our God in and depending on Him for success.<br />
<div>
The 8 chapters were laid out very well. I highly recommend this program if you are interested in being healthy and of course losing weight.<br />
<br /></div>
<div>
<div style="text-align: center;">
Thank you Tyndale, this one was a winner.</div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.tyndaleblognetwork.com/1_Title/my-titles.php">The Wellnes</a>s Revelation</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<u style="color: #0000ee; text-align: start;">http://www.tyndaleblognetwork.com/1_Title/my-titles.php<a href="http://www.tyndaleblognetwork.com/1_Title/my-titles.php">The Wellness Revelation Review</a></u></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-6237309342794474452017-06-02T17:20:00.001-05:002017-06-02T17:22:44.711-05:00<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_xC65TmN51TrrDP1ukUunbpaEIMtM5xjlM0G03khR2xsI9_Nv4bvY0ioBtfVXkQyC3rAOcGo2mlxxhi1P2T8D0z7u4dUT8LrMrtl7RBVkwfM6XOMMoI5sqR0eCNCcuq1bqZqA181DlCw/s1600/WIN_20170602_16_47_12_Pro.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="360" data-original-width="640" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_xC65TmN51TrrDP1ukUunbpaEIMtM5xjlM0G03khR2xsI9_Nv4bvY0ioBtfVXkQyC3rAOcGo2mlxxhi1P2T8D0z7u4dUT8LrMrtl7RBVkwfM6XOMMoI5sqR0eCNCcuq1bqZqA181DlCw/s320/WIN_20170602_16_47_12_Pro.jpg" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1i4_7zguZaI5OY3eMSyySnQ1lPBP_OV8lv7UQiZBkuA8NxreAEguJdiqSzD-9GdrbOKFPFOxVY-L61Ak7uS7QAj_OwzrMuAbMD8jCPX4k2lY4xnK23z9DtU9KGYgI4vS-qDHE_EhVUL4/s1600/WIN_20170602_16_47_26_Pro.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="360" data-original-width="640" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1i4_7zguZaI5OY3eMSyySnQ1lPBP_OV8lv7UQiZBkuA8NxreAEguJdiqSzD-9GdrbOKFPFOxVY-L61Ak7uS7QAj_OwzrMuAbMD8jCPX4k2lY4xnK23z9DtU9KGYgI4vS-qDHE_EhVUL4/s320/WIN_20170602_16_47_26_Pro.jpg" width="320" /></a></div>
<div>
</div>
<div align="justify">
Esther!</div>
<div>
<br /></div>
<div>
Thank you Tyndale for this complimentary of the drawn in bible story of Esther written by Eugene H. Peterson. I have enjoyed the story as he has portrayed it, and also of the pictures to color. I really didn't think I would enjoy "coloring", but I do love it. Some of the artwork is awfully small but it just means taking more time to color. The Bible Study is incredible and I intend to us it at an upcoming bible study we have planned. I didn't take the 4 weeks time limit, because I wanted to go ahead and do a review. I did read through it though so I could give an honest review. I believe folks will enjoy this technique of doodling while learning Gods Word. </div>
<div>
<br /></div>
<div>
Thank you again Tyndale. Keep those wonderful inspiring products for us! In the times we live in, we need truth!</div>
<div>
<br /></div>
<div>
<a href="http://www.tyndaleblognetwork.com/1_title/submit-review.php?type=ADD&bppID=25496">Esther </a></div>
<div>
<br /></div>
<div>
<a href="http://www.tyndaleblognetwork.com/1_title/submit-review.php?type=ADD&bppID=25496">http://www.tyndaleblognetwork.com/1_title/submit-review.php?type=ADD&bppID=25496</a></div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com1tag:blogger.com,1999:blog-1195669963192190726.post-19340771141143880852017-04-19T15:50:00.002-05:002017-04-19T15:53:48.042-05:00Peace In the Face of Loss<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><div>
<img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjF_C_5fIaKWVixgqoc-0isPv0MMX_j5obHq-2GvTyLqLsGVZ13d3pNosbTtlRMBf4daFZDYF6mkPmAfJB3DbxSGqLFl8KUtcG5ZAhJ-TiLb6s0bV1RqCgNDVvKa5NCJjuErtGmHbBZc0/s1600/978-1-4964-2136-4.jpg" /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
A devotion for those of us who have lost loved ones using scriptures to encourage us that death is not the final answer, only the beginning. Jill Kelly knows all to well about grief and losing and is sharing her heart here in this little but powerful book of forty devotions. Stories of women also sharing their pain gives us hope and strengthens our faith. Painful stories but with Gods help, we can recover. She beautifully illustrates this throughout the book.</div>
<div>
These devotions touched my heart as I have recently lost my husband. Reading stories like this and relying on the Word of God is bringing me through a very rough time. My faith is fortified and hope is within my heart. It is helpful to learn how others handle such times and know we are not alone. God never leaves us and of course those around us gives us comfort also. </div>
<div>
<br /></div>
<div>
Thank you Tyndale House for this wonderful complimentary copy for review purposes, I am very happy to say I can truthfully recommend this book.</div>
<div>
<br /></div>
<div>
<a href="http://tyndaleblognetwork.com/4_browse_review/browse-review.php">http://tyndaleblognetwork.com/4_browse_review/browse-review.php</a></div>
</td></tr>
<tr><td class="tr-caption" style="text-align: center;"></td></tr>
</tbody></table>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-76788334115231875682017-04-17T19:12:00.003-05:002017-04-17T19:12:52.905-05:00New Beginnigs!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtQlbsUQs-bGAxFmHt2QBH-VBrlnj4wzKBKqFTz3Edu6TeL64o20FNC1Yz2-Znc453nFs8zOSVPkh1N7ivC514KTCy8WjM-GZbf41bpTYQlOKcl-_oE9PRYkVU2dFZ7G-GEK1dblmjMII/s1600/100_2210.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtQlbsUQs-bGAxFmHt2QBH-VBrlnj4wzKBKqFTz3Edu6TeL64o20FNC1Yz2-Znc453nFs8zOSVPkh1N7ivC514KTCy8WjM-GZbf41bpTYQlOKcl-_oE9PRYkVU2dFZ7G-GEK1dblmjMII/s320/100_2210.JPG" width="320" /></a></div>
I love Spring! Evidence of Life is everywhere. Reminding us that those things that we thought were dead was only asleep. Just like those loved ones and friends that are no longer here with us. One day we will see them, knowing they are only asleep as Lazarus was. Thank God for His promises! I love the story of Lazarus and his sisters. Mary and Martha loved the Lord and were so distraught when their beloved brother died. They knew that if Jesus had been there, things would have been entirely different. But Jesus had other plans for their lives, just as He has for ours. Things we think needs fixing now sometimes just isn't the time. There are bigger things ahead. Jesus told the disciples, He was glad for their sakes He wasn't there, now they would really believe. As I read these verses, I remember losing loved ones, the most recent my husband. There is little comfort in words, although people mean well and can sometimes say inappropriate things. But it is because there are at a loss to. We are told there is a time for everything, including death. Mary and Martha were in awe when Jesus shouted, "Lazarus come forth". What a wonderful reunion that must have been. Their brother was alive and with them again. Just as our loved ones will be one day to. <br />
Lets be encouraged as we read this account of how Jesus loves and cares for us. All the promises in His Word are there. We just need to believe!<br />
I pray you will be blessed and enjoy the much needed peace that is ours to have.<br />
If we seek Him, we will find Him.<br />
<br />
In Him We are Complete!Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-51185461840807681362016-06-21T01:15:00.000-05:002016-06-21T01:15:15.632-05:00Ready to Blog Again!Taking time off from blogging was something I just had to do, but now I feel as though I am ready to put my thoughts into words and see where this new journey takes me. I will admit right here, my faith took a hit when my husband died. He was so precious to me and we had prayed for God to spare his life, but my plan was not Gods' plan. So heartbroken yet I know there will be many things we won't understand until we get to heaven.<div>
Then there were so many changes that have occurred over the last 4 years. Anyway, God has been gracious to me and I did survive. I have learned in whatever circumstance to be content. I will also admit (confession is good in so many ways) the anger and disappointment I had towards God was very real and it was very hard to accept. And yet again, so many stages to go through, and that is the whole point, going through, not staying in the grief, anger, disappointment, etc., but going through! It was difficult to say the least, but it would have been a disaster to be entrapped in a sinful lifestyle as a way out or just to cope. God understands those thing that crush us, and that is where healing comes in. He knows it will take time! I don't believe we ever completely get past the feeling of loss, but with His grace and mercy and us keeping our eyes on Him, we do heal.<div>
<div>
<div>
thank you for stopping by! I pray for comfort and peace as you look to the only One who is able and willing to sustain us.</div>
<div>
Blessings!</div>
</div>
</div>
</div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-72683270633291856182013-02-16T09:57:00.001-06:002013-02-26T14:02:05.531-06:00Times Have Changed!<div id="en_img_span_cnt" style="display: inline; height: 322px; left: 0px; position: absolute; top: 0px; width: 428.61px;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrB2GM-8b_PBcuL_3EdJfc1j2Ykvgt81r8rdg0V-FVeWPAk5j4nNdSlmOPpWpnIJuhg0L7fdmruI9-iDpcczHcEVg3GqfTdtI6pe8bFT54jPyXvvf2qsTTmiComgNclHufkUWKDgawb8o/s1600/catalog.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrB2GM-8b_PBcuL_3EdJfc1j2Ykvgt81r8rdg0V-FVeWPAk5j4nNdSlmOPpWpnIJuhg0L7fdmruI9-iDpcczHcEVg3GqfTdtI6pe8bFT54jPyXvvf2qsTTmiComgNclHufkUWKDgawb8o/s400/catalog.jpg" width="400" /></a></div>
This is from 1960, and so strange, because this looks just like my mother, sister and myself. Even the haircolor is the same!<br />
<br />
Ecclesiastes 3:2-8 (The Message)<br />
<br />
There’s an opportune time to do things, a right time for everything on the earth: <br />
<div class="poetry top-1">
<div class="line">
<span class="text Eccl-3-2-Eccl-3-8" id="en-MSG-7460"><sup class="versenum">2-8 </sup>A right time for birth and another for death,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to plant and another to reap,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to kill and another to heal,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to destroy and another to construct,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to cry and another to laugh,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to lament and another to cheer,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to make love and another to abstain,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to embrace and another to part,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to search and another to count your losses,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to hold on and another to let go,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to rip out and another to mend,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to shut up and another to speak up,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to love and another to hate,</span><br />
<span class="text Eccl-3-2-Eccl-3-8">A right time to wage war and another to make peace.</span></div>
</div>
<br />
<br />
<em>I have noticed that as I get older, I remember things that happened so many years ago, and I am like, "where did that come from?" I guess it is normal, sometimes pleasant and sometimes not, but this one just happened to be a pleasant memory:</em><br />
<em></em><br />
<em>Things have changed so much since I was a little girl growing up in a rural setting where "going to town" was a much anticipated event. Waiting for the mail to run was also exciting. I remember when my mother ordered a sewing machine from Sears and Roebuck. When that catalog came or the wish book as it was called, a whole world opened up for us. Things I couldn't imagine having and wishing for it, well, that was really big and impossible. Anyway, back to the machine. My mother was and would be considered in this day and time, an expert seamstress. No pattern, just looking in the "wish book", she would sew clothes for me and my sister. By the way, I have a daughter, Candace, that does not need a pattern either. For sis and I, we need those patterns! lol. So this machine that had all the fancy stitches would be amazing! The machine was chosen and ordered and the wait began. Every day we would be waiting for the mail to run and finally after about 3 weeks, he pulled up to the house with the package. I remember all of us being so excited! My mother had that thing figured out and would use it for many years to come. No telling how many dresses for us was made on it. We always were dressed so pretty and of course had the latest fashions, because that wonderful wish book provided the patterns.</em><br />
<em>So what does this have to do with anything? Well, I am not sure except the fact that change can be good, they call it progress. Of course it can be bad to! because my mother has gone to be with the Lord and there will always be a empty place in my heart, makes me very sad. Even after all these years, I miss her so. The good part of buying a sewing machine, or whatever we want these days just means a trip to WalMart or the mall, no waiting and we will have our purchase. And did I say, No waiting! But, to be honest with you, the best memories I have of shopping would have to be with my mother and the things we ordered from Sears and Roebucks. It had more meaning than any purchase I have ever made..</em><br />
<em>I hope you have memories that stir your heart and cause you to be so thankful for your family. Those of you that still have your parents and grandparents, spend time with them making memories, there is a season for everything just as Gods' Word tells us, and one day things will change again, they will be gone and you will be the "older" ones. Our time here is very limited, worrying and getting caught up in the worldly things of this life will only cause stress and unrest. Jesus came to give us life and life more abundantly! There can and should be peace even though everything around us changes, and it will change! When we are rooted and grounded in faith, these changes will not uproot us. So my prayer for you today is to embrace this day, remembering the blessed hope that awaits us. Remember the good things in our past, but don't stay there long, and most of all remember who you are in Christ</em><br />
<em>.</em><br />
<em>So, in this post, we have gone from a sewing machine to heaven! I pray something was said to encourage your heart and maybe stir a memory or two.</em><br />
<em></em><br />
<em>Blessings and encouraging words to you, daughters and friends!</em><br />
<em></em><br />
<em> </em><br />
<script>]*?>([\s\S]*?)<\/script>/gi, '');
_html = _html.replace(/<script[^>]*?\/>/gi, '');
_html = _html.replace(/<noscript[^>]*?>([\s\S]*?)<\/noscript>/gi, '');
// add load handler
// ================
_html = _html.replace(/<\/body/i, _script+''
);
// write to frame
// ==============
var _doc = $('#nextPageFrame__'+_pageNr).contents().get(0);
_doc.open();
_doc.write(_html);
_doc.close();
};
// loaded in frame
// ===============
$R.getContent__nextPage__loadedInFrame = function (_pageNr, _pageWindow)
{
// find
// ====
var
_found = $R.getContent__findInPage(_pageWindow),
_foundHTML = _found._html,
_removeTitleRegex = new RegExp($R.articleTitleMarker__start + '(.*?)' + $R.articleTitleMarker__end, 'i')
;
// get first fragment
// ==================
var _firstFragment = $R.getContent__nextPage__getFirstFragment(_foundHTML);
// gets first 2000 characters
// diff set at 100 -- 0.05
switch (true)
{
case ($R.levenshteinDistance(_firstFragment, $R.nextPage__firstFragment__firstPage) < 100):
case ($R.levenshteinDistance(_firstFragment, $R.nextPage__firstFragment__lastPage) < 100):
// mark
$R.debugPrint('NextPage', 'false');
// mark again
if ($R.debug) { $('#debugOutput__value__NextPage').html('false'); }
// pop page
$R.nextPage__loadedPages.pop();
// break
return false;
default:
// add to first fragemnts
$R.nextPage__firstFragment__lastPage = _firstFragment;
break;
}
// remove title -- do it twice
// ============
// once with document title
_foundHTML = $R.getContent__find__isolateTitleInHTML(_foundHTML, ($R.document.title > '' ? $R.document.title : ''));
_foundHTML = _foundHTML.replace(_removeTitleRegex, '');
// once with article title
_foundHTML = $R.getContent__find__isolateTitleInHTML(_foundHTML, $R.articleTitle);
_foundHTML = _foundHTML.replace(_removeTitleRegex, '');
// display
// =======
$R.displayPageHTML(_foundHTML, _pageNr, _pageWindow.location.href);
// next
// ====
$R.getContent__nextPage__find(_pageWindow, _found._links);
};
// rewrites
// ========
// rewrite displayPageHTML -- for multi-page articles
// =======================
$R.displayPageHTML = function (_processedPageHTML, _pageNr, _pageURL)
{
// skip first
if (_pageNr > 1); else { return; }
// push to pages
$C._nextPages.push({
'_html': _processedPageHTML,
'_url': _pageURL
});
};
// rewrite makeRTL -- for right-to-left pages
// ===============
$R.makeRTL = function () { $R.rtl = true; };
$R.makeNotRTL = function () { $R.rtl = false; }
// set component object
// ====================
window.ClearlyComponent = $C;
window.$readable = $R;
}
<script type="text/javascript" defer="" charset="ANSI">/*
http://www.JSON.org/json2.js
2008-11-19
Public Domain.
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
See http://www.JSON.org/js.html
This file creates a global JSON object containing two methods: stringify
and parse.
JSON.stringify(value, replacer, space)
value any JavaScript value, usually an object or array.
replacer an optional parameter that determines how object
values are stringified for objects. It can be a
function or an array of strings.
space an optional parameter that specifies the indentation
of nested structures. If it is omitted, the text will
be packed without extra whitespace. If it is a number,
it will specify the number of spaces to indent at each
level. If it is a string (such as '\t' or ' '),
it contains the characters used to indent at each level.
This method produces a JSON text from a JavaScript value.
When an object value is found, if the object contains a toJSON
method, its toJSON method will be called and the result will be
stringified. A toJSON method does not serialize: it returns the
value represented by the name/value pair that should be serialized,
or undefined if nothing should be serialized. The toJSON method
will be passed the key associated with the value, and this will be
bound to the object holding the key.
For example, this would serialize Dates as ISO strings.
Date.prototype.toJSON = function (key) {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
You can provide an optional replacer method. It will be passed the
key and value of each member, with this bound to the containing
object. The value that is returned from your method will be
serialized. If your method returns undefined, then the member will
be excluded from the serialization.
If the replacer parameter is an array of strings, then it will be
used to select the members to be serialized. It filters the results
such that only members with keys listed in the replacer array are
stringified.
Values that do not have JSON representations, such as undefined or
functions, will not be serialized. Such values in objects will be
dropped; in arrays they will be replaced with null. You can use
a replacer function to replace those with JSON values.
JSON.stringify(undefined) returns undefined.
The optional space parameter produces a stringification of the
value that is filled with line breaks and indentation to make it
easier to read.
If the space parameter is a non-empty string, then that string will
be used for indentation. If the space parameter is a number, then
the indentation will be that many spaces.
Example:
text = JSON.stringify(['e', {pluribus: 'unum'}]);
// text is '["e",{"pluribus":"unum"}]'
text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t');
// text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]'
text = JSON.stringify([new Date()], function (key, value) {
return this[key] instanceof Date ?
'Date(' + this[key] + ')' : value;
});
// text is '["Date(---current time---)"]'
JSON.parse(text, reviver)
This method parses a JSON text to produce an object or array.
It can throw a SyntaxError exception.
The optional reviver parameter is a function that can filter and
transform the results. It receives each of the keys and values,
and its return value is used instead of the original value.
If it returns what it received, then the structure is not modified.
If it returns undefined then the member is deleted.
Example:
// Parse the text. Values that look like ISO date strings will
// be converted to Date objects.
myData = JSON.parse(text, function (key, value) {
var a;
if (typeof value === 'string') {
a =
/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value);
if (a) {
return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4],
+a[5], +a[6]));
}
}
return value;
});
myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) {
var d;
if (typeof value === 'string' &&
value.slice(0, 5) === 'Date(' &&
value.slice(-1) === ')') {
d = new Date(value.slice(5, -1));
if (d) {
return d;
}
}
return value;
});
This is a reference implementation. You are free to copy, modify, or
redistribute.
This code should be minified before deployment.
See http://javascript.crockford.com/jsmin.html
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
NOT CONTROL.
*/
/*jslint evil: true */
/*global JSON */
/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply,
call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours,
getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join,
lastIndex, length, parse, prototype, push, replace, slice, stringify,
test, toJSON, toString, valueOf
*/
// Create a JSON object only if one does not already exist. We create the
// methods in a closure to avoid creating global variables.
if (!this.JSON) {
JSON = {};
}
(function () {
function f(n) {
// Format integers to have at least two digits.
return n < 10 ? '0' + n : n;
}
if (typeof Date.prototype.toJSON !== 'function') {
Date.prototype.toJSON = function (key) {
return this.getUTCFullYear() + '-' +
f(this.getUTCMonth() + 1) + '-' +
f(this.getUTCDate()) + 'T' +
f(this.getUTCHours()) + ':' +
f(this.getUTCMinutes()) + ':' +
f(this.getUTCSeconds()) + 'Z';
};
String.prototype.toJSON =
Number.prototype.toJSON =
Boolean.prototype.toJSON = function (key) {
return this.valueOf();
};
}
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
gap,
indent,
meta = { // table of character substitutions
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
rep;
function quote(string) {
// If the string contains no control characters, no quote characters, and no
// backslash characters, then we can safely slap some quotes around it.
// Otherwise we must also replace the offending characters with safe escape
// sequences.
escapable.lastIndex = 0;
return escapable.test(string) ?
'"' + string.replace(escapable, function (a) {
var c = meta[a];
return typeof c === 'string' ? c :
'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
}) + '"' :
'"' + string + '"';
}
function str(key, holder) {
// Produce a string from holder[key].
var i, // The loop counter.
k, // The member key.
v, // The member value.
length,
mind = gap,
partial,
value = holder[key];
// If the value has a toJSON method, call it to obtain a replacement value.
if (value && typeof value === 'object' &&
typeof value.toJSON === 'function') {
value = value.toJSON(key);
}
// If we were called with a replacer function, then call the replacer to
// obtain a replacement value.
if (typeof rep === 'function') {
value = rep.call(holder, key, value);
}
// What happens next depends on the value's type.
switch (typeof value) {
case 'string':
return quote(value);
case 'number':
// JSON numbers must be finite. Encode non-finite numbers as null.
return isFinite(value) ? String(value) : 'null';
case 'boolean':
case 'null':
// If the value is a boolean or null, convert it to a string. Note:
// typeof null does not produce 'null'. The case is included here in
// the remote chance that this gets fixed someday.
return String(value);
// If the type is 'object', we might be dealing with an object or an array or
// null.
case 'object':
// Due to a specification blunder in ECMAScript, typeof null is 'object',
// so watch out for that case.
if (!value) {
return 'null';
}
// Make an array to hold the partial results of stringifying this object value.
gap += indent;
partial = [];
// Is the value an array?
if (Object.prototype.toString.apply(value) === '[object Array]') {
// The value is an array. Stringify every element. Use null as a placeholder
// for non-JSON values.
length = value.length;
for (i = 0; i < length; i += 1) {
partial[i] = str(i, value) || 'null';
}
// Join all of the elements together, separated with commas, and wrap them in
// brackets.
v = partial.length === 0 ? '[]' :
gap ? '[\n' + gap +
partial.join(',\n' + gap) + '\n' +
mind + ']' :
'[' + partial.join(',') + ']';
gap = mind;
return v;
}
// If the replacer is an array, use it to select the members to be stringified.
if (rep && typeof rep === 'object') {
length = rep.length;
for (i = 0; i < length; i += 1) {
k = rep[i];
if (typeof k === 'string') {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
} else {
// Otherwise, iterate through all of the keys in the object.
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = str(k, value);
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
}
}
}
// Join all of the member texts together, separated with commas,
// and wrap them in braces.
v = partial.length === 0 ? '{}' :
gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
mind + '}' : '{' + partial.join(',') + '}';
gap = mind;
return v;
}
}
// If the JSON object does not yet have a stringify method, give it one.
if (typeof JSON.stringify !== 'function') {
JSON.stringify = function (value, replacer, space) {
// The stringify method takes a value and an optional replacer, and an optional
// space parameter, and returns a JSON text. The replacer can be a function
// that can replace values, or an array of strings that will select the keys.
// A default replacer method can be provided. Use of the space parameter can
// produce text that is more easily readable.
var i;
gap = '';
indent = '';
// If the space parameter is a number, make an indent string containing that
// many spaces.
if (typeof space === 'number') {
for (i = 0; i < space; i += 1) {
indent += ' ';
}
// If the space parameter is a string, it will be used as the indent string.
} else if (typeof space === 'string') {
indent = space;
}
// If there is a replacer, it must be a function or an array.
// Otherwise, throw an error.
rep = replacer;
if (replacer && typeof replacer !== 'function' &&
(typeof replacer !== 'object' ||
typeof replacer.length !== 'number')) {
throw new Error('JSON.stringify');
}
// Make a fake root object containing our value under the key of ''.
// Return the result of stringifying the value.
return str('', {'': value});
};
}
// If the JSON object does not yet have a parse method, give it one.
if (typeof JSON.parse !== 'function') {
JSON.parse = function (text, reviver) {
// The parse method takes a text and an optional reviver function, and returns
// a JavaScript value if the text is a valid JSON text.
var j;
function walk(holder, key) {
// The walk method is used to recursively walk the resulting structure so
// that modifications can be made.
var k, v, value = holder[key];
if (value && typeof value === 'object') {
for (k in value) {
if (Object.hasOwnProperty.call(value, k)) {
v = walk(value, k);
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
}
}
}
return reviver.call(holder, key, value);
}
// Parsing happens in four stages. In the first stage, we replace certain
// Unicode characters with escape sequences. JavaScript handles many characters
// incorrectly, either silently deleting them, or treating them as line endings.
cx.lastIndex = 0;
if (cx.test(text)) {
text = text.replace(cx, function (a) {
return '\\u' +
('0000' + a.charCodeAt(0).toString(16)).slice(-4);
});
}
// In the second stage, we run the text against regular expressions that look
// for non-JSON patterns. We are especially concerned with '()' and 'new'
// because they can cause invocation, and '=' because it can cause mutation.
// But just to be safe, we want to reject all unexpected forms.
// We split the second stage into 4 regexp operations in order to work around
// crippling inefficiencies in IE's and Safari's regexp engines. First we
// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we
// replace all simple value tokens with ']' characters. Third, we delete all
// open brackets that follow a colon or comma or that begin the text. Finally,
// we look to see that the remaining characters are only whitespace or ']' or
// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval.
if (/^[\],:{}\s]*$/.
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
// In the third stage we use the eval function to compile the text into a
// JavaScript structure. The '{' operator is subject to a syntactic ambiguity
// in JavaScript: it can begin a block or an object literal. We wrap the text
// in parens to eliminate the ambiguity.
j = eval('(' + text + ')');
// In the optional fourth stage, we recursively walk the new structure, passing
// each name/value pair to a reviver function for possible transformation.
return typeof reviver === 'function' ?
walk({'': j}, '') : j;
}
// If the text is not JSON parseable, then a SyntaxError is thrown.
throw new SyntaxError('JSON.parse');
};
}
})();
</script><script charset="ANSI" defer="" type="text/javascript">// HTML5 placeholder plugin version 1.01
// Copyright (c) 2010-The End of Time, Mike Taylor, http://miketaylr.com
// MIT Licensed: http://www.opensource.org/licenses/mit-license.php
//
// Enables cross-browser HTML5 placeholder for inputs, by first testing
// for a native implementation before building one.
//
//
// USAGE:
//$('input[placeholder]').placeholder();
// <input type="text" placeholder="username">
(function($){
//feature detection
var hasPlaceholder = 'placeholder' in document.createElement('input');
//sniffy sniff sniff -- just to give extra left padding for the older
//graphics for type=email and type=url
var isOldOpera = $.browser.opera && $.browser.version < 10.5;
$.fn.placeholder = function(options) {
//merge in passed in options, if any
var options = $.extend({}, $.fn.placeholder.defaults, options),
//cache the original 'left' value, for use by Opera later
o_left = options.placeholderCSS.left;
//first test for native placeholder support before continuing
//feature detection inspired by ye olde jquery 1.4 hawtness, with paul irish
return (hasPlaceholder) ? this : this.each(function() {
//local vars
var $this = $(this),
inputVal = $.trim($this.val()),
inputWidth = $this.width(),
inputHeight = $this.height(),
//grab the inputs id for the <label @for>, or make a new one from the Date
inputId = (this.id) ? this.id : 'placeholder' + (+new Date()),
placeholderText = options.placeholderText ? options.placeholderText : $this.attr('placeholder'),
placeholder = $('<label for='+ inputId +'>'+ placeholderText + '</label>');
//stuff in some calculated values into the placeholderCSS object
options.placeholderCSS['width'] = inputWidth;
options.placeholderCSS['height'] = inputHeight;
// adjust position of placeholder
options.placeholderCSS.left = (isOldOpera && (this.type == 'email' || this.type == 'url')) ?
'11%' : o_left;
placeholder.css(options.placeholderCSS);
//place the placeholder if the input is empty
$this.wrap(options.inputWrapper);
$this.attr('id', inputId).after(placeholder);
if(inputVal) {
$this.next().hide();
}
//hide placeholder on focus
$this.focus(function(){
if (!$.trim($this.val())){
$this.next().hide();
};
});
//show placeholder if the input is empty
$this.blur(function(){
if (!$.trim($this.val())){
$this.next().show();
};
});
});
};
//expose defaults
$.fn.placeholder.defaults = {
//you can pass in a custom wrapper
inputWrapper: '<div style="position:relative;">
</div>
',
placeholderText: null,
//more or less just emulating what webkit does here
//tweak to your hearts content
placeholderCSS: {
'font':'0.75em sans-serif',
'color':'#bababa',
'position': 'absolute',
'left':'5px',
'top':'3px',
'overflow-x': 'hidden'
}
};
})(jQuery);</script><script charset="ANSI" defer="" type="text/javascript">/**
* SelectionFinder provides mechanism for finding selection on the page via
* find(). It is able to traverse frames in order to find a selection. It will
* report whether there's a selection via hasSelection(). After doing find(),
* the selection is stored in the selection property, and the document property
* will contain the document in which the selection was found. Find method will
* only recurse documents if it was invoked as find(true), specifying to do
* recursive search. You can use reset() to undo find().
*/
Evernote.SelectionFinder = function SelectionFinder( doc ) {
this._document = doc;
};
Evernote.SelectionFinder.prototype._document = null;
Evernote.SelectionFinder.prototype._selection = null;
Evernote.SelectionFinder.prototype.hasSelection = function() {
Evernote.Logger.debug( "SelectionFinder.hasSelection()" );
var range = Evernote.Utils.fixIERangeObject(this.getRange());
return range && (range.startContainer != range.endContainer
|| (range.startContainer == range.endContainer && range.startOffset != range.endOffset));
};
Evernote.SelectionFinder.prototype.find = function( deep ) {
Evernote.Logger.debug( "SelectionFinder.find()" );
var result = this.findSelectionInDocument( this._document, deep );
this._document = result.document;
this._selection = result.selection;
};
Evernote.SelectionFinder.prototype.getRange = function() {
Evernote.Logger.debug( "SelectionFinder.getRange()" );
if ( !this._selection || this._selection.rangeCount == 0 ) {
return null;
}
if ( typeof this._selection.getRangeAt == 'function' ) {
return this._selection.getRangeAt( 0 );
}
if ( (window.Range && this._selection instanceof window.Range) || !this._selection.anchorNode ) {
return this._selection;
}
var range = this._document.createRange();
range.setStart( this._selection.anchorNode, this._selection.anchorOffset );
range.setEnd( this._selection.focusNode, this._selection.focusOffset );
return range;
};
Evernote.SelectionFinder.prototype.findSelectionInDocument = function( doc, deep ) {
try {
Evernote.Logger.debug( "SelectionFinder.findSelectionInDocument()" );
var sel = null;
var hasSelection = false;
var win = null;
try {
win = (doc.defaultView) ? doc.defaultView : window;
}
catch ( e ) {
win = window;
}
if ( typeof win.getSelection == 'function' ) {
sel = win.getSelection();
if ( sel && typeof sel.rangeCount != 'undefined' && sel.rangeCount > 0 ) {
Evernote.Logger.debug("Found selection by win.getSelection()");
hasSelection = true;
}
}
else if ( win.selection && typeof win.selection.createRange == 'function' ) {
sel = win.selection.createRange();
if ( win.selection.type == 'Text' && typeof sel.htmlText == 'string' && sel.htmlText.length > 0 ) {
Evernote.Logger.debug("Found selection by win.selection");
hasSelection = true;
}
}
else if ( doc.selection && (typeof doc.selection.createRange == 'function' || typeof doc.selection.createRange == 'object') ) {
sel = doc.selection.createRange();
if(doc.selection.type == "None")
sel = undefined;
if ( (doc.selection.type == 'Text') && (typeof sel.htmlText == 'string') && (sel.htmlText.length > 0) ) {
Evernote.Logger.debug("Found selection by doc.selection");
hasSelection = true;
}
}
if ( sel && !hasSelection && deep ) {
var nestedDocs = Evernote.Utils.getNestedDocuments( doc );
for ( var i = 0; i < nestedDocs.length; ++i ) {
if ( nestedDocs[ i ] ) {
var framedSel = this.findSelectionInDocument( nestedDocs[ i ], deep );
if ( framedSel && framedSel.selection && framedSel.selection.rangeCount > 0 ) {
return framedSel;
}
}
}
}
//if do not find any selection in document, try to find selection in HTMLTextArea|Input.
//Get Selection object for TextArea, and set selection as a Range object
if(doc.activeElement)
Evernote.Logger.debug( "Check selection in INPUT TEXT area (input, textarea), for active element :" + doc.activeElement.nodeName );
var activeEl = doc.activeElement;
if ( activeEl && ( (window.HTMLInputElement && (activeEl instanceof window.HTMLInputElement && activeEl.type == "text")) || ( window.HTMLTextAreaElement && (activeEl instanceof window.HTMLTextAreaElement)) ) ) {
if ( activeEl.selectionStart != activeEl.selectionEnd ) {
var range = doc.createRange();
var textNode = doc.createTextNode( activeEl.value );
range.setStart( textNode, activeEl.selectionStart );
range.setEnd( textNode, activeEl.selectionEnd );
sel = range;
}
}
return {
document : doc,
selection : sel
};
} catch(e) {
Evernote.Logger.error("Failed to find selection on the page due to error " + e);
//Do not throw exception here, it is better to not show error to user and allow to clip article or something else.
}
return {
document: doc,
selection: null
}
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.JSSerializer = {
_selectionFinder : new Evernote.SelectionFinder(window.document),
serialize : function( element ) {
try {
var start = new Date().getTime();
var root = element || document.body.parentNode || document.body;
var serializer = new Evernote.NodeSerializer( window, new Evernote.ClipFullStylingStrategy() );
var parser = new Evernote.DomParser( window, null );
parser.parse( root, false, serializer);
var end = new Date().getTime();
Evernote.Logger.debug( "Clip.clipFullPage(): clipped body in " + (end - start) + " milliseconds" );
var images = [];
var imageUrls = serializer.getImagesUrls();
for(var i = 0; i < imageUrls.length; i++) {
images.push(Evernote.Utils.makeAbsolutePath(serializer.getDocumentBase(), imageUrls[i]).replace(/\s/g, "%20"));
}
return {
content : serializer.getSerializedDom(),
imageUrls : images,
docBase : serializer.getDocumentBase()
}
}
catch ( e ) {
Evernote.Logger.error( "JSSerializer.serialize() failed: error = " + e );
throw e;
}
},
serializeSelection : function( range ) {
try {
if( !range ) {
if ( !this.hasSelection() ) {
Evernote.Logger.warn( "JSSerializer.serializeSelection(): no selection to clip" );
return;
}
range = Evernote.Utils.fixIERangeObject(this._selectionFinder.getRange());
if ( !range ) {
Evernote.Logger.warn( "JSSerializer.serializeSelection(): no range in selection" );
return;
}
}
var start = new Date().getTime();
var ancestor = (this._styleStrategy && Evernote.Utils.Selection.getCommonAncestorContainer(range).nodeType == Evernote.Node.TEXT_NODE
&& Evernote.Utils.Selection.getCommonAncestorContainer(range).parentNode) ? Evernote.Utils.Selection.getCommonAncestorContainer(range).parentNode : Evernote.Utils.Selection.getCommonAncestorContainer(range);
while ( typeof Evernote.ClipRules.NON_ANCESTOR_NODES[ ancestor.nodeName.toUpperCase() ] != 'undefined' && ancestor.parentNode ) {
if ( ancestor.nodeName.toUpperCase() == "BODY" ) {
break;
}
ancestor = ancestor.parentNode;
}
var serializer = new Evernote.NodeSerializer( window, new Evernote.ClipFullStylingStrategy() );
var parser = new Evernote.DomParser(window, Evernote.Utils.fixIERangeObject(range));
parser.parse( ancestor, false, serializer );
var end = new Date().getTime();
Evernote.Logger.debug( "JSSerializer.serializeSelection(): clipped selection in " + (end - start) + " milliseconds" );
var images = [];
var imageUrls = serializer.getImagesUrls();
for(var i = 0; i < imageUrls.length; i++) {
images.push(Evernote.Utils.makeAbsolutePath(serializer.getDocumentBase(), imageUrls[i]).replace(/\s/g, "%20"));
}
return {
content : serializer.getSerializedDom(),
imageUrls : images,
docBase : serializer.getDocumentBase()
}
}
catch ( e ) {
Evernote.Logger.error( "JSSerializer.serializeSelection() failed: error = " + e );
throw e;
}
},
hasSelection : function() {
Evernote.Logger.debug( "Clip.hasSelection()" );
if ( this._selectionFinder.hasSelection() ) {
return true;
}
else {
this._selectionFinder.find( true );
return this._selectionFinder.hasSelection();
}
}
};</script><script charset="ANSI" defer="" type="text/javascript">/**
* Represents JQuery loader that allow to have two versions of JQuery loaded on the same page
* @type {Object}
*/
Evernote.JQueryLoader = {
/**
* Initializes jquery instance on global Evernote context
*/
initJQuery : function() {
Evernote.JQuery = $.noConflict(true);
}
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ClipNotificator = function ClipNotificator() {
};
Evernote.ClipNotificator.WAIT_CONTAINER_ID = "evernoteContentClipperWait";
Evernote.ClipNotificator.SHOW_WAIT_MIN_TIME = 2000;
Evernote.ClipNotificator.prototype.showCopyNotification = function( doc ) {
Evernote.Logger.debug( "ClipNotificator.showCopyNotification()" );
try {
var wait = this.getWaitContainer( doc, Evernote.Addin.getLocalizedMessage(Evernote.Messages.CLIPPING) );
wait.style.opacity = "1";
this.centerBox(wait);
if ( doc.body ) {
doc.body.appendChild( wait );
}
var self = this;
setTimeout( function() {
self.clearWait( doc );
}, this.constructor.SHOW_WAIT_MIN_TIME );
}
catch ( e ) {
Evernote.Logger.error( "ClipNotificator.showCopyNotification() failed: error = " + e );
}
};
Evernote.ClipNotificator.prototype.centerBox = function( container ) {
var topPosition = ((document.documentElement.scrollTop || document.body.scrollTop) + ((((document.documentElement.clientHeight || document.body.clientHeight) + (!container.offsetHeight && 0)) / 2) >> 0));
var leftPosition = (((document.documentElement.clientWidth || document.body.clientWidth) / 2) - (container.offsetWidth / 2));
container.style.position = "absolute";
container.style.top = (topPosition-20) + "px";
container.style.left = (leftPosition - 90) + "px";
};
Evernote.ClipNotificator.prototype.getWaitContainer = function( doc, msg ) {
Evernote.Logger.debug( "ClipNotificator.getWaitContainer()" );
var container = doc.getElementById( this.constructor.WAIT_CONTAINER_ID );
if ( !container ) {
container = doc.createElement( "evernotediv" );
if(Evernote.Utils.isQuirkMode()) {
container.className = "quirk-mode-container";
}
container.id = this.constructor.WAIT_CONTAINER_ID;
var wait = doc.createElement( "div" );
wait.id = this.constructor.WAIT_CONTAINER_ID + "Content";
if(Evernote.BrowserDetection.isLessThanIE9()) {
wait.className = "content-less-than-nine-container";
}
container.appendChild( wait );
var center = doc.createElement( "center" );
wait.appendChild( center );
var spinner = doc.createElement( "div" );
spinner.id = "evernote-spinner-container";
Evernote.GlobalUtils.absolutizeImages(spinner, "images/icon_scissors.png");
center.appendChild( spinner );
var text = doc.createElement( "span" );
text.id = this.constructor.WAIT_CONTAINER_ID + "Text";
center.appendChild( text );
container._waitMsgBlock = text;
container._waitMsgBlock.appendChild( doc.createTextNode( msg ) );
}
return container;
};
Evernote.ClipNotificator.prototype.clearWait = function( doc ) {
Evernote.Logger.debug( "ClipNotificator.clearWait()" );
var wait = doc.getElementById( this.constructor.WAIT_CONTAINER_ID );
if ( wait ) {
wait.style.opacity = "0";
setTimeout( function() {
if ( wait.parentNode ) {
wait.parentNode.removeChild( wait );
}
}, 1000 );
}
};</script><script charset="ANSI" defer="" type="text/javascript">/**
* Represents clipper object that is capable of clipping elements from pages or clip elements based on preferences.
*/
Evernote.Clipper = {
_serializer : Evernote.JSSerializer,
_clipNotifier : new Evernote.ClipNotificator(),
_defaultOptions : {
title: PageContext.title,
tags: [],
comments: "",
notebookUid: -1
},
/**
* Clips article element (one that user selected or default if no selection was made).
*/
clipArticle : function(options) {
var currentOptions = this.initOptions(options);
this._clipNotifier.showCopyNotification(document);
var self = this;
setTimeout(function() {
var article = Evernote.contentPreviewer.getArticleElement();
if(!article) {
article = Evernote.pageInfo.getDefaultArticle(function(article) {});
}
var serializedDom = self._serializer.serialize(article);
Evernote.Addin.clipNote(currentOptions.comments + serializedDom.content, currentOptions, PageContext.url, serializedDom.imageUrls, true, document);
}, 100);
},
initOptions: function(options) {
if(!options)
options = this._defaultOptions;
options = Evernote.JQuery.extend({}, this._defaultOptions, options);
if(!options.title || Evernote.JQuery.trim(options.title).length == 0)
options.title = Evernote.Addin.getLocalizedMessage(Evernote.Messages.UNTITLED_NOTE);
return options;
},
/**
* Clips full page.
*/
clipFullPage : function(options) {
Evernote.Logger.debug("Clipper: clipFullPage");
var currentOptions = this.initOptions(options);
this._clipNotifier.showCopyNotification(document);
var self = this;
setTimeout(function() {
Evernote.Logger.debug("Start clipping of full page");
var serializedDom = self._serializer.serialize();
Evernote.Logger.debug("Image urls " + JSON.stringify(serializedDom.imageUrls));
Evernote.Logger.debug("Send clip to EN");
Evernote.Addin.clipNote(currentOptions.comments + serializedDom.content, currentOptions, PageContext.url, serializedDom.imageUrls, true, document);
}, 100);
},
/**
* Clips url with favicon (if favicon is recognized)
*/
clipUrl : function(options) {
var currentOptions = this.initOptions(options);
this._clipNotifier.showCopyNotification(document);
setTimeout(function() {
var content = Evernote.GlobalUtils.createUrlClipContent(PageContext.title, PageContext.url, PageContext.getFavIconUrl());
Evernote.Addin.clipNote(currentOptions.comments + content, currentOptions, PageContext.url, PageContext.getFavIconUrl(), true, document);
}, 100);
},
/**
* Clips selection from the page.
*/
clipSelection : function( range, options ) {
var currentOptions = this.initOptions(options);
this._clipNotifier.showCopyNotification(document);
var self = this;
setTimeout(function() {
var serializedDom = self._serializer.serializeSelection( range );
Evernote.Addin.clipNote(currentOptions.comments + serializedDom.content, currentOptions, PageContext.url, serializedDom.imageUrls, true, document);
}, 100);
},
/**
* Clips part of the page, defined in option (url, article or full page) or selection if presented.
*/
clipDefault : function() {
var options = {
notebookUid: Evernote.Options.selectedNotebookUid
};
if(Evernote.Utils.hasSelection(window)) {
Evernote.Clipper.clipSelection(null, options);
}
else if(Evernote.Options.defaultAction == Evernote.ClipperActions.CLIP_URL) {
Evernote.Clipper.clipUrl(options);
} else if(Evernote.Options.defaultAction == Evernote.ClipperActions.CLIP_FULL_PAGE) {
Evernote.Clipper.clipFullPage(options);
} else {
Evernote.Clipper.clipArticle(options);
}
}
};</script><script charset="ANSI" defer="" type="text/javascript">function ContentVeil() {
Evernote.Logger.debug(document);
var veil = document.createElement("div");
var inner = document.createElement("div");
veil.appendChild(inner);
veil.style.boxSizing = "border-box";
veil.style.borderStyle = "solid";
try {
veil.style.borderColor = "rgba(0, 0, 0, 0.7)";
} catch (e) {
veil.style.borderColor = "rgb(0, 0, 0)";
veil.className = "evernote-top-fixed-position-quirks";
}
inner.style.borderWidth = "4px";
inner.style.borderStyle = "solid";
try {
inner.style.borderColor = "rgba(255, 255, 0, 0.7)";
} catch (e) {
inner.style.borderColor = "rgb(255, 255, 0)";
}
inner.style.height = "100%";
inner.style.width = "100%";
inner.style.boxSizing = "border-box";
// We keep a record of what we're currently showing (at least in some cases) so that we can update it in case the
// state of the page changes (like if the user scrolls).
var currentlyShownRect = null;
var currentRectOffsetTop = 0;
var currentRectOffsetLeft = 0;
var currentlyStatic = false;
function reset() {
currentlyShownRect = null;
currentRectOffsetTop = 0;
currentRectOffsetLeft = 0;
showElements("embed");
showElements("object");
showElements("iframe");
veil.style.position = "fixed";
veil.style.left = "0px";
veil.style.zIndex = "2147483646";
if(Evernote.Utils.isQuirkMode() && !Evernote.BrowserDetection.isIE10()) {
veil.style.position = "absolute";
veil.className = "evernote-top-fixed-position-quirks";
}
else {
veil.style.top = "0px";
}
blank();
}
function blank() {
if((Evernote.Utils.isQuirkMode() || Evernote.BrowserDetection.isLessThanIE9()) && !Evernote.BrowserDetection.isIE10()) {
veil.style.width = "0px";
veil.style.height = "0px";
}
else {
veil.style.height = Evernote.Utils.innerHeight() + "px";
veil.style.width = Evernote.Utils.innerWidth() + "px";
}
}
function gray() {
show();
inner.style.display = "none";
}
function show() {
Evernote.Logger.debug("Content veil show");
inner.style.display = "";
veil.style.backgroundColor = "";
if (!Evernote.ElementExtension.hasParentNode(veil)) {
document.body.appendChild(veil);
}
}
function hide() {
veil.style.borderLeftWidth = Evernote.Utils.innerWidth()/2 + "px";
veil.style.borderRightWidth = Evernote.Utils.innerWidth()/2 + "px";
veil.style.borderBottomWidth = Evernote.Utils.innerHeight()/2 + "px";
veil.style.borderTopWidth = Evernote.Utils.innerHeight()/2 + "px";
if (Evernote.ElementExtension.hasParentNode(veil)) {
veil.parentNode.removeChild(veil);
}
}
// Makes a rectangle bigger in all directions by the number of pixels specified (or smaller, if 'amount' is
// negative). Returns the new rectangle.
function expandRect(rect, amount) {
return {
top: (rect.top - amount),
left: (rect.left - amount),
bottom: (rect.bottom + amount),
right: (rect.right + amount),
width: (rect.width + (2 * amount)),
height: (rect.height + (2 * amount))
};
}
// DrawStroke is obsolete, it is now always "true".
function revealRect(rect, drawStroke, staticView) {
// Save this info.
currentlyShownRect = rect;
currentRectOffsetTop = Evernote.Utils.scrollTop();
currentRectOffsetLeft = Evernote.Utils.scrollLeft();
currentlyStatic = staticView;
// We expand the rectangle for two reasons.
// 1) we want to expand it by the width of the stroke, so that when we draw out outline, it doesn't overlap our
// content.
// 2) We want to leave a little extra room around the content for aesthetic reasons.
rect = expandRect(rect, 8);
var x = rect.left;
var y = rect.top;
var width = rect.width;
var height = rect.height;
var veilWidth = Evernote.Utils.innerWidth(); //veil.style.width.replace("px", "");
var veilHeight = Evernote.Utils.innerHeight(); //veil.style.height.replace("px", "");
Evernote.Logger.debug("Veil width " + veilWidth);
Evernote.Logger.debug("Veil height " + veilHeight);
var offScreen = false;
if (y + height < 0) {
Evernote.Logger.debug("y + height < 0");
offScreen = true;
}
else if (y > veilHeight) {
Evernote.Logger.debug("y > veilHeight");
offScreen = true;
}
else if (x + width < 0) {
Evernote.Logger.debug("x + width < 0");
offScreen = true;
}
else if (x > veilWidth) {
Evernote.Logger.debug("x > veilWidth");
offScreen = true;
}
Evernote.Logger.debug("Is offscreen " + offScreen);
if (offScreen) {
veil.style.borderLeftWidth = veilWidth/2 + "px";
veil.style.borderRightWidth = veilWidth/2 + "px";
veil.style.borderTopWidth = veilHeight/2 + "px";
veil.style.borderBottomWidth = veilHeight/2 + "px";
inner.style.display = "none";
return;
}
Evernote.Logger.debug("Show rect " + JSON.stringify(rect));
inner.style.display = "block";
veil.style.borderLeftWidth = Math.max(x, 0) + "px";
veil.style.borderTopWidth = Math.max(y, 0) + "px";
veil.style.borderRightWidth = Math.max((veilWidth - x - width), 0) + "px";
veil.style.borderBottomWidth = Math.max((veilHeight - y - height), 0) + "px";
veil.style.width = veilWidth + "px";
veil.style.height = veilHeight + "px";
/*
veil.style.width = (veilWidth - (Math.max(x, 0) + Math.max((veilWidth - x - width), 0))) + "px";
veil.style.height = (veilHeight - (Math.max(y, 0) + Math.max((veilHeight - y - height), 0))) + "px";
*/
Evernote.Logger.debug("revealRect finished");
}
function revealStaticRect(rect, drawStroke) {
revealRect(rect, drawStroke, true);
}
function outlineElement(element, scrollTo) {
// See notes in Preview.js for why we use this method instead of just calling element.getBoundingClientRect().
if (scrollTo) {
Evernote.Logger.debug("ContentVeil:scrollIntoViewIfNeeded ");
element.scrollIntoView(true);
}
var rect = Evernote.contentPreviewer.computeDescendantBoundingBox(element);
Evernote.Logger.debug("Calculated rect " + rect);
if (rect) {
var mutableRect = {
top: rect.top,
bottom: rect.bottom,
left: rect.left,
right: rect.right,
width: rect.width,
height: rect.height
}
// We don't want to adjust ourselves into odd positions if the page is scrolled.
var sLeft = Evernote.Utils.scrollLeft();
var sTop = Evernote.Utils.scrollTop();
var BORDER_MIN = 9;
if (mutableRect.left < (BORDER_MIN - sLeft)) {
mutableRect.width -= (BORDER_MIN - sLeft) - mutableRect.left;
mutableRect.left = (BORDER_MIN - sLeft);
}
if (mutableRect.top < (BORDER_MIN - sTop)) {
mutableRect.height -= (BORDER_MIN - sTop) - mutableRect.top;
mutableRect.top = (BORDER_MIN - sTop);
}
// Get the wider of our two possible widths.
var width = Math.max(document.body.scrollWidth, Evernote.Utils.innerWidth());
if (mutableRect.right > (width - BORDER_MIN - sLeft)) {
mutableRect.right = (width - BORDER_MIN - sLeft);
mutableRect.width = mutableRect.right - mutableRect.left;
}
Evernote.Logger.debug("Mutable record " + mutableRect.top + ", " + mutableRect.left + ", " + mutableRect.right + ", " + mutableRect.bottom + ", " + mutableRect.width + ", " + mutableRect.height);
Evernote.Logger.debug("ContentVeil:reset ");
reset();
Evernote.Logger.debug("ContentVeil:revealRect ");
revealRect(mutableRect, true);
Evernote.Logger.debug("Hide elements embeded");
hideElements("embed", element);
hideElements("object", element);
Evernote.Logger.debug("Hide elements iframe");
hideElements("iframe", element);
Evernote.Logger.debug("Show it");
show();
}
else {
Evernote.Logger.warn("Couldn't create rectangle from element: " + element.toString());
}
}
function hideAllActiveObjects() {
hideElements("embed");
hideElements("object");
hideElements("iframe");
}
function hideElements (tagName, exceptInElement) {
var els = document.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
els[i].enSavedVisibility = els[i].style.visibility;
els[i].style.visibility = "hidden";
}
}
function showElements (tagName, inElement) {
if (!inElement) {
inElement = document;
}
var els = inElement.getElementsByTagName(tagName);
for (var i = 0; i < els.length; i++) {
if (typeof els[i].enSavedVisibility !== "undefined") {
els[i].style.visibility = els[i].enSavedVisibility;
try {
delete els[i].enSavedVisibility;
} catch(e) {
els[i].enSavedVisibility = undefined;
}
}
}
}
// If we're currently showing a rectangle, and it's not static, we'll redraw on scroll.
window.attachEvent("onscroll", function(e) {
Evernote.Logger.debug("On scroll start");
Evernote.Logger.debug("currentlyShownRect " + JSON.stringify(currentlyShownRect));
Evernote.Logger.debug("currentlyStatic " + currentlyStatic);
if (currentlyShownRect && !currentlyStatic) {
var rect = {
top: currentlyShownRect.top,
bottom: currentlyShownRect.bottom,
left: currentlyShownRect.left,
right: currentlyShownRect.right,
width: currentlyShownRect.width,
height: currentlyShownRect.height
};
Evernote.Logger.debug("Evernote.Utils.scrollTop() " + Evernote.Utils.scrollTop());
Evernote.Logger.debug("Evernote.Utils.scrollLeft() " + Evernote.Utils.scrollLeft());
var vert = Evernote.Utils.scrollTop() - currentRectOffsetTop;
var horiz = Evernote.Utils.scrollLeft() - currentRectOffsetLeft;
if (!vert && !horiz) {
Evernote.Logger.debug("No vertical and horizontal");
return;
}
/*if(Evernote.Utils.isQuirkMode() && !Evernote.BrowserDetection.isIE10()) {
veil.style.top = ((document.documentElement.scrollTop || document.body.scrollTop) + this.offsetHeight - this.offsetHeight) + "px")
}*/
rect.top -= vert;
rect.bottom -= vert;
rect.left -= horiz;
rect.right -= horiz;
blank();
revealRect(rect);
}
});
// Public API:
this.reset = reset;
this.show = show;
this.gray = gray;
this.hide = hide;
this.revealRect = revealRect;
this.revealStaticRect = revealStaticRect;
this.outlineElement = outlineElement;
this.expandRect = expandRect;
this.hideAllActiveObjects = hideAllActiveObjects;
Evernote.Logger.debug("End content veil");
}</script><script charset="ANSI" defer="" type="text/javascript">function PageInfo() {
// This is a map of hostnames (for hostnames that begin with 'www.', the 'www.' will be stripped off first, so don't
// include it in your lookup string) to CSS selectors. When we try and locate an article in a page, we'll see if we
// can find the doamin for the page in this list, and if so, we'll try and find an element that matches the given
// selector. If no element is returned, we'll fall back to the heuristic approach.
var specialCases = {
"penny-arcade.com": "div.contentArea > div.comic > img",
"aspicyperspective.com": "div.entry-content",
"thewirecutter.com": "div#content",
"katespade.com": "div#pdpMain",
"threadless.com": "section.product_section",
"yelp.com": "div#bizBox",
"flickr.com": "div#photo",
"instagr.am": "div.stage > div.stage-inner",
"stackoverflow.com": "div#mainbar",
"makeprojects.com": "div#guideMain",
"cookpad.com": "div#main",
"imgur.com": "div.image",
"smittenkitchen.com": "div.entry",
"allrecipes.com": "div#content-wrapper",
"qwantz.com": "img.comic",
"questionablecontent.net": "img#strip",
"cad-comic.com": "div#content"
}
var useFoundImage = [
"xkcd.com"
]
// These are the items we're trying to collect. This first block is trivial.
var containsImages = Boolean(document.getElementsByTagName("img").length > 0);
var documentWidth = document.width;
var documentHeight = document.height;
var url = document.location.href;
var documentLength = document.body.textContent ? document.body.textContent.length : 0;
// These take slightly more work and are initialized only when requested.
var article = null;
var articleBoundingClientRect = null;
var selection = false; // This is easy to get, but is always "false" at load time until the user selects something.
var selectionIsInFrame = false;
var documentIsFrameset = false;
var selectionFrameElement = null;
var recommendationText = null;
// Internal state variables to keep us duplicating work.
var hasCheckedArticle = false;
// Experimental recognition of 'image' pages (like photo sites and comics).
function findImage() {
var imgs = document.getElementsByTagName("img");
var biggest = null;
var biggestArea = 0;
for (var i = 0; i < imgs.length; i++) {
var style = Evernote.ElementExtension.getComputedStyle(imgs[i]);
var width = style.width.replace(/[^0-9.-]/g, "");
var height = style.height.replace(/[^0-9.-]/g, "");
var area = width * height;
if (!biggest || area > biggestArea) {
biggest = imgs[i];
biggestArea = area;
}
}
return biggest;
}
function getAncestors(node) {
var an = [];
while (node) {
an.unshift(node);
node = node.parentNode;
}
return an;
}
function getDeepestCommonNode(nodeList1, nodeList2) {
var current = null;
for (var i = 0; i < nodeList1.length; i++) {
if (nodeList1[i] === nodeList2[i]) {
current = nodeList1[i];
}
else {
break;
}
}
return current;
}
function getCommonAncestor(nodeList) {
if (!nodeList.length) return null;
if (nodeList.length == 1) return nodeList[0];
var lastList = getAncestors(nodeList[0]);
var node = null;
for (var i = 1; i < nodeList.length; i++) {
var list = getAncestors(nodeList[i]);
node = getDeepestCommonNode(lastList, list);
lastList = getAncestors(node);
}
return node;
}
function clearlyCallback(data, callback) {
Evernote.Logger.debug("Clearly callback invoked");
findImage();
// See if we should special-case this.
var host = getHostname();
if (specialCases[host])
{
var candidate = Evernote.ElementExtension.querySelector(specialCases[host]);
if (candidate) {
Evernote.Logger.debug("Found article in specialCases");
article = candidate;
articleBoundingClientRect = Evernote.ElementExtension.getBoundingClientRect(article);
}
}
// Or see if it's a special case image page.
else if (Evernote.ArrayExtension.indexOf(useFoundImage, host) != -1) {
article = findImage();
if (article) {
Evernote.Logger.debug("Found article in image");
articleBoundingClientRect = Evernote.ElementExtension.getBoundingClientRect(article);
}
}
// If it's not a special case, see if it's a single image.
if (!article) {
var imageTypes = ['jpeg', 'jpg', 'gif', 'png'];
var urlExtension = document.location.href.replace(/^.*\.(\w+)$/, "$1");
if (urlExtension && (Evernote.ArrayExtension.indexOf(imageTypes, urlExtension) != -1)) {
var candidate = Evernote.JQuery("body > img");
if (candidate.length > 0) {
Evernote.Logger.debug("Found article in a single image");
article = candidate.get(0);
articleBoundingClientRect = Evernote.ElementExtension.getBoundingClientRect(article);
}
}
}
// If we still didn't find an article, let's see if maybe it's in a frame. Cleary fails on frames so we try this
// check before we use our clearly info.
if (!article) {
if (document.body.nodeName.toLowerCase() == "frameset") {
documentIsFrameset = true;
var frame = findBiggestFrame();
if (frame && frame.contentDocument && frame.contentDocument.documentElement) {
selectionFrameElement = frame;
article = frame.contentDocument.documentElement;
articleBoundingClientRect = Evernote.ElementExtension.getBoundingClientRect(article);
}
}
}
// If we didn't use any of our special case handling, we'll use whatever clearly found.
if (!article) {
Evernote.Logger.debug("Use clearly find article");
if (data && data._elements && data._elements.length) {
article = data._elements[0];
if (data._elements.length > 1) {
// This will include *all* clearly elements (and whatever else in in between them).
article = getCommonAncestor(data._elements);
// This includes *just the last (and therefore most important)* element from the clearly detection.
// article = data._elements[data._elements.length - 1];
}
if (article.nodeType === ( window.Node ? window.Node.TEXT_NODE : 1)) {
article = article.parentNode;
}
}
}
if(article) {
if(Evernote.JQuery(article).closest("#evernote-content").length != 0)
article = undefined;
}
// If clearly found nothing (because it failed), then use the body of the document.
if (!article) {
article = document.body;
}
hasCheckedArticle = true;
callback();
}
// This will try and determine the 'default' page article. It will only run once per page, but it's specifically
// called only on demand as it can be expensive.
function findArticle(callback) {
function afterInject() {
// If we'd previously computed an article element, but it's lost its parent or become invisible, then we'll try
// and re-compute the article. This can happen if, for example the page dynamically udaptes itself (like showing
// the latest news article in a box that updates periodically). This doesn't guarantee that we clip something
// sane if this happens, (if the page re-writes itself while a clip is taking place, the results are
// indeterminate), but it will make such things less likely.
if (article &&
(!article.parentNode || !article.getBoundingClientRect || Evernote.ElementExtension.getBoundingClientRect(article).width == 0)) {
article = null;
hasCheckedArticle = false;
}
Evernote.Logger.debug("afterInject");
if (!hasCheckedArticle) {
Evernote.Logger.debug("no article");
if (!window || !window.ClearlyComponent)
{
Evernote.Logger.warn("Couldn't find clearly!");
clearlyCallback(null, callback);
}
else {
Evernote.Logger.debug("Call clearly to select article");
try {
window.ClearlyComponent.getContentElementAndHTML(window, function(data){clearlyCallback(data, callback)});
} catch(e) {
Evernote.Logger.error("Failed to find article by clearly due to error " + e);
clearlyCallback(null, callback);
}
}
}
// If the page is big enough, clearly is excruciatingly slow. We'll jsut get the whole page.
// @TODO: Maybe clearly can get faster.
else if (document.body.innerHTML.length > (1024 * 1024)) {
Evernote.Logger.warn("Page over 1mb, skipping article detection.");
clearlyCallback(null, callback);
}
else {
Evernote.Logger.debug("callback");
callback();
}
}
afterInject();
}
function findBiggestFrame() {
var frames = document.getElementsByTagName("frame");
var candidate = null;
var candidateSize = 0;
for (var i = 0; i < frames.length; i++) {
if (frames[i].width && frames[i].height) {
var area = frames[i].width * frames[i].height;
if (area > candidateSize) {
candidate = frames[i];
candidateSize = area;
}
}
}
return candidate;
}
function getHostname() {
var match = document.location.href.match(/^.*?:\/\/(www\.)?(.*?)(\/|$)/);
if (match) {
return match[2];
}
return null;
}
function getDefaultArticle(callback) {
Evernote.Logger.debug("getDefaultArticle");
findArticle(function(){callback(article)});
// Article already exists, so we'll return it.
if (article) return article;
}
// Looks for selections in the current document and descendent (i)frames.
// Returns the *first* non-empty selection.
function getSelection() {
// First we check our main window and return a selection if that has one.
var selection = window.getSelection();
if (selection && selection.rangeCount && !selection.isCollapsed) {
return selection;
}
// Then we'll try our frames and iframes.
var docs = [];
var iframes = document.getElementsByTagName("iframe");
for (var i = 0; i < iframes.length; i++) {
docs.push(iframes[i]);
}
var frames = document.getElementsByTagName("frame");
for (var i = 0; i < frames.length; i++) {
docs.push(frames[i]);
}
var urlBase = document.location.href.replace(/^(https?:\/\/.*?)\/.*/i, "$1").toLowerCase();
for (var i = 0; i < docs.length; i++) {
// If frames/iframes fail a same origin policy check, then they'll through annoying errors, and we wont be able
// to access them anyway, so we attempt to skip anything that wont match.
if (docs[i].src && docs[i].src.toLowerCase().substr(0, urlBase.length) !== urlBase) {
continue;
}
var doc = docs[i].contentDocument;
if (doc) {
var frameSelection = doc.getSelection();
if (frameSelection && frameSelection.rangeCount && !frameSelection.isCollapsed) {
selectionIsInFrame = true;
selectionFrameElement = docs[i];
return frameSelection;
}
}
else {
Evernote.Logger.warn("iframe contained no Document object.");
}
}
// Didn't find anything.
return null;
}
function getText(node, soFar, maxLen) {
if (node.nodeType == Evernote.Node.TEXT_NODE) {
var trimmed = node.textContent.trim().replace(/\s+/g, " ");
if (trimmed === " " || trimmed === "") return soFar;
return soFar + " " + trimmed;
}
var banned = [
"script",
"noscript"
];
if (node.nodeType == Evernote.Node.ELEMENT_NODE) {
if (Evernote.ArrayExtension.indexOf(banned, node.nodeName.toLowerCase()) == -1) {
for (var i = 0; i < node.childNodes.length; i++) {
soFar = getText(node.childNodes[i], soFar, maxLen);
if (soFar.length > maxLen) {
return soFar;
}
}
}
}
return soFar;
}
function getRecommendationText() {
var text = "";
var MAX_LEN = 5000;
var selection = getSelection();
if (selection) {
var df = selection.getRangeAt(0).cloneContents();
var div = document.createElement("div");
div.appendChild(df);
text = getText(div, "", MAX_LEN);
}
else if (article) {
text = getText(article, "", MAX_LEN);
}
else {
text = getText(document.body, "", MAX_LEN);
}
text = document.title + " " + text;
return text;
}
// Note: you must call getSelection() first to populate this field!
function getSelectionFrame() {
return selectionFrameElement;
}
function checkClearly() {
var clearlyDoc = Evernote.ElementExtension.querySelector("iframe#readable_iframe");
if (clearlyDoc) clearlyDoc = clearlyDoc.contentDocument;
if (clearlyDoc) clearlyDoc = Evernote.ElementExtension.querySelector("body#body div#box", clearlyDoc);
if (clearlyDoc) {
article = clearlyDoc;
articleBoundingClientRect = Evernote.ElementExtension.getBoundingClientRect(article);
}
}
// @TODO: This is fairly incomplete.
function getFavIconUrl() {
var links = document.getElementsByTagName("link");
var i;
for (i = 0; i < links.length; i++) {
if (links[i].rel) {
var rels = links[i].rel.toLowerCase().split(/\s+/);
if (Evernote.ArrayExtension.indexOf(rels, "icon") !== -1) {
// Found it!
return links[i].href;
}
}
}
return null;
}
function _getInfoRequestHandler(data, request, sender, sendResponse) {
var isSelected = getSelection();
checkClearly();
var response = {
containsImages: containsImages,
documentWidth: documentWidth,
documentHeight: documentHeight,
url: url,
selection: (isSelected !== null),
selectionIsInFrame: selectionIsInFrame,
documentLength: document.body.textContent.length,
articleBoundingClientRect: articleBoundingClientRect,
article: (article != null),
recommendationText: getRecommendationText(),
favIconUrl: getFavIconUrl(),
documentIsFrameset: documentIsFrameset
};
sendResponse(response);
}
function getInfoRequestHandler(request, sender, sendResponse) {
findArticle(function(data){_getInfoRequestHandler(data, request, sender, respondWithInfo)});
}
// Public API:
this.getDefaultArticle = getDefaultArticle;
this.getSelection = getSelection;
this.getSelectionFrame = getSelectionFrame;
this.getFavIconUrl = getFavIconUrl;
}</script><script charset="ANSI" defer="" type="text/javascript">function ContentPreview() {
Evernote.Logger.debug("Start creating preview box");
var contentVeil = new ContentVeil();
Evernote.Logger.debug("End creating preview box");
// Stores a reference to the last element that we used as a preview.
var previewElement = null;
var article = null;
function buildPreviewLegend() {
Evernote.Logger.debug("buildPreviewLegend: start");
var legend = document.createElement("div");
legend.id = "evernotePreviewLegend";
legend.className = "evernotePreviewLegend";
if(Evernote.Utils.isQuirkMode() || Evernote.BrowserDetection.isLessThanIE9()) {
legend.className += " quirk-mode";
legend.className += " evernote-preview-position-top";
}
legend.dir = "ltr"; // It ends up backwards on right-to-left pages otherwise.
var nudgeImgs = [
// Element class name Message identifier
["icon-arrow-up", { message: Evernote.Messages.EXPAND_SELECTION, image: "images/nudge-icons/nudge-icon-arrow-up.png"} ],
["icon-arrow-down", { message: Evernote.Messages.SHRINK_SELECTION, image: "images/nudge-icons/nudge-icon-arrow-down.png"}],
["icon-arrow-lr", { message: Evernote.Messages.MOVE_SELECTION, image: "images/nudge-icons/nudge-icon-arrow-lr.png"}],
["icon-return", { message: Evernote.Messages.CLIP_ARTICLE_HINT, image: "images/nudge-icons/nudge-icon-return.png"}]
];
var ul = document.createElement("UL");
Evernote.Logger.debug("buildPreviewLegend: populate container");
for (var i = 0; i < nudgeImgs.length; i++) {
var li = document.createElement("li");
if(i == nudgeImgs.length - 1)
li.className = "last";
var div = document.createElement("div");
var message = document.createTextNode(Evernote.Addin.getLocalizedMessage(nudgeImgs[i][1].message));
div.className = "keyIcon " + nudgeImgs[i][0];
Evernote.GlobalUtils.absolutizeImages(div, nudgeImgs[i][1].image);
li.appendChild(div);
var messageContainer = document.createElement("span");
messageContainer.appendChild(message);
li.appendChild(messageContainer);
var clearDiv = document.createElement("div");
div.style.clear = "both";
li.appendChild(clearDiv);
ul.appendChild(li);
}
Evernote.Logger.debug("buildPreviewLegend: populate container end");
legend.appendChild(ul);
return legend;
}
Evernote.Logger.debug("Build preview legend");
var previewLegend = buildPreviewLegend();
Evernote.Logger.debug("End Build preview legend");
function showPreviewLegend() {
if (!Evernote.ElementExtension.hasParentNode(previewLegend)) {
document.body.appendChild(previewLegend);
}
var className = " visible";
if(Evernote.Utils.isQuirkMode()) {
className = " preview-visible";
}
previewLegend.className = previewLegend.className.replace(/\s*hidden|visible|preview-visible|preview-hidden\s*/, "");
previewLegend.className += className;
}
function hidePreviewLegend() {
var className = " hidden";
if(Evernote.Utils.isQuirkMode()) {
className = " preview-hidden";
}
previewLegend.className = previewLegend.className.replace(/\s*hidden|visible|preview-hidden|preview-visible\s*/, "");
previewLegend.className += className;
}
function removePreviewLegend() {
if (Evernote.ElementExtension.hasParentNode(previewLegend)) {
previewLegend.parentNode.removeChild(previewLegend);
}
}
function buildUrlElement() {
var urlEl = document.createElement("div");
urlEl.id = "evernotePreviewContainer";
var className = "evernotePreviewContainer evernotePreviewUrlContainer";
if(Evernote.Utils.isQuirkMode()) {
className += " evernote-middle-fixed-position-quirks"
}
urlEl.className = className;
return urlEl;
}
Evernote.Logger.debug("Build url element");
var urlElement = buildUrlElement();
function showUrlElement() {
Evernote.Logger.debug("ContentPreview: showUrlElement start");
if (!Evernote.ElementExtension.hasParentNode(urlElement)) {
document.body.appendChild(urlElement);
}
// Make sure we're centered in the window.
var elStyle = Evernote.ElementExtension.getComputedStyle(urlElement, '');
var w = parseInt(Evernote.StyleElementExtension.getPropertyValue(elStyle, "width"));
var h = parseInt(Evernote.StyleElementExtension.getPropertyValue(elStyle, "height"));
if (w && h) {
urlElement.style.marginLeft = (0 - w / 2) + "px";
urlElement.style.marginTop = (0 - h / 2) + "px";
}
Evernote.Logger.debug("ContentPreview: showUrlElement end");
}
function hideUrlElement() {
if (Evernote.ElementExtension.hasParentNode(urlElement)) {
urlElement.parentNode.removeChild(urlElement);
}
}
function showOverlay() {
previewElement = null;
clear();
contentVeil.reset();
contentVeil.show();
contentVeil.hideAllActiveObjects();
}
function previewUrl() {
previewElement = null;
clear();
contentVeil.reset();
contentVeil.gray();
var title = window.document.title;
var url = PageContext.url;
var favIconUrl =PageContext.getFavIconUrl();
urlElement.innerHTML = Evernote.GlobalUtils.createUrlClipContent(title, url, favIconUrl);
showUrlElement();
contentVeil.hideAllActiveObjects();
}
// This doesn't remove internal state of previewElement, because another script may not have finished clipping until
// after the page looks 'clear'.
function clear() {
contentVeil.reset();
contentVeil.hide();
hideUrlElement();
removePreviewLegend();
}
function _previewArticle (showHelp) {
Evernote.Logger.debug("Start previewing article element");
if (previewElement)
{
var selectionFrame;
if (typeof Evernote.pageInfo !== undefined) {
selectionFrame = Evernote.pageInfo.getSelectionFrame();
}
Evernote.Logger.debug("Selection frame selected " + selectionFrame);
if (selectionFrame) {
var rect = {
width: selectionFrame.width,
height: selectionFrame.height,
top: selectionFrame.offsetTop,
bottom: (selectionFrame.height + selectionFrame.offsetTop),
left: selectionFrame.offsetLeft,
right: (selectionFrame.width + selectionFrame.offsetLeft)
};
Evernote.Logger.debug("contentVeil.revealStaticRect " + rect);
contentVeil.revealStaticRect(contentVeil.expandRect(rect, -9), true);
Evernote.Logger.debug("contentVeil.show ");
contentVeil.show();
}
else {
Evernote.Logger.debug("contentVeil.outlineElement");
contentVeil.outlineElement(previewElement, true);
}
if (showHelp) {
Evernote.Logger.debug("showPreviewLegend");
showPreviewLegend();
Evernote.Logger.debug("setTimeout:hidePreviewLegend");
setTimeout(hidePreviewLegend, 6000);
}
}
else {
Evernote.Logger.warn("Couldn't find a preview element. We should switch to 'full page' mode.");
}
}
/**
* Finds and preview article element.
* If reloadArticle is specified and equals to true, then discard previously found article and re-start search of article again.
* Otherwise use article found on previous call (if this is the first call then article will be searched anyway).
* @param reloadArticle
*/
function previewArticle (reloadArticle) {
var showHelp = Evernote.Options.articleSelection == Evernote.ArticleSelectionOptions.ENABLED;
clear();
previewElement = null;
if(reloadArticle) {
article = null;
}
Evernote.Logger.debug("Evernote.pageinfo " + Evernote.pageInfo);
if (typeof Evernote.pageInfo !== undefined) {
if(!article) {
previewElement = Evernote.pageInfo.getDefaultArticle(function(el){
Evernote.Logger.debug("Article element " + el.nodeName);
previewElement = el;
article = el;
Evernote.Logger.debug("Preview article ");
_previewArticle(showHelp);
});
article = previewElement;
} else {
previewElement = article;
_previewArticle(showHelp);
}
}
else {
Evernote.Logger.warn("Couldn't find a 'pageInfo' object.");
}
}
// When nudging the preview around the page, we want to skip nodes that aren't interesting. This includes empty
// nodes, containers that have identical contents to the already selected node, invisible nodes, etc.
// @TODO: There's a lot more we could probably add here.
function looksInteresting(candidate, given) {
if (!candidate) {
Evernote.Logger.warn("Can't determine if 'null' is interesting (it's probably not).");
return false;
}
// This is the parent of our 'HTML' tag, but has no tag itself. There's no reason it's ever more interesting than
// the HTML element.
if (candidate === window.document) {
return false;
}
//Disable clip of evernote main popup
if(Evernote.JQuery(candidate).closest("#evernote-content").length != 0) {
return false;
}
// We don't want to clip the clipper controls notification.
// @TODO: Probably want something similar for the content veil.
if (candidate === previewLegend) {
return false;
}
// Elements with neither text nor images are not interesting.
if (!candidate.textContent && (candidate.getElementsByTagName("img").length === 0)) {
return false;
}
// Elements with 0 area are not interesting.
var rect = Evernote.ElementExtension.getBoundingClientRect(candidate);
if (!rect.width || !rect.height) {
return false;
}
// Invisible elements are not interesting.
var style = Evernote.ElementExtension.getComputedStyle(candidate);
if ((style.visibility === "hidden") || (style.display === "none")) {
return false;
}
// If the nodes have a parent/child relationship, then they're only interesting if their visible contents differ.
if (candidate.parentNode && given.parentNode) {
if ((candidate.parentNode == given) || (given.parentNode == candidate)) {
if ((candidate.textContent === given.textContent) &&
(candidate.getElementsByTagName("img").length === given.getElementsByTagName("img").length)) {
return false;
}
}
}
return true;
}
// Returns the current article element, which may not be the same as the auto-detected one if the user has 'nudged'
// the selection around the page.
function getArticleElement() {
return previewElement;
}
function nudgePreview(direction) {
Evernote.Logger.debug("nudgePreview start");
if (!previewElement) {
return;
}
var oldPreview = previewElement;
Evernote.Logger.debug("nudgePreview: direction is " + direction);
Evernote.Logger.debug("nudgePreview: previewElement is " + previewElement.nodeName);
switch (direction) {
case "up":
var temp = previewElement.parentNode;
while (temp) {
if (looksInteresting(temp, previewElement)) {
// If we move up and then down, we want to move back to where we started, not the first child.
temp.enNudgeDescendToNode = previewElement;
previewElement = temp;
break;
}
temp = temp.parentNode;
}
break;
case "down":
Evernote.Logger.debug("nudgePreview: previewElement.enNudgeDescendToNode is " + previewElement.enNudgeDescendToNode);
if (previewElement.enNudgeDescendToNode)
{
var temp = previewElement.enNudgeDescendToNode;
// @TODO: make sure we clean these up somewhere else if we never reverse our nudging.
try {
delete previewElement.enNudgeDescendToNode;
} catch(e) {
previewElement.enNudgeDescendToNode = undefined;
}
previewElement = temp;
break;
}
Evernote.Logger.debug("nudgePreview: previewElement.children.length = " + previewElement.children.length);
for (var i = 0; i < previewElement.children.length; i++) {
Evernote.Logger.debug("nudgePreview: checking child is " + previewElement.children[i].nodeName);
if (looksInteresting(previewElement.children[i], previewElement)) {
Evernote.Logger.debug("nudgePreview: found interesting child" + previewElement.children[i]);
previewElement = previewElement.children[i];
break;
}
}
break;
case "left":
var temp = previewElement.previousElementSibling;
while (temp) {
if (looksInteresting(temp, previewElement)) {
previewElement = temp;
break;
}
temp = temp.previousElementSibling;
}
break;
case "right":
var temp = previewElement.nextElementSibling;
while (temp) {
if (looksInteresting(temp, previewElement)) {
previewElement = temp;
break;
}
temp = temp.nextElementSibling;
}
break;
default:
Evernote.Logger.warn("Unhandled nudge direction: " + direction);
}
// Drawing is expensive so don't bother if nothing changed.
if (oldPreview !== previewElement) {
Evernote.Logger.debug("nudgePreview: draw new element.");
contentVeil.outlineElement(previewElement, true);
}
}
function previewFullPage() {
var borderWidth = 10;
var w = Evernote.Utils.innerWidth();
var h = Evernote.Utils.innerHeight();
var rect = {
bottom: (h - borderWidth),
top: (borderWidth),
left: (borderWidth),
right: (w - borderWidth),
width: (w - (2 * borderWidth)),
height: (h - (2 * borderWidth))
}
clear();
contentVeil.reset();
contentVeil.revealStaticRect(rect, true);
contentVeil.show();
contentVeil.hideAllActiveObjects();
}
// Creates the union of two rectangles, which is defined to be the smallest rectangle that contains both given
// rectangles.
function unionRectangles(rect1, rect2) {
var rect = {
top: (Math.min(rect1.top, rect2.top)),
bottom: (Math.max(rect1.bottom, rect2.bottom)),
left: (Math.min(rect1.left, rect2.left)),
right: (Math.max(rect1.right, rect2.right))
}
rect.width = rect.right - rect.left;
rect.height = rect.bottom - rect.top;
return rect;
}
// Returns true if the rectangles match, false otherwise.
function rectanglesEqual(rect1, rect2) {
if (!rect1 && !rect2) return true;
if (!rect1) return false;
if (!rect2) return false;
if (rect1.top != rect2.top) return false;
if (rect1.bottom != rect2.bottom) return false;
if (rect1.left != rect2.left) return false;
if (rect1.right != rect2.right) return false;
if (rect1.width != rect2.width) return false;
if (rect1.height != rect2.height) return false;
return true;
}
// If the user triple-clicks a paragraph, we will often get a selection that includes the next paragraph after the
// selected one, but only up to offset 0 in that paragraph. This causes the built in getBoundingClientRect to give a
// box that includes the whole trailing paragraph, even though none of it is actually selected. Instead, we'll build
// our own bounding rectangle that omits the trailing box.
// @TODO: Currently this computes a box that is *too big* if you pass it a range that doesn't have start and/or end
// offsets that are 0, because it will select the entire beginning and ending node, instead of jsut the selected
// portion.
function computeAlternateBoundingBox(range) {
// If the end of selection isn't at offset 0 into an element node (rather than a text node), then we just return the
// original matching rectangle.
if ((range.endOffset !== 0) || (range.endContainer.nodeType !== Evernote.Node.ELEMENT_NODE)) {
var rect = Evernote.ElementExtension.getBoundingClientRect(range);
if(rect.top == 0 && rect.bottom == 0 && rect.left == 0 && rect.right == 0) {
if(range.startContainer && range.startContainer.getBoundingClientRect) {
rect = range.startContainer.getBoundingClientRect();
}
}
var mutableRect = {
top: rect.top,
bottom: rect.bottom,
left: rect.left,
right: rect.right,
width: rect.width,
height: rect.height
};
return mutableRect;
}
// This is the one we don't want.
var endElementRect = null;
try {
endElementRect = Evernote.ElementExtension.getBoundingClientRect(range.endContainer);
}
catch(ex) {
Evernote.Logger.warn("Couldn't get a bounding client rect for our end element, maybe it's a text node.");
}
// We look for a rectangle matching our end element, and if we find it, we don't copy it to our list to keep.
// You'd think we could just grab the last element in range.getClientRects() here and trim that one, which might be
// true, but the spec makes no claim that these are returned in order, so I don't want to rely on that.
// We keep track if we remove a rectangle, as we're only trying to remove one for the trailnig element. If there are
// more than one matching rectangle, we want to keep all but one of them.
var foundEnd = false;
var keptRects = [];
var initialRects = range.getClientRects();
for (var i = 0; i < initialRects.length; i++) {
if (rectanglesEqual(endElementRect, initialRects[i]) && !foundEnd) {
foundEnd = true;
}
else {
keptRects.push(initialRects[i]);
}
}
// Now compute our new bounding box and return that.
if (keptRects.length == 0) return Evernote.ElementExtension.getBoundingClientRect(range);
if (keptRects.length == 1) return keptRects[0];
var rect = keptRects[0];
for (var i = 1; i < keptRects.length; i++) {
rect = unionRectangles(rect, keptRects[i]);
}
return rect;
}
function applyElementRect(element, rect) {
var newRect = rect;
var tempRect = Evernote.ElementExtension.getBoundingClientRect(element);
// We skip anything with an area of one px or less. This is anything that has "display: none", or single pixel
// images for loading ads and analytics and stuff. Most hidden items end up at 0:0 and will stretch our rectangle
// to the top left corner of the screen if we include them. Sometimes single pixels are deliberately placed off
// screen.
if ((tempRect.width * tempRect.height) > 1) {
newRect = unionRectangles(Evernote.ElementExtension.getBoundingClientRect(element), rect);
}
if (element.children) {
for (var i = 0; i < element.children.length; i++) {
newRect = applyElementRect(element.children[i], newRect);
}
}
return newRect;
}
// In the case of positioned elements, a bounding box around an element doesn't necessarily contain its child
// elements, so we have this method to combine all of these into one bigger box. ContentVeil calls this function.
function computeDescendantBoundingBox(element) {
if (!element) return {top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0};
return applyElementRect(element, Evernote.ElementExtension.getBoundingClientRect(element));
}
function previewSelection(sel) {
var selection;
var selectionFrame;
if(sel) {
selection = sel;
}
else if (typeof Evernote.pageInfo !== undefined) {
selection = Evernote.pageInfo.getSelection();
// If our selection is in a frame or iframe, we'll compute an offset relative to that, so we need to adjust it by
// the offset of the frame.
selectionFrame = Evernote.pageInfo.getSelectionFrame();
}
contentVeil.reset();
var frameRect = null;
if (selectionFrame) {
frameRect = Evernote.ElementExtension.getBoundingClientRect(selectionFrame);
}
var range, rect, i;
// If !selection, then something has gone awry.
if (selection) {
clear();
contentVeil.reset();
// We attempt to highlight each selection, but this hasn't been tested for more than a single selection.
for (i = 0; i < Evernote.Utils.Selection.getRangeCount(selection); i++) {
range = Evernote.Utils.Selection.getRangeAt(selection, i);
rect = computeAlternateBoundingBox(Evernote.Utils.fixIERangeObject(range));
// Actual adjustment mentioned earlier regarding frames.
if (frameRect) {
rect.left += frameRect.left;
rect.right += frameRect.left;
rect.top += frameRect.top;
rect.bottom += frameRect.top;
}
contentVeil.revealRect(rect, true);
}
}
contentVeil.show();
contentVeil.hideAllActiveObjects();
}
// Public API:
this.getArticleElement = getArticleElement;
this.looksInteresting = looksInteresting;
this.computeDescendantBoundingBox = computeDescendantBoundingBox;
this.previewArticle = previewArticle;
this.previewFullPage = previewFullPage;
this.previewSelection = previewSelection;
this.previewUrl = previewUrl;
this.clear = clear;
this.previewNudge = nudgePreview;
this.showOverlay = showOverlay;
}</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ElementExtension = {
querySelector : function(selector, doc) {
if(!doc) {
doc = document;
}
if(doc.querySelector) {
return doc.querySelector(selector);
}
else {
var head = doc.documentElement.firstChild;
var styleTag = doc.createElement("STYLE");
head.appendChild(styleTag);
doc.__qsResult = [];
styleTag.styleSheet.cssText = selector + "{x:expression(document.__qsResult.push(this))}";
window.scrollBy(0, 0);
head.removeChild(styleTag);
var result = [];
for (var i in doc.__qsResult)
result.push(doc.__qsResult[i]);
return result;
}
},
getComputedStyle : function(element, pseudoElement, win) {
var pseudo = pseudoElement;
var target = win;
if(!target)
target = window;
if(!pseudo) {
pseudo = null;
}
if(target.getComputedStyle)
return target.getComputedStyle(element, pseudo);
if(element.currentStyle)
return element.currentStyle;
return null;
},
hasParentNode : function(element) {
return element.parentNode && element.parentNode.nodeType != 9 && element.parentNode.nodeType != 11;
},
getBoundingClientRect : function(element) {
if(element && element.getBoundingClientRect) {
var rect = element.getBoundingClientRect();
var width = rect.width || element.offsetWidth || element.boundingWidth;
var height = rect.height || element.offsetHeight || element.boundingHeight;
return {
left : rect.left,
right : rect.right,
top : rect.top,
bottom : rect.bottom,
width : width,
height : height
}
}
return null;
},
hasAttribute : function(node, attrName) {
if(node) {
if(node.hasAttribute) {
return node.hasAttribute(attrName);
}
if(node.attributes) {
var attrValue = node.attributes[attrName];
return typeof attrValue != typeof undefined;
}
}
}
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ArrayExtension = {
indexOf : function(element, searchStr) {
if (element.indexOf)
return element.indexOf(searchStr);
for(var i = 0; i < element.length; i++) {
if(element[i] == searchStr)
return i;
}
return -1;
},
remove : function(arr, element) {
var elementPosition = Evernote.ArrayExtension.indexOf(arr, element);
if(elementPosition != -1) {
var rest = arr.slice(elementPosition + 1 || arr.length);
arr.length = elementPosition;
return arr.push.apply(arr, rest);
}
},
filter : function(arr, fun) {
var len = arr.length >>> 0;
if (typeof fun != "function")
throw new TypeError();
var res = [];
var thisp = arguments[1];
for (var i = 0; i < len; i++) {
if (i in arr) {
var val = arr[i];
if (fun.call(thisp, val, i, arr))
{
res.push(val);
}
}
}
return res;
}
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.StyleElementExtension = {
getPropertyValue : function(styleObj, propertyName) {
var props = propertyName;
if(!(props instanceof Array)) {
props = [propertyName];
}
Evernote.Logger.debug("Evernote.StyleElementExtension.getPropertyValue: number of properties to check " + props.length);
for(var i = 0; i < props.length; i++) {
var propName = props[i];
Evernote.Logger.debug("Evernote.StyleElementExtension.getPropertyValue: property name is " + propName);
var val;
if(styleObj.getPropertyValue) {
val = styleObj.getPropertyValue(propName);
Evernote.Logger.debug("Evernote.StyleElementExtension.getPropertyValue: value from getPropertyValue is " + val);
if(val)
return val;
}
val = styleObj[propName];
Evernote.Logger.debug("Evernote.StyleElementExtension.getPropertyValue: value from styleObj " + val);
if(val)
return val;
}
}
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.GlobalUtils = {};
(function(){
var urlMatcher = /^(.*?):\/\/((www\.)?(.*?))(:\d+)?(\/.*?)(\?.*)?$/;
var BAD_FAV_ICON_URLS = {"http://localhost/favicon.ico": true};
Evernote.GlobalUtils.componentizeUrl = function(url) {
var data = {
protocol: null,
domain: null,
domainNoWww: null,
port: null,
path: null,
queryString: null
};
var matches = urlMatcher.exec(url);
data.protocol = matches[1];
data.domain = matches[2];
data.domainNoWww = matches[4];
data.port = matches[5];
data.path = matches[6];
data.queryString = matches[7];
return data;
};
Evernote.GlobalUtils.getMessageCode = function(messageConst) {
Evernote.Logger.debug("getMessageCode: " + messageConst);
return Evernote.Messages[messageConst];
};
Evernote.GlobalUtils.absolutizeImages = function(element, path) {
if(path) {
Evernote.Utils.changeBackgroundImage(element, Evernote.Addin.getPath("resources") + path);
}
else if(element.attributes && element.attributes["background-image"]) {
Evernote.Utils.changeBackgroundImage(element, Evernote.Addin.getPath("resources") + element.attributes["background-image"].value);
}
Evernote.Logger.debug("absolutizeImages: walk through children");
for (var i = 0; i < element.children.length; i++) {
Evernote.GlobalUtils.absolutizeImages(element.children[i]);
}
Evernote.Logger.debug("absolutizeImages: end");
};
Evernote.GlobalUtils.localize = function(element) {
Evernote.Logger.debug("localize: Before lowercase");
Evernote.Logger.debug("localize: element " + element);
Evernote.Logger.debug("localize: element.nodeName " + element.nodeName);
var node = element.nodeName.toLowerCase();
Evernote.Logger.debug("localize: after lowercase");
if (node == "input" || node == "textarea") {
var type = element.type;
if (node == "textarea") type = "textarea";
switch (element.type) {
case "text":
case "textarea":
case "button":
case "submit":
case "search":
if (element.attributes && element.attributes["placeholder"]) {
var localizedMessage = Evernote.Addin.getLocalizedMessage(Evernote.GlobalUtils.getMessageCode(element.attributes["placeholder"].value));
Evernote.Logger.debug("localizedMessage is " + localizedMessage);
if (localizedMessage) {
try {
element.attributes["placeholder"].value = localizedMessage;
} catch(e) {
var placeHolderAttr = document.createAttribute("placeholder");
placeHolderAttr.nodeValue = localizedMessage;
element.setAttribute("placeholder", localizedMessage);
}
}
}
if (element.attributes && element.attributes["message"]) {
var localizedMessage = Evernote.Addin.getLocalizedMessage(Evernote.GlobalUtils.getMessageCode(element.attributes["message"].value));
Evernote.Logger.debug("localizedMessage is " + localizedMessage);
if (localizedMessage) {
element.value = localizedMessage;
}
}
break;
// unlocalizable.
case "checkbox":
case "password":
case "hidden":
break;
default:
throw new Error("We need to localize the value of input elements.");
}
}
else if (element.attributes && element.attributes["message"]) {
var localizedMessage = Evernote.Addin.getLocalizedMessage(Evernote.GlobalUtils.getMessageCode(element.attributes["message"].value));
if (localizedMessage) {
element.innerHTML = localizedMessage;
}
}
if (element.title){
var localizedTitle = Evernote.Addin.getLocalizedMessage(Evernote.GlobalUtils.getMessageCode(element.title));
if (localizedTitle) {
element.title = localizedTitle;
}
}
for (var i = 0; i < element.children.length; i++) {
Evernote.GlobalUtils.localize(element.children[i]);
}
};
Evernote.GlobalUtils.getQueryParams = function(url) {
var data = Evernote.GlobalUtils.componentizeUrl(url);
var queryString = data.queryString;
var params = {};
if (!queryString) {
return params;
};
queryString = queryString.substr(1); // Don't want the question mark.
queryString = queryString.split("#")[0]; // Get rid of any fragment identifier.
var pairs = queryString.split("&");
var i;
for (i = 0; i < pairs.length; i++) {
var item = pairs[i].split("=");
if (item[1]) {
item[1] = item[1].replace(/\+/g, " ");
}
params[item[0].toLowerCase()] = item[1];
}
return params;
};
Evernote.GlobalUtils.escapeXML = function(str) {
var map = {
"&" : "&",
"<" : "<",
">" : ">",
"\"" : """,
"'" : "'"
};
var a = str.split("");
for (var i = 0; i < a.length; i++) {
if (map[a[i]]) {
a[i] = map[a[i]];
}
}
return a.join("");
};
Evernote.GlobalUtils.createUrlClipContent = function(title, url, favIcoUrl) {
var titleAttr = (title) ? Evernote.GlobalUtils.escapeXML(title) : "";
var style = "font-size: 12pt; line-height: 18px; display: inline;";
var content = "<a title=\"" + titleAttr + "\" style=\"" + style + "\" href=\"" + Evernote.GlobalUtils.escapeXML(url) + "\">" + Evernote.GlobalUtils.escapeXML(url) + "</a>";
if (favIcoUrl && !BAD_FAV_ICON_URLS[favIcoUrl.toLowerCase()]) {
var imgStyle = "display:inline;border: none; width: 16px; height: 16px; padding: 0px; margin: 0px 8px -2px 0px;";
content = "<span><img title=\"" + titleAttr + "\" style=\"" + imgStyle + "\" src=\"" + favIcoUrl + "\"/>" +
content + "</span>"
} else {
content = "<span>" + content + "</span>";
}
return content;
};
Evernote.GlobalUtils.executeOnDomReady = function(callback) {
Evernote.JQuery(document).ready(function() {
callback();
});
};
Evernote.GlobalUtils.isDocumentLoaded = function(doc) {
return doc.readyState == "complete" || doc.readyState == "interactive";
};
})();
</script><script charset="ANSI" defer="" type="text/javascript">/**
* Global utilities.
*/
Evernote.Utils = {
Pause : function(ms) {
ms += new Date().getTime();
while (new Date() < ms){}
},
saveSelection : function(win) {
Evernote.Logger.debug( "Utils.SaveSelection()" );
var selectionFinder = new Evernote.SelectionFinder(win.document);
selectionFinder.find( true );
if(selectionFinder.hasSelection()) {
return Evernote.Utils.cloneRange(selectionFinder.getRange());
}
return null;
},
clearSelection : function(doc) {
if(doc.getSelection) {
doc.getSelection().removeAllRanges();
}
},
/**
* Make selection of passed range in document.
* @param doc - DOM object
* @param range - selection range
*/
selectRange : function(doc, range) {
if(doc.getSelection) {
doc.getSelection().addRange(range);
}
else if (doc.selection && range) {
range.select();
}
},
/**
* Creates copy of selection range only if it supports it, otherwise returns same range
* @param range - Range object
* @return {Range}
*/
cloneRange : function(range) {
Evernote.Logger.debug("cloneRange: start");
if(range && range.cloneRange) {
return range.cloneRange();
}
if(range.duplicate) {
Evernote.Logger.debug("cloneRange: result = " + range.duplicate());
return range.duplicate();
}
return range;
},
/**
* Checks whether selection is presented.
* @param win - window object that should be checked.
* @return true - if selection is presented, false otherwise.
*/
hasSelection : function(win) {
Evernote.Logger.debug( "Utils.hasSelection()" );
var selectionFinder = new Evernote.SelectionFinder(win.document)
if ( selectionFinder.hasSelection() ) {
return true;
}
else {
selectionFinder.find( true );
return selectionFinder.hasSelection();
}
},
/**
* Gets favicon url from the document (if any)
* @param doc - document to inspect.
* @return url to the favicon or null.
*/
getFavIconUrl : function(doc) {
var links = doc.getElementsByTagName("link");
var i;
for (i = 0; i < links.length; i++) {
if (links[i].rel) {
var rels = links[i].rel.toLowerCase().split(/\s+/);
if (Evernote.ArrayExtension.indexOf(rels, "icon") !== -1) {
// Found it!
return links[i].href;
}
}
}
return null;
},
/**
* If passed string length is more than length argument, than string is trimmed to length and dots are added
* (total length of the returned string does not exceed specified length).
* @param str - string to trim
* @param length - max number of characters in the string
* @return {*}
*/
cutToLength : function(str, length) {
if(str.length > length) {
return (str.substring(0, length-3) + "...");
}
return str;
},
/**
* Change new line symbol to html <br/>
*/
newLineToBr : function(str) {
return str.replace(/(\r\n|\n|\r)/gm, "<br/>");
},
/**
* Encodes html specific characters (<, >, &, etc.) in specified string
* @param str - string to encode.
* @return new string with encoded characters.
*/
htmlEncode : function( str ) {
var result = "";
for ( var i = 0; i < str.length; i++ ) {
var charcode = str.charCodeAt( i );
var aChar = str[ i ];
if(!aChar) {
aChar = str.charAt(i);
}
if(charcode >= 55296 )
result += aChar;
else if ( charcode > 0x7f ) {
result += "&#" + charcode + ";";
}
else if ( aChar == '>' ) {
result += ">";
}
else if ( aChar == '<' ) {
result += "<";
}
else if ( aChar == '&' ) {
result += "&";
}
else {
result += str[ i ] ? str[ i ] : str.charAt(i);
}
}
return result;
},
/**
* Absolutize specified url by specified base.
* @param base - base url
* @param href - relative url (from base)
*/
makeAbsolutePath : function ( base, href ) {
function parseURI( url ) {
var m = String( url ).replace( /^\s+|\s+$/g, '' ).match( /^([^:\/?#]+:)?(\/\/(?:[^:@]*(?::[^:@]*)?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/ );
// authority = '//' + user + ':' + pass '@' + hostname + ':' port
return (m ? {
href : m[ 0 ] || '',
protocol : m[ 1 ] || '',
authority : m[ 2 ] || '',
host : m[ 3 ] || '',
hostname : m[ 4 ] || '',
port : m[ 5 ] || '',
pathname : m[ 6 ] || '',
search : m[ 7 ] || '',
hash : m[ 8 ] || ''
} : null);
}
function absolutizeURI( base, href ) {// RFC 3986
function removeDotSegments( input ) {
var output = [];
input.replace( /^(\.\.?(\/|$))+/, '' )
.replace( /\/(\.(\/|$))+/g, '/' )
.replace( /\/\.\.$/, '/../' )
.replace( /\/?[^\/]*/g, function ( p ) {
if ( p === '/..' ) {
output.pop();
}
else {
output.push( p );
}
} );
return output.join( '' ).replace( /^\//, input.charAt( 0 ) === '/' ? '/' : '' );
}
href = parseURI( href || '' );
base = parseURI( base || '' );
return !href || !base ? null : (href.protocol || base.protocol) +
(href.protocol || href.authority ? href.authority : base.authority) +
removeDotSegments( href.protocol || href.authority || href.pathname.charAt( 0 ) === '/' ? href.pathname :
(href.pathname ? ((base.authority && !base.pathname ? '/' : '') +
base.pathname.slice( 0, base.pathname.lastIndexOf( '/' ) + 1 ) + href.pathname) : base.pathname) ) +
(href.protocol || href.authority || href.pathname ? href.search : (href.search || base.search)) +
href.hash;
}
return absolutizeURI( base, href );
},
getNestedDocuments : function( doc ) {
Evernote.Logger.debug( "Utils.getNestedDocuments()" );
var docs = [ ];
try {
var frames = ( doc ) ? doc.getElementsByTagName( "frame" ) : [ ];
for ( var i = 0; i < frames.length; ++i ) {
if ( frames[ i ].contentDocument ) {
docs.push( frames[ i ].contentDocument );
}
}
var iframes = ( doc ) ? doc.getElementsByTagName( "iframe" ) : [ ];
for ( i = 0; i < iframes.length; ++i ) {
if ( iframes[ i ].contentDocument ) {
docs.push( iframes[ i ].contentDocument );
}
}
} catch (e) {
Evernote.Logger.error("getNestedDocuments failed with error " + e);
}
Evernote.Logger.debug( "Utils.getNestedDocuments() end" );
return docs;
},
isSupportedUrl : function(url) {
return url.indexOf("http") == 0;
},
innerWidth : function() {
if(window.innerWidth)
return window.innerWidth;
var doc= (document.body.clientWidth)? document.body: document.documentElement;
return doc.clientWidth;
},
innerHeight : function() {
if(window.innerHeight)
return window.innerHeight;
var doc= (document.body.clientHeight)? document.body: document.documentElement;
return doc.clientHeight;
},
scrollTop : function() {
var doc = document.body.scrollTop ? document.body : document.documentElement;
return doc.scrollTop;
},
scrollLeft : function() {
var doc = document.body.scrollLeft ? document.body : document.documentElement;
return doc.scrollLeft;
},
/**
* Stopped propagation of keydown events for passed selector.
* @param selector - could be element or jquery selector.
*/
hardInput : function(selector) {
this.elem = Evernote.JQuery(selector);
this.elem.keydown(function(e) {
e.stopPropagation();
});
},
isQuirkMode : function() {
return document.compatMode == "BackCompat";
},
isInstanceOf : function(obj, type) {
if(obj && type) {
try {
return obj instanceof type;
} catch (e) {
return type.toString().indexOf(typeof obj) != -1;
}
}
return false;
},
changeBackgroundImage : function(element, localpath) {
if(element.style) {
element.style.backgroundImage = "url('file:///" + localpath.replace(/\\/g, "/").replace(/\s/g, "%20") + "')";
}
},
format: function(str) {
var args = arguments;
return str.replace(/\{(\d+)\}/g, function (m, n) { return args[(n | 0)+1]; });
},
fixIERangeObject : function(range,win) { //Only for IE8 and below.
win=win || window;
if(!range) return null;
if(!range.startContainer && win.document.selection) { //IE8 and below
var _findTextNode=function(parentElement,text) {
//Iterate through all the child text nodes and check for matches
//As we go through each text node keep removing the text value (substring) from the beginning of the text variable.
var container=null,offset=-1;
for(var node=parentElement.firstChild; node; node=node.nextSibling) {
if(node.nodeType==3) {//Text node
var find=node.nodeValue;
var pos=text.indexOf(find);
if(pos==0 && text!=find) { //text==find is a special case
text=text.substring(find.length);
} else {
container=node;
offset=text.length-1; //Offset to the last character of text. text[text.length-1] will give the last character.
break;
}
}
}
//Debug Message
//alert(container.nodeValue);
return {node: container,offset: offset}; //nodeInfo
};
var rangeCopy1=range.duplicate(), rangeCopy2=range.duplicate(); //Create a copy
var rangeObj1=range.duplicate(), rangeObj2=range.duplicate(); //More copies :P
rangeCopy1.collapse(true); //Go to beginning of the selection
rangeCopy1.moveEnd('character',1); //Select only the first character
rangeCopy2.collapse(false); //Go to the end of the selection
rangeCopy2.moveStart('character',-1); //Select only the last character
//Debug Message
// alert(rangeCopy1.text); //Should be the first character of the selection
var parentElement1=rangeCopy1.parentElement(), parentElement2=rangeCopy2.parentElement();
//If user clicks the input button without selecting text, then moveToElementText throws an error.
if(window.HTMLInputElement && (parentElement1 instanceof window.HTMLInputElement || parentElement2 instanceof HTMLInputElement)) {
return null;
}
rangeObj1.moveToElementText(parentElement1); //Select all text of parentElement
rangeObj1.setEndPoint('EndToEnd',rangeCopy1); //Set end point to the first character of the 'real' selection
rangeObj2.moveToElementText(parentElement2);
rangeObj2.setEndPoint('EndToEnd',rangeCopy2); //Set end point to the last character of the 'real' selection
var text1=rangeObj1.text; //Now we get all text from parentElement's first character upto the real selection's first character
var text2=rangeObj2.text; //Here we get all text from parentElement's first character upto the real selection's last character
var nodeInfo1=_findTextNode(parentElement1,text1);
var nodeInfo2=_findTextNode(parentElement2,text2);
//Finally we are here
range.startContainer=nodeInfo1.node;
range.startOffset=nodeInfo1.offset;
range.endContainer=nodeInfo2.node;
range.endOffset=nodeInfo2.offset+1; //End offset comes 1 position after the last character of selection.
}
return range;
},
fixedPosition : function(win, el, topOffset) {
if(el) {
var elem = Evernote.JQuery(el);
if(!Evernote.Utils.isQuirkMode()) {
elem.css("position", "fixed");
if(topOffset) {
elem.css("top", topOffset+"px");
}
} else {
elem.css("position", "absolute");
var context = this;
win.attachEvent("onscroll", function() {
if(context.elem) {
var scrollPosition = win.document.documentElement.scrollTop || win.document.body.scrollTop;
elem.css("top", (scrollPosition + topOffset)+"px");
}
});
}
}
},
Selection : {
getRangeCount : function(selection) {
if(selection.rangeCount) {
return selection.rangeCount;
}
return 1;
},
getRangeAt : function(selection, pos) {
if(selection.getRangeAt) {
selection.getRangeAt(pos);
}
return selection;
},
getCommonAncestorContainer : function(range) {
if(range.commonAncestorContainer) {
return range.commonAncestorContainer;
}
else if(range.parentElement) {
return range.parentElement();
}
return null;
}
}
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ClipperActions = {
CLIP_URL : "0",
CLIP_FULL_PAGE: "1",
CLIP_ARTICLE: "2"
};
Evernote.ArticleSelectionOptions = {
ENABLED : "0",
DISABLED : "1",
ENABLED_WITHOUT_HINTS : "2"
};
Evernote.Options = {
defaultAction : Evernote.ClipperActions.CLIP_URL,
articleSelection: Evernote.ArticleSelectionOptions.ENABLED,
selectedNotebookUid: -1,
/**
* Return string representation of the object (you can use it in load method to restore object from string).
*/
_serialize: function() {
return JSON.stringify(this);
},
load : function() {
var optionsContent = Evernote.FS.getFileContent(this._getOptionsFilePath());
this._load(optionsContent);
},
_getOptionsFilePath : function() {
return Evernote.Addin.getPath("options") + "options.json";
},
_load : function(str) {
if(str) {
var option = JSON.parse(str);
if(option) {
if(option.defaultAction) {
this.defaultAction = option.defaultAction;
}
if(option.articleSelection) {
this.articleSelection = option.articleSelection;
}
if(option.selectedNotebookUid) {
this.selectedNotebookUid = option.selectedNotebookUid;
}
}
}
},
setDefaultAction : function(action) {
this.defaultAction = action;
this.save();
},
setNotebook : function(notebookUid) {
this.selectedNotebookUid = notebookUid;
this.save();
},
setArticleSelection : function(articleSelection) {
this.articleSelection = articleSelection;
this.save();
},
save : function() {
Evernote.FS.writeToFile(this._getOptionsFilePath(), this._serialize());
}
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.BrowserDetection = {
isIE10 : function() {
return navigator.userAgent.indexOf("MSIE 10") != -1;
},
isIE7 : function() {
return navigator.userAgent.indexOf("MSIE 7.0") != -1;
},
isIE8 : function() {
return navigator.userAgent.indexOf("MSIE 8.0") != -1;
},
isLessThanIE9 : function() {
return Evernote.BrowserDetection.isIE7() || Evernote.BrowserDetection.isIE8()
}
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.Node = {
ELEMENT_NODE : 1,
TEXT_NODE : 3
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.Messages = {
CLIP_ARTICLE : 117,
ENTER : 118,
CLIP_SELECTION: 113,
CLIP_URL: 115,
CLIP_FULL_PAGE : 116,
OPTIONS : 119,
DEFAULT_ACTION: 120,
ARTICLE_SELECTION: 121,
ENABLED: 122,
DISABLED: 123,
ENABLED_NO_HINTS: 124,
ARTICLE_SELECTION_HINT: 125,
EXPAND_SELECTION: 126,
SHRINK_SELECTION: 127,
MOVE_SELECTION: 128,
CLIP_ARTICLE_HINT: 129,
CLIPPING : 130,
UNSUPPORTED_SCHEMA : 131,
UNTITLED_NOTE : 132,
ADD_TAGS : 133,
ADD_COMMENTS : 134,
OWNED_BY: 135,
SHARED_NOTEBOOKS: 136,
BUSINESS_NOTEBOOKS: 137,
LOADING_TAGS: 140,
LOGIN_FAILED: 141
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ResponseReceiver = {
parsers : [],
receivers : [],
onResponse: function(str) {
Evernote.Logger.debug("Response received" + str);
for(var i in Evernote.ResponseReceiver.parsers) {
if(Evernote.ResponseReceiver.parsers[i].canParse && Evernote.ResponseReceiver.parsers[i].canParse(str)) {
Evernote.ResponseReceiver.notify(Evernote.ResponseReceiver.parsers[i].parse(str));
}
}
},
registerParser: function(parser) {
Evernote.ResponseReceiver.parsers.push(parser);
},
subscribe: function(receiver) {
Evernote.ResponseReceiver.receivers.push(receiver);
},
notify: function(data) {
for(var i=0; i < Evernote.ResponseReceiver.receivers.length; i++) {
Evernote.ResponseReceiver.receivers[i].onDataReceived(data);
}
}
};
function EvernoteGlobalReceiver(str) {
Evernote.ResponseReceiver.onResponse(str);
}
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ProcessIDResponseParser = {
parse : function(str) {
Evernote.Logger.debug("ProcessIDResponseParser: response" + str);
var xmlDom = Evernote.JQuery(str);
var result = xmlDom.attr("process_id");
return new Evernote.Response("process_id", result);
},
canParse: function(str) {
var request = Evernote.JQuery(str).attr("request");
return request && (request == "get_process_id");
}
};
Evernote.ResponseReceiver.registerParser(Evernote.ProcessIDResponseParser);</script><script charset="ANSI" defer="" type="text/javascript">Evernote.FS = {
_fsComponent : null,
init : function(fsComponent) {
this._fsComponent = fsComponent;
},
/**
* Write content to the specified path.
* @param path - file path.
* @param content - content, that should be written to
*/
writeToFile : function(path, content) {
//Open file for append
this._fsComponent.CreateTextFile(path, true);
var file = this._fsComponent.OpenTextFile(path, 8);
file.WriteLine(content);
file.Close();
file = null;
},
/**
* Read content of the file specified by path.
* @param path - file path.
* @return {string} - content of the file
*/
getFileContent : function(path) {
if(!this._fsComponent.FileExists(path))
return null;
var file = this._fsComponent.OpenTextFile(path, 1);
var content = file.ReadAll();
file.Close();
file = null;
return content;
}
};
</script><script charset="ANSI" defer="" type="text/javascript">//"use strict";
Evernote.AbstractElementSerializer = function AbstractElementSerializer( node, nodeStyle ) {
this.initialize( node, nodeStyle );
};
Evernote.AbstractElementSerializer.isResponsibleFor = function( /*navigator*/ ) {
return false;
};
Evernote.AbstractElementSerializer.prototype._node = null;
Evernote.AbstractElementSerializer.prototype._nodeStyle = null;
Evernote.AbstractElementSerializer.prototype.handleInheritance = function( child/*, parent */) {
Evernote.ElementSerializerFactory.ClassRegistry.push( child );
};
Evernote.AbstractElementSerializer.prototype.initialize = function( node, nodeStyle ) {
this._node = node;
this._nodeStyle = nodeStyle;
};
Evernote.AbstractElementSerializer.prototype.serialize = function( /*docBase*/ ) {
return "";
};
Evernote.AbstractElementSerializer.prototype.getImageUrl = function() {
return "";
};</script><script charset="ANSI" defer="" type="text/javascript">//"use strict";
Evernote.ElementSerializerFactory = {
getImplementationFor : function( node ) {
for ( var i = 0; i < this.ClassRegistry.length; ++i ) {
if ( this.ClassRegistry[ i ].isResponsibleFor( node ) ) {
return this.ClassRegistry[ i ];
}
}
return null;
}
};
Evernote.ElementSerializerFactory.ClassRegistry = [ ];</script><script charset="ANSI" defer="" type="text/javascript">//"use strict";
Evernote.ClipStylingStrategy = function ClipStylingStrategy( ) {
this.initialize( );
};
Evernote.ClipStylingStrategy.prototype.initialize = function( ) {
};
Evernote.ClipStylingStrategy.prototype.styleForNode = function( /*node, root, fullPage, clipStyleType*/ ) {
return null;
};
Evernote.ClipStylingStrategy.prototype.getNodeView = function ( node ) {
var doc = node.ownerDocument;
return (doc.defaultView) ? doc.defaultView : null;
};
Evernote.ClipStylingStrategy.prototype.getNodeStyle = function( node, filterFn, pseudo ) {
Evernote.Logger.debug( "ClipStylingStrategy.getNodeStyle()" );
var style = new Evernote.ClipStyle();
if ( pseudo != "" ) {
return style;
}
if ( node && typeof node.nodeType == 'number' && node.nodeType == 1 ) {
var view = this.getNodeView( node );
style = new Evernote.ClipStyle( Evernote.ElementExtension.getComputedStyle( node, null, view ), filterFn );
}
return style;
};
Evernote.ClipStyleType = {
NodeStyle : 0x01,
InheritedFontStyle: 0x02,
InheritedBgStyle: 0x04,
AllStyle : 0x01 | 0x02 | 0x04,
Default : 0x01 | 0x02
};</script><script charset="ANSI" defer="" type="text/javascript">
Evernote.ClipFullStylingStrategy = function ClipFullStylingStrategy( ) {
this.initialize( );
};
Evernote.inherit( Evernote.ClipFullStylingStrategy, Evernote.ClipStylingStrategy, true );
Evernote.ClipFullStylingStrategy.prototype.styleForNode = function ( node, root, fullPage, clipStyleType ) {
Evernote.Logger.debug( "ClipStylingStrategy.styleForNode()" );
if ( clipStyleType == null ) {
clipStyleType = Evernote.ClipStyleType.Default;
}
var bodyStyles = new Evernote.ClipStyle( [ ], function ( prop, value ) {
return value != ""
} );
var inhFontStyles = new Evernote.ClipStyle( [ ] );
var inhBgStyles = [ ];
if ( (clipStyleType & Evernote.ClipStyleType.NodeStyle) == Evernote.ClipStyleType.NodeStyle ) {
Evernote.Logger.debug( "ClipStylingStrategy.styleForNode(): get node style" );
if ( node.nodeName.toLowerCase() == "body" ) {
for ( var attrName in Evernote.ClipStyle.STYLE_ATTRIBUTES ) {
if ( Evernote.ElementExtension.hasAttribute(node, attrName) ) {
var cssPropName = Evernote.ClipStyle.STYLE_ATTRIBUTES[ attrName ];
var style = { };
style[ cssPropName ] = node.getAttribute( attrName );
bodyStyles.addStyle( style );
}
}
}
var evaluatedStyles = this.getNodeStyle( node );
if ( node.nodeName.toLowerCase() == "table" && !evaluatedStyles.getStyle( "font-size" ) ) {
evaluatedStyles.addStyle( {"font-size":"1em"} );
}
if ( node.nodeName.toLowerCase() == "img" ) {
style = new Evernote.ClipStyle( Evernote.ElementExtension.getComputedStyle( node, null, this.getNodeView( node ) ), function ( prop, value ) {
return value != ""
} );
evaluatedStyles.addStyle( { height:style.getStyle( "height" ) } );
evaluatedStyles.addStyle( { width:style.getStyle( "width" ) } );
}
if ( evaluatedStyles.getStyle( "background-image" ) ) {
var regExp = /url\((.*?)\)/;
evaluatedStyles.addStyle( { "background-image": Evernote.StyleElementExtension.getPropertyValue(Evernote.ElementExtension.getComputedStyle( node, null, this.getNodeView( node ) ), Evernote.IEStylePropertiesMapping.getPropertyNameFor("background-image") ).replace( regExp, "url('$1')").replace(/('")|("')|('')/g, "'")} );
}
if ( evaluatedStyles.getStyle( "height" ) == "100%" && Evernote.StyleElementExtension.getPropertyValue(Evernote.ElementExtension.getComputedStyle( node, null, this.getNodeView( node ) ), "height" ) == "0px" ) {
evaluatedStyles.addStyle( { height:"0px" } );
}
bodyStyles.mergeStyle( evaluatedStyles, true );
}
if ( node == root && !fullPage ) {
if ( (clipStyleType & Evernote.ClipStyleType.InheritedFontStyle) == Evernote.ClipStyleType.InheritedFontStyle ) {
Evernote.Logger.debug( "ClipStylingStrategy.styleForNode(): get inherited font style" );
inhFontStyles = this.inheritFontForNode( node, true );
Evernote.Logger.debug( "ClipStylingStrategy.styleForNode(): inherited fonts " );
}
if ( (clipStyleType & Evernote.ClipStyleType.InheritedBgStyle) == Evernote.ClipStyleType.InheritedBgStyle ) {
Evernote.Logger.debug( "ClipStylingStrategy.styleForNode(): get inherited bg style" );
inhBgStyles = this.inheritBackgroundForNode( node, true );
}
}
bodyStyles.mergeStyle( inhFontStyles, true );
return {
nodeStyle:bodyStyles,
inheritedFonts:inhFontStyles,
inheritedBackground:inhBgStyles,
evaluated:bodyStyles
};
};
Evernote.ClipFullStylingStrategy.prototype.getNodeStyle = function ( node, filterFn, pseudo ) {
Evernote.Logger.debug( "ClipStylingStrategy.getNodeStyle()" );
if ( pseudo == null || typeof pseudo == "undefined" ) {
pseudo = "";
}
var style = new Evernote.ClipStyle([ ], filterFn);
Evernote.Logger.debug( "Pseudo : " + pseudo );
if ( pseudo == "" && node && typeof node.nodeType == 'number' && node.nodeType == 1 ) {
var view = this.getNodeView( node );
style = new Evernote.ClipStyle( Evernote.ElementExtension.getComputedStyle( node, null, view ), filterFn );
}
return style;
};
Evernote.ClipFullStylingStrategy.prototype.inheritFontForNode = function ( node, recur ) {
Evernote.Logger.debug( "ClipFullStylingStrategy.inheritFontForNode()" );
var fontStyle = new Evernote.ClipStyle();
if ( !node ) {
return fontStyle;
}
var parent = node;
var styles = [ ];
var nodes = [ ];
var dynamicUnit = ["%", "em"];
var sizeUnitRegExp = /(.*?)(em|%|px|pt)/;
while ( parent ) {
nodes.push( parent );
styles.push( new Evernote.ClipStyle( this.getNodeStyle( parent ), function ( prop, value ) {
return (Evernote.ArrayExtension.indexOf(Evernote.ClipStyle.INHERITED_STYLES, prop ) > 0 && value != "inherit" );
} ) );
Evernote.Logger.debug( "Inh parent style:" + styles[styles.length - 1].toString() );
if ( !recur || parent == document.body ) {
break;
}
else {
parent = parent.parentElement;
}
}
//merge styles starting from low-priority parent styles
Evernote.Logger.debug( "Styles inh for processing:" + (styles.length - 1) );
for ( var i = styles.length - 1; i >= 0; i-- ) {
var style = styles[ i ];
var fontSize = fontStyle.getStyle( "font-size" );
var overFontStyle = style.getStyle( "font-size" );
Evernote.Logger.debug( "fontSize:" + fontSize + " ;overFontStyle: " + overFontStyle );
if ( fontSize && overFontStyle ) {
var resFontSize = fontSize.match( sizeUnitRegExp );
if ( resFontSize == null ) {
continue;
}
var sizeVal = resFontSize[1];
var sizeUnit = resFontSize[2];
var resOverFontSize = overFontStyle.match( sizeUnitRegExp );
if ( resOverFontSize == null ) {
continue;
}
var overSizeVal = resOverFontSize[1];
var overSizeUnit = resOverFontSize[2];
if ( Evernote.ArrayExtension.indexOf(dynamicUnit, overSizeUnit ) != -1 ) {
if ( overSizeUnit == "%" ) {
style.addStyle( { "font-size":(parseFloat( sizeVal ) * parseFloat( overSizeVal ) / 100).toString() + sizeUnit } );
}
else {
style.addStyle( { "font-size":(parseFloat( sizeVal ) * parseFloat( overSizeVal )).toString() + ((sizeUnit != "em") ? sizeUnit : overSizeUnit) } );
}
}
Evernote.Logger.debug( "Style: " + i + " ;Eval inh style:" + style.toString() );
}
fontStyle.mergeStyle( style, true );
}
return fontStyle;
};
Evernote.ClipFullStylingStrategy.prototype.inheritBackgroundForNode = function ( node, recur ) {
Evernote.Logger.debug( "ClipFullStylingStrategy.inheritBackgroundForNode()" );
var bgStyle = new Evernote.ClipStyle();
if ( !node ) {
return bgStyle;
}
var parent = node;
var styles = [ ];
var nodes = [ ];
var topElement = (document.body.parentNode) ? document.body.parentNode : document.body;
while ( parent ) {
nodes.push( parent );
var filterFn = function ( prop, value ) {
return !(prop == "background-repeat" && (value == "no-repeat" || value == "repeat-y"));
};
var nodeStyle = new Evernote.ClipStyle( this.getNodeStyle( parent ), filterFn, Evernote.ClipStyle.CSS_GROUP.getExtForStyle( "background" ) );
if ( !nodeStyle.getStyle( "background-repeat" ) ) {
nodeStyle.removeStyle( "background-image" );
}
if ( !nodeStyle.getStyle( "background-color" ) && parent.getAttribute( "bgcolor" ) ) {
Evernote.Logger.debug( "Set bgcolor attribute: " + parent.getAttribute( "bgcolor" ) );
nodeStyle.addStyle( {"background-color":parent.getAttribute( "bgcolor" )} );
}
nodeStyle = this.evalBgPosition( node, parent, nodeStyle );
if ( nodeStyle.getStylesNames().length > 0 ) {
styles.push( nodeStyle );
Evernote.Logger.debug( "Add inh bg style " + nodeStyle.toString() );
}
if ( !recur || parent == topElement ) {
break;
}
else {
parent = parent.parentNode;
}
}
return styles;
};
Evernote.ClipFullStylingStrategy.prototype.evalBgPosition = function ( node, inhNode, nodeBgStyle ) {
Evernote.Logger.debug( "Dettermining background image offset" );
var strPosToPercent = {
"center":"50%",
"top":"0%",
"bottom":"100%",
"right":"100%",
"left":"0%"
};
var regExp = /url\((.*?)\)/;
var bgImage = nodeBgStyle.getStyle( "background-image" );
if ( !regExp.test( nodeBgStyle.getStyle( "background-image" ) ) || (bgImage && nodeBgStyle.getStyle( "background-image" ).indexOf( "data:image" ) >= 0) ) {
Evernote.Logger.debug( "bgStyle: " + nodeBgStyle.toString() );
return nodeBgStyle;
}
nodeBgStyle.addStyle( { "background-image": Evernote.StyleElementExtension.getPropertyValue(Evernote.ElementExtension.getComputedStyle( inhNode, null, this.getNodeView( inhNode ) ), Evernote.IEStylePropertiesMapping.getPropertyNameFor("background-image") ).replace( regExp, "url('$1')" ) } );
var actualImage = new Image();
actualImage.src = nodeBgStyle.getStyle( "background-image" ).match( regExp )[ 1 ].replace( /["']/g, "" );
var bgNodeRect = this.getOffsetRect( inhNode );
var nodeRect = this.getOffsetRect( node );
var yDelta = nodeRect.top - bgNodeRect.top;
var xDelta = nodeRect.left - bgNodeRect.left;
var bgNodeBgPosX = 0;
var bgNodeBgPosY = 0;
var origPosX = 0;
var origPosY = 0;
if ( nodeBgStyle.getStyle( "background-position" ) ) {
var bgPosition = nodeBgStyle.getStyle( "background-position" ).split( " " );
bgNodeBgPosX = strPosToPercent[bgPosition[ 0 ]] != null ? strPosToPercent[bgPosition[ 0 ]] : bgPosition[ 0 ];
bgNodeBgPosY = strPosToPercent[bgPosition[ 1 ]] != null ? strPosToPercent[bgPosition[ 1 ]] : bgPosition[ 1 ];
if ( bgNodeBgPosX && bgNodeBgPosX.indexOf( "%" ) > 0 ) {
origPosX = parseInt( bgNodeRect.width ) * (parseInt( bgNodeBgPosX ) / 100);
origPosX -= parseInt(actualImage.width) * (parseInt(bgNodeBgPosX) / 100);
}
else {
origPosX = parseInt( bgNodeBgPosX );
}
if ( bgNodeBgPosY && bgNodeBgPosY.indexOf( "%" ) > 0 ) {
origPosY = parseInt( bgNodeRect.height ) * (parseInt( bgNodeBgPosY ) / 100);
origPosY -= parseInt(actualImage.height) * (parseInt(bgNodeBgPosY) / 100);
}
else {
origPosY = parseInt( bgNodeBgPosY );
}
}
if ( isNaN( origPosX ) ) {
origPosX = 0;
}
if ( isNaN( origPosY ) ) {
origPosY = 0;
}
var xOffset = 0 - xDelta + origPosX;
var yOffset = 0 - yDelta + origPosY;
nodeBgStyle.addStyle( { "background-position":(xOffset + "px " + yOffset + "px") } );
Evernote.Logger.debug( "bgStyle: " + nodeBgStyle.toString() );
return nodeBgStyle;
};
Evernote.ClipFullStylingStrategy.prototype.getOffsetRect = function ( elem ) {
Evernote.Logger.debug( "ClipCSSStyleWalker.getOffsetRect()" );
var box = Evernote.ElementExtension.getBoundingClientRect(elem);
var body = elem.ownerDocument.body;
var docElem = elem.ownerDocument.documentElement;
var scrollTop = window.pageYOffset || docElem.scrollTop || body.scrollTop;
var scrollLeft = window.pageXOffset || docElem.scrollLeft || body.scrollLeft;
var clientTop = docElem.clientTop || body.clientTop || 0;
var clientLeft = docElem.clientLeft || body.clientLeft || 0;
var top = box.top + scrollTop - clientTop;
var left = box.left + scrollLeft - clientLeft;
return { top:Math.round( top ), left:Math.round( left ), width:box.width, height:box.height };
};</script><script charset="ANSI" defer="" type="text/javascript">//"use strict";
Evernote.ClipRules = {
isNoKeepNodeAttr : function( attribute, nodeName, node ) {
if ( !attribute ) {
return true;
}
var attrName = attribute.name.toLowerCase();
var attrValue = attribute.value.toLowerCase();
if((node.nodeName.toUpperCase() == "SPAN" || node.nodeName.toUpperCase() == "A") && node.getElementsByTagName( "IMG" ).length > 0) {
nodeName = "div";
}
var attributesToKeepForNode = this.KEEP_NODE_ATTRIBUTES[nodeName];
if(attributesToKeepForNode) {
var keepAttributeForNode = typeof attributesToKeepForNode[attrName] != 'undefined';
}
return typeof this.NOKEEP_NODE_ATTRIBUTES[ attrName ] != 'undefined'
|| !keepAttributeForNode
|| attrName.substring( 0, 2 ) == "on"
|| attrName.indexOf("xml") == 0
|| attrValue.indexOf("function(") >= 0
|| (attrName == "href" && attrValue.substring( 0, 11 ) == "javascript:");
},
isConditionalNode : function( node ) {
return node && typeof this.CONDITIONAL_NODES[ node.nodeName.toUpperCase() ] != 'undefined';
},
translateNode : function( node ) {
var nodeName = this.NODE_NAME_TRANSLATIONS[ node.nodeName.toUpperCase() ] || node.nodeName.toUpperCase();
return (typeof this.SUPPORTED_NODES[ nodeName ] != "undefined") ? nodeName.toLowerCase() : this.NODE_NAME_TRANSLATIONS[ "*" ].toLowerCase();
},
isSupportedNode : function( node ) {
return node && typeof this.SUPPORTED_NODES[ node.nodeName.toUpperCase() ] != 'undefined';
},
isRejectedNode : function( node ) {
return node && typeof this.REJECTED_NODES[ node.nodeName.toUpperCase() ] != 'undefined';
},
isNonAncestorNode : function( node ) {
return node && typeof this.NON_ANCESTOR_NODES[ node.nodeName.toUpperCase() ] != 'undefined';
},
isSelfClosingNode : function( node ) {
return node && typeof this.SELF_CLOSING_NODES[ node.nodeName.toUpperCase() ] != 'undefined';
}
};
Evernote.ClipRules.KEEP_NODE_ATTRIBUTES = {
"a" : {
"title": null,
"dir" : null,
"accesskey": null,
"charset": null,
"type": null,
"name": null,
"href": null,
"hreflang": null,
"rel": null,
"rev": null,
"shape": null,
"coords": null,
"target": null
},
"abbr" : {
"title": null,
"dir" : null
},
"acronym" : {
"title": null,
"dir" : null
},
"address" : {
"title": null,
"dir" : null
},
"area" : {
"title": null,
"dir" : null,
"accesskey": null,
"shape": null,
"coords": null,
"href": null,
"nohref": null,
"alt": null,
"target": null
},
"b" : {
"title": null,
"dir" : null
},
"bdo" : {
"title": null,
"dir" : null
},
"big" : {
"title": null,
"dir" : null
},
"blockquote" : {
"title": null,
"dir" : null,
"cite": null
},
"br" : {
"title": null,
"clear": null
},
"caption" : {
"title": null,
"dir" : null,
"align": null
},
"center" : {
"title": null,
"dir" : null
},
"cite" : {
"title": null,
"dir" : null
},
"code" : {
"title": null,
"dir" : null
},
"col" : {
"title": null,
"dir" : null,
"span" : null,
"width" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null
},
"colgroup" : {
"title": null,
"dir" : null,
"span" : null,
"width" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null
},
"dd" : {
"title": null,
"dir" : null
},
"del" : {
"title": null,
"dir" : null,
"cite" : null,
"datetime" : null
},
"dfn" : {
"title": null,
"dir" : null
},
"div" : {
"title": null,
"dir" : null,
"align" : null
},
"dl": {
"title": null,
"dir" : null,
"compact" : null
},
"dt": {
"title": null,
"dir" : null
},
"em": {
"title": null,
"dir" : null
},
"font": {
"title": null,
"dir" : null,
"size" : null,
"color" : null,
"face" : null
},
"h1": {
"title": null,
"dir" : null,
"align" : null
},
"h2": {
"title": null,
"dir" : null,
"align" : null
},
"h3": {
"title": null,
"dir" : null,
"align" : null
},
"h4": {
"title": null,
"dir" : null,
"align" : null
},
"h5": {
"title": null,
"dir" : null,
"align" : null
},
"h6": {
"title": null,
"dir" : null,
"align" : null
},
"hr": {
"title": null,
"dir" : null,
"align" : null,
"noshade" : null,
"size" : null,
"width" : null
},
"i": {
"title": null,
"dir" : null
},
"img": {
"title": null,
"dir" : null,
"src" : null,
"alt" : null,
"name" : null,
"longdesc" : null,
"height" : null,
"width" : null,
"usemap" : null,
"ismap" : null,
"align" : null,
"border" : null,
"hspace" : null,
"vspace" : null
},
"en-media": {
"type" : null,
"hash" : null,
"title" : null,
"dir" : null,
"alt" : null,
"longdesc" : null,
"height" : null,
"width" : null,
"usemap" : null,
"align" : null,
"border" : null,
"hspace" : null,
"vspace" : null
},
"ins": {
"title": null,
"dir" : null,
"cite" : null,
"datetime" : null
},
"kbd": {
"title": null,
"dir" : null
},
"li": {
"title": null,
"dir" : null,
"type" : null,
"value" : null
},
"map": {
"dir" : null,
"title" : null,
"name" : null
},
"ol": {
"title" : null,
"dir" : null,
"type" : null,
"compact" : null,
"start" : null
},
"p": {
"title" : null,
"dir" : null,
"align" : null
},
"pre": {
"title" : null,
"dir" : null,
"width" : null
},
"s": {
"title" : null,
"dir" : null
},
"samp": {
"title" : null,
"dir" : null
},
"small": {
"title" : null,
"dir" : null
},
"span": {
"title" : null,
"dir" : null
},
"strike": {
"title" : null,
"dir" : null
},
"strong": {
"title" : null,
"dir" : null
},
"sub": {
"title" : null,
"dir" : null
},
"sup": {
"title" : null,
"dir" : null
},
"table": {
"title" : null,
"dir" : null,
"summary" : null,
"width" : null,
"border" : null,
"cellspacing" : null,
"cellpadding" : null,
"align" : null,
"bgcolor" : null
},
"tbody": {
"title" : null,
"dir" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null
},
"td": {
"title" : null,
"dir" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null,
"abbr" : null,
"rowspan" : null,
"colspan" : null,
"nowrap" : null,
"bgcolor" : null,
"width" : null,
"height" : null
},
"tfoot": {
"title" : null,
"dir" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null
},
"th": {
"title" : null,
"dir" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null,
"abbr" : null,
"rowspan" : null,
"colspan" : null,
"nowrap" : null,
"bgcolor" : null,
"width" : null,
"height" : null
},
"thead": {
"title" : null,
"dir" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null
},
"tr": {
"title" : null,
"dir" : null,
"align" : null,
"char" : null,
"charoff" : null,
"valign" : null,
"bgcolor" : null
},
"tt": {
"title" : null,
"dir" : null
},
"u": {
"title" : null,
"dir" : null
},
"ul": {
"title" : null,
"dir" : null,
"type" : null,
"compact" : null
},
"var": {
"title" : null,
"dir" : null
}
};
Evernote.ClipRules.NOKEEP_NODE_ATTRIBUTES = {
"style" : null,
"tabindex" : null
};
Evernote.ClipRules.CONDITIONAL_NODES = {
"EMBED" : null,
"OBJECT" : null,
"IMG" : null,
"VIDEO" : null
};
Evernote.ClipRules.NODE_NAME_TRANSLATIONS = {
"HTML" : "DIV",
"BODY" : "DIV",
"FORM" : "DIV",
"CANVAS" : "DIV",
"CUFON" : "DIV",
"EMBED" : "IMG",
"BUTTON" : "SPAN",
"INPUT" : "SPAN",
"LABEL" : "SPAN",
"BDI" : "SPAN",
"IMG" : "EN-MEDIA",
"*" : "DIV"
};
Evernote.ClipRules.SUPPORTED_NODES = {
"A" : null,
"ABBR" : null,
"ACRONYM" : null,
"ADDRESS" : null,
"AREA" : null,
"B" : null,
"BUTTON" : null,
"BDO" : null,
"BIG" : null,
"BLOCKQUOTE" : null,
"BR" : null,
"CAPTION" : null,
"CENTER" : null,
"CITE" : null,
"CODE" : null,
"COL" : null,
"COLGROUP" : null,
"DD" : null,
"DEL" : null,
"DFN" : null,
"DIV" : null,
"DL" : null,
"DT" : null,
"EM" : null,
"FONT" : null,
"FORM" : null,
"H1" : null,
"H2" : null,
"H3" : null,
"H4" : null,
"H5" : null,
"H6" : null,
"HR" : null,
"HTML" : null,
"I" : null,
"IMG" : null,
"EN-MEDIA" : null,
"INPUT" : null,
"INS" : null,
"KBD" : null,
"LI" : null,
"MAP" : null,
"OL" : null,
"P" : null,
"PRE" : null,
"Q" : null,
"S" : null,
"SAMP" : null,
"SMALL" : null,
"SPAN" : null,
"STRIKE" : null,
"STRONG" : null,
"SUB" : null,
"SUP" : null,
"TABLE" : null,
"TBODY" : null,
"TD" : null,
"TFOOT" : null,
"TH" : null,
"THEAD" : null,
"TR" : null,
"TT" : null,
"U" : null,
"UL" : null,
"VAR" : null
};
Evernote.ClipRules.REJECTED_NODES = {
"SCRIPT" : null,
"LINK" : null,
"IFRAME" : null,
"STYLE" : null,
"SELECT" : null,
"OPTION" : null,
"OPTGROUP" : null,
"NOSCRIPT" : null,
"PARAM" : null,
"HEAD" : null,
"EVERNOTEDIV" : null,
"CUFONTEXT" : null,
"NOEMBED" : null
};
Evernote.ClipRules.NON_ANCESTOR_NODES = {
"OL" : null,
"UL" : null,
"LI" : null
};
Evernote.ClipRules.SELF_CLOSING_NODES = {
"IMG" : null,
//"INPUT" : null,
"BR" : null
};
</script><script charset="ANSI" defer="" type="text/javascript">/**
* ClipStyle is a container for CSS styles. It is able to add and remove
* CSSStyleRules (and parse CSSRuleList's for rules), as well as
* CSSStyleDeclaration's and instances of itself.
* ClipStyle provides a mechanism to serialize itself via toString(), and
* reports its length via length property. It also provides a method to clone
* itself and expects to be manipulated via addStyle and removeStyle.
*/
Evernote.ClipStyle = function ClipStyle( css, filterFn, styleList ) {
this.initialize( css, filterFn, styleList );
};
Evernote.ClipStyle.STYLES = [
"background", "background-attachment", "background-clip", "background-color", "background-image", "background-origin", "background-position-x", "background-position-y", "background-position", "background-repeat", "background-size",
"border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
"border-left", "border-left-color", "border-left-style", "border-left-width",
"border-right", "border-right-color", "border-right-style", "border-right-width",
"border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width",
"border-collapse", "border-spacing", "bottom", "box-shadow",
"caption-side", "clear", "clip", "color", "content", "counter-increment", "counter-reset", "cursor",
"direction", "display",
"empty-cells",
"float", "font", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight",
"height",
"ime-mode",
"left", "letter-spacing", "line-height", "list-style", "list-style-image", "list-style-position", "list-style-type",
"margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "marker-offset", "max-height", "max-width", "min-height", "min-width",
"opacity", "outline", "outline-color", "outline-offset", "outline-style", "outline-width", "overflow", "overflow-x", "overflow-y",
"padding", "padding-bottom", "padding-left", "padding-right", "padding-top", "page-break-after", "page-break-before", "pointer-events", "position",
"resize", "right",
"table-layout", "text-align", "text-anchor", "text-decoration", "text-indent", "text-overflow", "text-shadow", "text-transform", "top",
"vertical-align", "visibility",
"white-space", "width", "word-spacing", "word-wrap",
"z-index"
];
Evernote.ClipStyle.NO_INHERIT_STYLES = {
"*":[ "background", "background-image", "background-color", "background-position", "background-repeat",
"border-bottom", "border-bottom-color", "border-bottom-left-radius", "border-bottom-right-radius", "border-bottom-style", "border-bottom-width",
"border-left", "border-left-color", "border-left-style", "border-left-width",
"border-right", "border-right-color", "border-right-style", "border-right-width",
"border-top", "border-top-color", "border-top-left-radius", "border-top-right-radius", "border-top-style", "border-top-width",
"border-collapse", "border-spacing", "bottom",
"clear",
"display",
"float",
"height",
"left", "list-style",
"margin", "margin-bottom", "margin-left", "margin-right", "margin-top",
"padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
"right",
"text-decoration", "top",
"width" ],
"img":[ "height", "width" ]
};
Evernote.ClipStyle.CSS_GROUP = {
"margin":[ "left", "right", "top", "bottom" ],
"padding":[ "left", "right", "top", "bottom" ],
"border":[ "width", "style", "color" ],
"border-bottom":[ "width", "style", "color" ],
"border-top":[ "width", "style", "color" ],
"border-right":[ "width", "style", "color" ],
"border-left":[ "width", "style", "color" ],
"border-image":[ "outset", "repeat", "slice", "source", "width" ],
"background":[ "attachment", "color", "image", "position", "repeat", "clip", "origin", "size" ],
"font":[ "family", "size", "style", "variant", "weight", "size-adjust", "stretch", "+line-height" ],
"list-style":[ "image", "position", "type" ]
};
Evernote.ClipStyle.CSS_GROUP.getExtForStyle = function ( name ) {
var list = this[ name ];
var extList = [ ];
if ( list ) {
for ( var i = 0; i < list.length; ++i ) {
if ( list[ i ].indexOf( "+" ) >= 0 ) {
var tmp = list[ i ];
extList.push( tmp.replace( "+", "" ) );
}
else {
extList.push( name + "-" + list[ i ] );
}
}
return extList;
}
return null;
};
Evernote.ClipStyle.STYLE_ATTRIBUTES = {
"bgcolor":"background-color",
"text":"color"
};
Evernote.ClipStyle.INHERITED_STYLES = [
"azimuth",
"border-collapse", "border-spacing",
"caption-side", "color", "cursor",
"direction",
"elevation", "empty-cells",
"font-family", "font-size", "font-style", "font-weight", "font",
"letter-spacing", "line-height", "list-style-image", "list-style-position", "list-style-type", "list-style",
"orphans",
"pitch-range", "pitch",
"quotes",
"richness",
"speak-header", "speak-numeral", "speak-punctuation", "speak", "speak-rate", "stress",
"text-align", "text-indent", "text-transform",
"visibility", "voice-family", "volume",
"white-space", "widows", "word-spacing"
];
Evernote.ClipStyle.prototype._collection = null;
Evernote.ClipStyle.prototype._filterFn = null;
Evernote.ClipStyle.prototype._styleList = null;
Evernote.ClipStyle.prototype.initialize = function ( css, filterFn, styleList ) {
Evernote.Logger.debug( "ClipStyle.initialize()" );
this._collection = new Evernote.StylesCollection();
Evernote.Logger.debug( "ClipStyle.initialize: collection initialized()" );
this._filterFn = (typeof filterFn == "function") ? filterFn : null;
this._styleList = (styleList != null) ? styleList : Evernote.ClipStyle.STYLES;
if(css) {
if ( window.CSSStyleDeclaration && css instanceof window.CSSStyleDeclaration ) {
this.addStyle( css, this._styleList );
}
else if ( window.CSSStyleRule && css instanceof window.CSSStyleRule ) {
this.addStyle( css.style, this._styleList );
}
else if ( (window.CSSRuleList && css instanceof window.CSSRuleList) || css instanceof Array ) {
for ( var i = 0; i < css.length; ++i ) {
this.addStyle( css[ i ].style, this._styleList );
}
}
else if ( typeof css == 'object' && css != null ) {
this.addStyle( css, this._styleList );
}
}
Evernote.Logger.debug( "ClipStyle.initialize() end ");
};
Evernote.ClipStyle.prototype.fixBackground = function ( prop, value ) {
if(prop && value) {
if(prop.indexOf("background-image") != -1 && value.indexOf("url") != -1) {
Evernote.Logger.debug("Start replace");
var regExp = /url\((.*?)\)/;
var res = value.replace(regExp, "url('$1')").replace(/('")|("')|('')/g, "'");
Evernote.Logger.debug("End replace");
return Evernote.GlobalUtils.escapeXML(res);
}
}
return value;
};
Evernote.ClipStyle.prototype.addStyle = function ( style, styleList ) {
Evernote.Logger.debug( "ClipStyle.addStyle()" );
if ( window.CSSStyleDeclaration && style instanceof window.CSSStyleDeclaration && style.length > 0 ) {
var list = (styleList != null) ? styleList : this._styleList;
for ( var i = 0; i < list.length; ++i ) {
var prop = list[ i ];
var value = Evernote.StyleElementExtension.getPropertyValue(style, prop );
var importantPriority = !!((style.getPropertyPriority(prop) == 'important'));
value = this.fixBackground(prop, value);
this.addSimpleStyle( prop, value, importantPriority );
}
}
else if ( style instanceof Evernote.ClipStyle ) {
list = (styleList != null) ? styleList : style.getStylesNames();
for ( i = 0; i < list.length; ++i ) {
prop = list[ i ];
value = style.getStyle( prop );
importantPriority = style.isImportant( prop );
value = this.fixBackground(prop, value);
this.addSimpleStyle( prop, value, importantPriority );
}
}
else if ( typeof style == 'object' && style != null ) {
list = (styleList != null) ? styleList : style;
for ( prop in list ) {
if ( list.hasOwnProperty( prop ) ) {
var usedStyle = style[ prop ];
var pName = prop;
if(!usedStyle) {
usedStyle = style [list[prop]];
pName = list[prop];
if(!usedStyle) {
var propName = Evernote.IEStylePropertiesMapping.getPropertyNameFor(list[prop]);
if(propName) {
usedStyle = style[propName];
}
}
}
usedStyle = this.fixBackground(pName, usedStyle);
this.addSimpleStyle( pName, usedStyle );
}
}
}
};
Evernote.ClipStyle.prototype.removeStyle = function ( style ) {
Evernote.Logger.debug( "ClipStyle.removeStyle()" );
if(style) {
if ( window.CSSStyleDeclaration && Evernote.Utils.isInstanceOf(style, window.CSSStyleDeclaration) || style instanceof Array ) {
for ( var i = 0; i < style.length; ++i ) {
this.removeSimpleStyle( style[ i ] );
}
}
else if ( style instanceof Evernote.ClipStyle ) {
var stylesNames = style.getStylesNames();
for ( i = 0; i < stylesNames.length; ++i ) {
this.removeSimpleStyle( stylesNames[ i ] );
}
}
else if ( typeof style == 'string' ) {
this.removeSimpleStyle( style );
}
}
Evernote.Logger.debug("ClipStyle.removeStyle() end")
};
Evernote.ClipStyle.prototype.mergeStyle = function ( style, override ) {
Evernote.Logger.debug( "ClipStyle.mergeStyle()" );
if ( style instanceof Evernote.ClipStyle ) {
var stylesNames = style.getStylesNames();
for ( var i = 0; i < stylesNames.length; ++i ) {
var styleName = stylesNames[ i ];
var styleValue = this._collection.getStyle( styleName );
if ( styleValue == null || override || (style.isImportant( styleName ) && !this._collection.isImportant( styleName )) ) {
var newValue = style.getStyle( styleName );
if ( style.isImportant( styleName ) ) {
this._collection.addStyle( styleName, newValue, true );
}
else if ( override && !this._collection.isImportant( styleName ) ) {
this._collection.addStyle( styleName, newValue, false );
}
else if ( styleValue == null && !override ) {
this._collection.addStyle( styleName, newValue, style.isImportant( styleName ) );
}
}
}
}
};
Evernote.ClipStyle.prototype.getStylesNames = function () {
return this._collection.getStylesNames();
};
Evernote.ClipStyle.prototype.getStyle = function ( prop ) {
return this._collection.getStyle( prop );
};
Evernote.ClipStyle.prototype.isImportant = function ( prop ) {
return this._collection.isImportant( prop );
};
Evernote.ClipStyle.prototype.addSimpleStyle = function ( prop, value, importantPriority ) {
if ( typeof this._filterFn == "function" && !this._filterFn( prop, value ) ) {
return;
}
this._collection.addStyle( prop, value, importantPriority );
};
Evernote.ClipStyle.prototype.removeSimpleStyle = function ( prop ) {
this._collection.removeStyle( prop );
};
Evernote.ClipStyle.prototype.toString = function () {
var str = "";
var stylesNames = this.getStylesNames();
for ( var i = 0; i < stylesNames.length; ++i ) {
var styleName = stylesNames[ i ];
var value = this._collection.getStyle( styleName );
if ( value != null && value.length > 0 ) {
str += styleName + ":" + value + ";";
}
}
return str;
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ClipStyleProperty = function ClipStyleProperty( name, value, isImportant ) {
this.initialize( name, value, isImportant );
};
Evernote.ClipStyleProperty.prototype.initialize = function( name, value, isImportant ) {
if ( typeof name == "string" && typeof value == "string" ) {
this._name = name;
this._value = value;
}
this._isImportant = (isImportant) ? true : false;
};
Evernote.ClipStyleProperty.prototype._name = null;
Evernote.ClipStyleProperty.prototype._value = null;
Evernote.ClipStyleProperty.prototype._isImportant = null;
Evernote.ClipStyleProperty.prototype.name = function() {
return this._name;
};
Evernote.ClipStyleProperty.prototype.value = function() {
return this._value;
};
Evernote.ClipStyleProperty.prototype.isImportant = function() {
return this._isImportant;
};</script><script charset="ANSI" defer="" type="text/javascript">/**
* Represents DOM parser that could able to traverse the DOM node tree from specified root.
* @param tab - current window object
* @param range - current selection on the page (if any)
* @constructor
*/
Evernote.DomParser = function DomParser( tab, range ) {
this.initialize( tab, range );
};
Evernote.DomParser.prototype._tab = null;
Evernote.DomParser.prototype._tab = null;
/**
* Update current parser data
* @param tab - current window object
* @param range - current selection on the page (if any)
*/
Evernote.DomParser.prototype.initialize = function ( tab, range ) {
Evernote.Logger.debug( "DomSerializer.initialize()" );
this._tab = tab;
this._range = range;
};
/**
* Determines if passed node should be serialized.
* Node should not be initialized if one of the following is true:
* - node is rejected according to configuration
* - there is the selection on the page and this node is out of selection range.
* @param node - DOM node
* @return {Boolean}
*/
Evernote.DomParser.prototype.isNodeForSerialize = function ( node ) {
if ( !node || Evernote.ClipRules.isRejectedNode( node ) || node.id == "evernoteContentClipperWait" ) {
return false;
}
if(Evernote.ClipperElementsIdentifiers.match(node)) {
Evernote.Logger.debug("Node is rejected because it is clipper information " + node.id);
return false;
}
return (!this._range || this.isNodeInRange( node )) ? true : false;
};
/**
* Determines whether passed node is inside the selection range. Returns true if it is, false otherwise.
* @param node - DOM node
* @return {Boolean}
*/
Evernote.DomParser.prototype.isNodeInRange = function ( node ) {
Evernote.Logger.debug( "DomParser.isNodeInRange()" );
try {
if ( node && this._range ) {
var nodeRange = node.ownerDocument.createRange();
try {
nodeRange.selectNode( node );
}
catch ( e ) {
nodeRange.selectNodeContents( node );
}
return this._range.compareBoundaryPoints( Range.START_TO_END, nodeRange ) == 1
&& this._range.compareBoundaryPoints( Range.END_TO_START, nodeRange ) == -1;
}
} catch(e) {
//We're in quirk mode, allow to clip node
return true;
}
//If we failed to find any
return false;
};
/**
* Determines whether passed node is visible on the page.
* @param node - DOM node.
* @return {Boolean}
*/
Evernote.DomParser.prototype.isNodeVisible = function ( node ) {
Evernote.Logger.debug( "DomParser.isNodeVisible()" );
if ( !node ) {
return false;
}
var compStyles = Evernote.ElementExtension.getComputedStyle( node, null, this._tab );
return Evernote.StyleElementExtension.getPropertyValue(compStyles, "display" ) != "none";
};
/**
* Starts parsing from specified root.
* @param root - starting DOM node.
* @param fullPage - is user selects to serialize the full page
* @param serializer - current serializer to be used to serialize the DOM node to string
*/
Evernote.DomParser.prototype.parse = function ( root, fullPage, serializer ) {
Evernote.Logger.debug( "DomParser.parse()" );
if ( !root ) {
throw new Error( "No root element for parsing" );
}
var node = root;
var parentNode = null;
while ( node ) {
if ( node != root && node.parentNode ) {
parentNode = node.parentNode.serializedNode;
}
if ( this.isNodeForSerialize( node ) ) {
if ( node.nodeType == Evernote.Node.TEXT_NODE ) {
serializer.textNode( node, this._range );
}
else if ( node.nodeType == Evernote.Node.ELEMENT_NODE && this.isNodeVisible( node ) ) {
node.serializedNode = serializer.startNode( new Evernote.SerializedNode( node, parentNode ), root, fullPage );
if ( node.hasChildNodes() ) {
node = node.childNodes[ 0 ];
continue;
}
else {
serializer.endNode( node.serializedNode );
if ( node.serializedNode ) {
try {
delete node.serializedNode;
} catch(e) {
//If we are failed to delete the property, than just set it to undefined
node.serializedNode = undefined;
}
}
}
}
}
/**
* Check if there is a next node available and it is not the root
*/
if ( node.nextSibling && node != root ) {
node = node.nextSibling;
}
else if ( node != root ) {
while ( node.parentNode && node != root ) {
node = node.parentNode;
serializer.endNode( node.serializedNode );
try {
delete node.serializedNode;
} catch (e) {
//If we are failed to delete the property, than just set it to undefined
node.serializedNode = undefined;
}
if ( node.nextSibling && node != root ) {
node = node.nextSibling;
break;
}
}
if ( node == root ) {
break;
}
}
else {
break;
}
}
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.NodeSerializer = function NodeSerializer( tab, styleStrategy, includeBg ) {
this.initialize( tab, styleStrategy, includeBg );
};
Evernote.NodeSerializer.prototype._tab = null;
Evernote.NodeSerializer.prototype._styleStrategy = null;
Evernote.NodeSerializer.prototype._docBase = null;
Evernote.NodeSerializer.prototype._imagesUrls = null;
Evernote.NodeSerializer.prototype._serializedDom = "";
Evernote.NodeSerializer.prototype._includeBgStyles = true;
Evernote.NodeSerializer.prototype.initialize = function ( tab, styleStrategy, includeBg ) {
Evernote.Logger.debug( "DomSerializer.initialize()" );
this._tab = tab;
this._styleStrategy = (styleStrategy instanceof Evernote.ClipStylingStrategy) ? styleStrategy : null;
this._imagesUrls = [ ];
this._includeBgStyles = ( includeBg != null ) ? includeBg : true;
this.getDocumentBase();
};
Evernote.NodeSerializer.prototype.startNode = function ( serializedNode, root, fullPage ) {
Evernote.Logger.debug( "Start to serialize node :" + serializedNode.node.nodeName );
try {
var node = serializedNode.node;
if ( Evernote.ClipRules.isConditionalNode( node ) && Evernote.ElementSerializerFactory.getImplementationFor( node ) != null ) {
var result = this.serializeConditionalNode( node, root, fullPage );
this._serializedDom += result.content;
// hack for desktop Win client
if ( result.imageUrl ) {
this._imagesUrls.push( result.imageUrl );
}
serializedNode.setStyle(result.nodeStyle);
return serializedNode;
}
if ( node.nodeName.toLowerCase() == "embed" ) {
var src = node.getAttribute( "src" );
if ( src && (src.indexOf(".swf", src.length - ".swf".length) !== -1) ) {
serializedNode.setStyle(new Evernote.ClipStyle());
return serializedNode;
}
}
if ( node.nodeName.toLowerCase() == "img" ) {
var src = node.getAttribute( "src" );
var absoluteSource = Evernote.Utils.makeAbsolutePath(this._docBase, src).replace(/\s/g, "%20");
node.setAttribute( "type", "put-media-type-here-for-" + absoluteSource);
node.setAttribute( "hash", "put-hash-type-here-for-" + absoluteSource);
if ( src && src.indexOf( "data:image" ) < 0 ) {
this._imagesUrls.push( src );
}
}
var attrsStr = this.serializeAttributes( node );
var stylesStr = "";
var nodeName = Evernote.ClipRules.translateNode( node );
if ( this._styleStrategy ) {
var nodeStyle = this._styleStrategy.styleForNode( node, root, fullPage, Evernote.ClipStyleType.Default ).evaluated;
var inhBgStyle = null;
if ( this._includeBgStyles )
inhBgStyle = this._styleStrategy.styleForNode( node, root, fullPage, Evernote.ClipStyleType.InheritedBgStyle ).inheritedBackground;
if ( inhBgStyle != null )
for ( var inhI = inhBgStyle.length - 1; inhI >= 0; inhI-- ) {
var inhStyle = inhBgStyle[inhI];
this._serializedDom += "<div " + this.serializeStyles( node, inhStyle ) + " >
";
serializedNode.translateTo.push( "div" );
}
var pseudoStyle = this._styleStrategy.getNodeStyle( node, null, ":before" );
if ( fullPage && node.nodeName.toLowerCase() == "body" ) {
var wrapBodyStyle = new Evernote.ClipStyle( nodeStyle, null, Evernote.ClipStyle.CSS_GROUP.getExtForStyle( "background" ) );
this._serializedDom += "<" + "div" + " " + this.serializeStyles( node, wrapBodyStyle ) + " >";
serializedNode.translateTo.push( "div" );
var bgGroup = Evernote.ClipStyle.CSS_GROUP.getExtForStyle( "background" );
for ( var ind in bgGroup ) {
if ( bgGroup.hasOwnProperty( ind ) ) {
nodeStyle.removeStyle( bgGroup[ind] );
}
}
}
if ( !fullPage && node == root ) {
nodeStyle.removeStyle( "float" );
}
if ( !serializedNode.node.hasChildNodes() && !(nodeStyle.getStyle( "height" ) || node.getAttribute( "height" )) ) {
nodeStyle.addStyle( {height:"0px"} );
}
if ( !serializedNode.node.hasChildNodes() && !(nodeStyle.getStyle( "width" ) || node.getAttribute( "width" )) ) {
nodeStyle.addStyle( {width:"0px"} );
}
if ( (node.nodeName.toUpperCase() == "SPAN" || node.nodeName.toUpperCase() == "A") && node.getElementsByTagName( "IMG" ).length > 0) {
nodeName = "div";
if ( !nodeStyle.getStyle( "display" ) )
nodeStyle.addStyle( {display:"inline"} );
}
this._serializedDom += this.serializePseudoElement( node, pseudoStyle );
stylesStr = this.serializeStyles( node, nodeStyle );
if ( (nodeName.toLowerCase() == "div" /*|| nodeName.toLowerCase() == "span"*/) && nodeStyle.getStyle( "float" ) && nodeStyle.getStyle( "float" ) != "none" && serializedNode.parentNode && node.parentNode.nodeName.toLowerCase() != "a" ) {
if ( !serializedNode.node.nextSibling || serializedNode.node.nextSibling.nodeType == 3 )
serializedNode.parentNode.isInlineBlock = true;
}
}
Evernote.Logger.debug( node.nodeName + " " + attrsStr + " -> " + nodeName + " " + stylesStr );
this._serializedDom += "<" + nodeName + " " + attrsStr + " " + stylesStr + " >";
serializedNode.setStyle(nodeStyle);
serializedNode.translateTo.push( nodeName );
return serializedNode;
}
catch ( e ) {
Evernote.Logger.error( "Failed to start serialize node :" + e );
throw e;
}
};
Evernote.NodeSerializer.prototype.serializePseudoElement = function ( node, pseudoStyle ) {
try {
var nodeName = Evernote.ClipRules.translateNode( node );
if ( pseudoStyle.getStylesNames().length > 0 ) {
var content = " ";
if ( pseudoStyle.getStyle( "content" ) ) {
content = pseudoStyle.getStyle( "content" );
pseudoStyle.removeStyle( "content" );
}
var beforeStylesStr = this.serializeStyles( node, pseudoStyle );
return "<" + nodeName + " " + beforeStylesStr + " >" + content.replace( /"/g, '' ) + "</" + nodeName + ">";
}
return "";
}
catch ( e ) {
Evernote.Logger.error( "Failed to serialize pseudo element :" + e );
throw e;
}
};
Evernote.NodeSerializer.prototype.textNode = function ( node, range ) {
this._serializedDom += this.serializeTextNode( node, range );
};
Evernote.NodeSerializer.prototype.endNode = function ( serializedNode ) {
try {
Evernote.Logger.debug( "end serialize node :" + serializedNode.translateTo );
if ( serializedNode.isInlineBlock ) {
var name = "div";
if ( serializedNode.node.nodeName.toLowerCase() == "ul" ) {
name = "li"
}
this._serializedDom += "<" + name + " style=\"clear: both; width: 0px; height: 0px;\">" + " " + "</" + name + ">"
}
var node = serializedNode.node;
var serializedPseudo = "";
var pseudoStyle = new Evernote.ClipStyle();
if ( this._styleStrategy ) {
pseudoStyle = this._styleStrategy.getNodeStyle( node, null, ":after" );
if ( pseudoStyle.getStylesNames().length > 0 ) {
var floatStyle = serializedNode.getStyle().getStyle( "float" );
if ( floatStyle && !pseudoStyle.getStyle( "float" ) )
pseudoStyle.addStyle( { "float" : floatStyle } );
if ( node.nodeName.toLowerCase() == "ul" )
serializedPseudo = this.serializePseudoElement( document.createElement( "div" ), pseudoStyle );
}
}
while ( serializedNode.translateTo.length > 0 ) {
var nodeName = serializedNode.translateTo.pop();
if ( !Evernote.ClipRules.isSelfClosingNode( serializedNode.node ) ) {
if ( !serializedNode.node.hasChildNodes() )
this._serializedDom += " ";
}
if ( nodeName.toLowerCase() == "ul" ) {
this._serializedDom += this.serializePseudoElement( document.createElement( "li" ), pseudoStyle );
}
this._serializedDom += "</" + nodeName + ">";
}
this._serializedDom += serializedPseudo;
}
catch ( e ) {
Evernote.Logger.error( "Failed to end serialize node :" + e );
throw e;
}
};
Evernote.NodeSerializer.prototype.serializeTextNode = function ( node, range ) {
Evernote.Logger.debug( "DomSerializer.serializeTextNode()" );
try {
var nodeValue = node.nodeValue;
if ( !range ) {
return Evernote.Utils.htmlEncode( nodeValue );
}
else {
if ( range.startContainer == node && range.startContainer == range.endContainer ) {
return Evernote.Utils.htmlEncode( nodeValue.substring( range.startOffset, range.endOffset ) );
}
else if ( range.startContainer == node ) {
return Evernote.Utils.htmlEncode( nodeValue.substring( range.startOffset ) );
}
else if ( range.endContainer == node ) {
return Evernote.Utils.htmlEncode( nodeValue.substring( 0, range.endOffset ) );
}
else if ( range.commonAncestorContainer != node ) {
return Evernote.Utils.htmlEncode( nodeValue );
}
}
}
catch ( e ) {
Evernote.Logger.error( "DomSerializer.serializeTextNode() failed " + e );
throw e;
}
return "";
};
Evernote.NodeSerializer.prototype.serializeConditionalNode = function ( node, root, fullPage ) {
Evernote.Logger.debug( "DomSerializer.serializeConditionalNode()" );
var impl = Evernote.ElementSerializerFactory.getImplementationFor( node );
if ( typeof impl == 'function' ) {
var nodeStyle = (this._styleStrategy) ? this._styleStrategy.styleForNode( node, root, fullPage ).evaluated : null;
var serializer = new impl( node, nodeStyle );
var content = serializer.serialize( this._docBase );
var imageUrl = serializer.getImageUrl();
return { content:content, imageUrl:imageUrl, nodeStyle:nodeStyle };
}
return { content:"", imageUrl:"", nodeStyle:new Evernote.ClipStyle() };
};
Evernote.NodeSerializer.prototype.serializeAttributes = function ( node ) {
Evernote.Logger.debug( "DomSerializer.serializeAttributes()" );
try {
var attrs = node.attributes;
var str = "";
for ( var i = 0; i < attrs.length; ++i ) {
if ( !Evernote.ClipRules.isNoKeepNodeAttr( attrs[ i ], Evernote.ClipRules.translateNode( node ), node ) ) {
var attrValue = (attrs[ i ].value) ? Evernote.GlobalUtils.escapeXML( attrs[ i ].value ) : "";
if ( (attrs[ i ].name.toLowerCase() == "src" || attrs[ i ].name.toLowerCase() == "href") && attrValue.toLowerCase().indexOf( "http" ) != 0 ) {
attrValue = Evernote.Utils.makeAbsolutePath( this._docBase, attrValue );
}
str += " " + attrs[ i ].name.toLowerCase() + "=\"" + attrValue + "\"";
}
}
return str;
}
catch ( e ) {
Evernote.Logger.error( "DomSerializer.serializeAttributes() failed: error = " + e );
}
return "";
};
Evernote.NodeSerializer.prototype.serializeStyles = function ( node, nodeStyle ) {
Evernote.Logger.debug( "DomSerializer.serializeStyles()" );
try {
var str = "";
if(node.nodeName.toLowerCase() == "map") {
//Map should not have style attribute according to Evernote DTD
return "";
}
if ( node && nodeStyle instanceof Evernote.ClipStyle ) {
str += " style=\"" + nodeStyle.toString().replace( /"/g, "" ) + "\"";
}
return str;
}
catch ( e ) {
Evernote.Logger.error( "DomSerializer.serializeStyles() failed: error = " + e );
throw e;
}
return "";
};
Evernote.NodeSerializer.prototype.getDocumentBase = function () {
Evernote.Logger.debug( "DomSerializer.getDocumentBase()" );
if ( !this._docBase ) {
var baseTags = this._tab.document.getElementsByTagName( "base" );
for ( var i = 0; i < baseTags.length; ++i ) {
var baseTag = baseTags[ i ];
if ( typeof baseTag == 'string' && baseTag.indexOf( "http" ) == 0 ) {
this._docBase = baseTag;
}
if ( this._docBase ) {
break;
}
}
if ( !this._docBase ) {
var location = this._tab.document.location;
this._docBase = location.protocol + "//" + location.host + location.pathname.replace( /[^\/]+$/, "" );
}
}
return this._docBase;
};
Evernote.NodeSerializer.prototype.getImagesUrls = function () {
return this._imagesUrls;
};
Evernote.NodeSerializer.prototype.getSerializedDom = function () {
return '<div style="position: relative;">' + this._serializedDom.replace(/[^\u0009\u000a\u000d\u0020-\uD7FF\uE000-\uFFFD]+/g, "") + '</div>
';
};</script><script charset="ANSI" defer="" type="text/javascript">//"use strict";
Evernote.SerializedNode = function SerializedNode( node, parent ) {
this.node = node;
this._parentSerializedNode = parent;
this.translateTo = [ ];
};
Evernote.SerializedNode.prototype.translateTo = null;
Evernote.SerializedNode.prototype.node = null;
Evernote.SerializedNode.prototype._parentSerializedNode = null;
Evernote.SerializedNode.prototype.setStyle = function ( clipStyle ) {
this._clipStyle = clipStyle;
};
Evernote.SerializedNode.prototype.getStyle = function () {
return this._clipStyle;
};
Evernote.SerializedNode.prototype.parentNode = function () {
return this._parentSerializedNode;
};
</script><script charset="ANSI" defer="" type="text/javascript">//"use strict";
Evernote.StylesCollection = function StylesCollection() {
this._styles = { };
};
Evernote.StylesCollection.prototype._styles = null;
Evernote.StylesCollection.prototype.addStyle = function( name, value, isImportant ) {
if ( typeof name == "string" && typeof value == "string" ) {
Evernote.Logger.debug( "StylesCollection.addStyle(): name = " + name + ", value = " + value + ", isImportant = " + isImportant );
this._styles[ name ] = new Evernote.ClipStyleProperty( name, value, isImportant);
}
};
Evernote.StylesCollection.prototype.getStyle = function( name ) {
if ( typeof name == "string" ) {
Evernote.Logger.debug( "StylesCollection.getStyle(): name = " + name + " value: " + ((typeof this._styles[ name ] != "undefined") ? this._styles[ name ].value() : null) );
return (typeof this._styles[ name ] != "undefined") ? this._styles[ name ].value() : null;
}
return null;
};
Evernote.StylesCollection.prototype.removeStyle = function( name ) {
if ( typeof name == "string" ) {
Evernote.Logger.debug( "StylesCollection.removeStyle(): name = " + name );
this._styles[ name ] = null;
delete this._styles[ name ];
}
};
Evernote.StylesCollection.prototype.isImportant = function( name ) {
if ( typeof name == "string" ) {
return (typeof this._styles[ name ] != "undefined") ? this._styles[ name ].isImportant() : false;
}
};
Evernote.StylesCollection.prototype.getStylesNames = function() {
Evernote.Logger.debug( "StylesCollection.getStylesNames()" );
var stylesNames = [ ];
for ( var key in this._styles ) {
if ( this._styles[ key ] != null ) {
stylesNames.push( key );
}
}
return stylesNames;
};
Evernote.StylesCollection.prototype.getStylesNumber = function() {
Evernote.Logger.debug( "StylesCollection.getStylesNumber()" );
var num = 0;
for ( var key in this._styles ) {
if ( this._styles[ key ] != null ) {
++num;
}
}
return num;
};
</script><script charset="ANSI" defer="" type="text/javascript">Evernote.DataImageSerializer = function DataImageSerializer( node, nodeStyle ) {
if ( !nodeStyle ) {
nodeStyle = new Evernote.ClipStyle();
}
this.initialize( node, nodeStyle );
};
Evernote.inherit( Evernote.DataImageSerializer, Evernote.AbstractElementSerializer, true );
Evernote.DataImageSerializer.isResponsibleFor = function( node ) {
if ( node && node.nodeType == Evernote.Node.ELEMENT_NODE && node.nodeName.toLowerCase() == "img" ) {
var src = node.getAttribute( "src" );
if ( src && src.indexOf( "data:image" ) != -1 ) {
return true;
}
}
return false;
};
Evernote.DataImageSerializer.prototype.serialize = function( /*docBase*/ ) {
Evernote.Logger.debug( "DataImageSerializer.serialize()" );
try {
this._nodeStyle.addStyle( { "background-image" : "url('" + this._node.getAttribute( "src" ) + "')",
"width" : this._node.offsetWidth + "px",
"height" : this._node.offsetHeight + "px",
"background-repeat" : "no-repeat",
"display" : "block" } );
return "<span style=\"" + this._nodeStyle.toString().replace( /"/g, "" ) + "\"" + "> </span>";
}
catch ( e ) {
Evernote.Logger.error( "DataImageSerializer.serialize() failed: error = " + e );
}
return "";
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.VideoElementSerializer = function VideoElementSerializer( node, nodeStyle ) {
this.initialize( node, nodeStyle );
};
Evernote.inherit( Evernote.VideoElementSerializer, Evernote.AbstractElementSerializer, true );
Evernote.VideoElementSerializer.isResponsibleFor = function( node ) {
return node && node.nodeType == Evernote.Node.ELEMENT_NODE && node.nodeName.toLowerCase() == "video";
};
Evernote.VideoElementSerializer.prototype.serialize = function( /*docBase*/ ) {
Evernote.Logger.debug( "VideoElementSerializer.serialize()" );
try {
var width = this._node.offsetWidth;
var height = this._node.offsetHeight;
var doc = this._node.ownerDocument;
var canvas = doc.createElement( "CANVAS" );
canvas.width = width;
canvas.height = height;
var context = canvas.getContext( "2d" );
context.drawImage( this._node, 0, 0, width, height );
var dataUrl = canvas.toDataURL( "image/png" );
context.clearRect( 0, 0, width, height );
this._nodeStyle.addStyle( { "background-image" : "url('" + dataUrl + "')",
"width" : width + "px",
"height" : height + "px",
"display" : "block" } );
return "<a style=\"" + this._nodeStyle.toString().replace( /"/g, "" ) + "\"" + "href='" + doc.defaultView.location.href + "'> </a>";
}
catch ( e ) {
Evernote.Logger.error( "VideoElementSerializer.serialize() failed: error = " + e );
}
return "";
};</script><script charset="ANSI" defer="" type="text/javascript">/**
* Serializes DOM element into an img pointing to the thumbnail of the video
*
* Video ids are used for obtaining thumbnails via
* https://i2.ytimg.com/vi/cAcxHQalWOw/hqdefault.jpg. These ids can be
* obtained from:
*
* <pre>
* - the URL of the document containing EMBED
* - iframe's src attribute that embeds the video via an iframe
* - src attribute of the embed object (though on actualy youtube.com it's not possible)
* </pre>
*
* Sample URLs are:
*
* <pre>
* http: //www.youtube.com/embed/IWJJBwKhvp4?wmode=opaque&rel=0
* http: //www.youtube.com/v/YZEbBZ2IrXE?version=3&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1
* http: //www.youtube.com/v/J3mjFSTsKiM&hl=en&fs=1
* http://www.youtube.com/watch?v=cAcxHQalWOw
* http://www.youtube.com/user/IFiDieApp?v=sdzCELofGgE&feature=pyv
* </pre>
*/
Evernote.YoutubeElementSerializer = function YoutubeElementSerializer( doc, node, nodeStyle ) {
this.initialize( doc, node, nodeStyle );
};
Evernote.inherit( Evernote.YoutubeElementSerializer, Evernote.AbstractElementSerializer, true );
Evernote.YoutubeElementSerializer.WATCH_URL_REGEX = /^https?:\/\/www\.youtube\.com\/watch\?.*v=([^&]+)/i;
Evernote.YoutubeElementSerializer.USER_CHANNEL_URL_REGEX = /^https?:\/\/www\.youtube\.com\/user\/([a-zA-Z0-9]+)\?v=([^&]+)/i;
Evernote.YoutubeElementSerializer.EMBED_URL_REGEX = /^https?:\/\/www\.youtube\.com\/embed\/([^\/\?&]+)/i;
Evernote.YoutubeElementSerializer.VIDEO_URL_REGEX = /^https?:\/\/www\.youtube\.com\/v\/([^\/\?&]+)/i;
Evernote.YoutubeElementSerializer.POSSIBLE_CONTAINER_NODES = [ "OBJECT" ];
Evernote.YoutubeElementSerializer.VIDEO_NODES = [ "EMBED", "IFRAME" ];
Evernote.YoutubeElementSerializer.WATCH_URL = "http://www.youtube.com/watch?v=$videoId$";
Evernote.YoutubeElementSerializer.USER_CHANNEL_URL = "http://www.youtube.com/user/$userId$?v=$videoId$";
Evernote.YoutubeElementSerializer.DEFAULT_THUMB_URL = "https://i2.ytimg.com/vi/$videoId$/default.jpg";
Evernote.YoutubeElementSerializer.HQ_THUMB_URL = "https://i2.ytimg.com/vi/$videoId$/hqdefault.jpg";
Evernote.YoutubeElementSerializer.DEFAULT_THUMB_WIDTH = 120;
Evernote.YoutubeElementSerializer.DEFAULT_THUMB_HEIGHT = 90;
Evernote.YoutubeElementSerializer.isResponsibleFor = function( node ) {
var params = this.extractVideoParamsFromNode( node );
return (params) ? true : false;
};
Evernote.YoutubeElementSerializer.extractVideoParamsFromNode = function( node ) {
Evernote.Logger.debug( "YoutubeElementSerializer.extractVideoIdFromNode()" );
if ( node && node.nodeType == Evernote.Node.ELEMENT_NODE ) {
var view = window;
try {
view = node.ownerDocument.defaultView;
}
catch ( e ) {
}
var matches = null;
if ( view && (node.nodeName.toLowerCase() == "embed" || node.nodeName.toLowerCase() == "object") && view.location ) {
if ( (matches = view.location.href.match( this.WATCH_URL_REGEX )) && matches[ 1 ] ) {
return matches[ 1 ];
}
else if ( (matches = view.location.href.match( this.USER_CHANNEL_URL_REGEX )) && matches[ 1 ] && matches[ 2 ] ) {
return [ matches[ 1 ], matches[ 2 ] ];
}
}
else {
var videoNode = this.findVideoNode( node );
if ( videoNode ) {
var src = videoNode.getAttribute( "src" );
if ( src && (matches = src.match( this.EMBED_URL_REGEX )) && matches[ 1 ] ) {
return matches[ 1 ];
}
else if ( src && (matches = src.match( this.VIDEO_URL_REGEX )) && matches[ 1 ] ) {
return matches[ 1 ];
}
}
}
}
return null;
};
Evernote.YoutubeElementSerializer.findVideoNode = function( node ) {
Evernote.Logger.debug( "YoutubeElementSerializer.findVideoNode()" );
if ( node && node.nodeType == Evernote.Node.ELEMENT_NODE ) {
if ( Evernote.ArrayExtension.indexOf(this.VIDEO_NODES, node.nodeName.toUpperCase() ) >= 0 ) {
return node;
}
else if ( Evernote.ArrayExtension.indexOf(this.POSSIBLE_CONTAINER_NODES, node.nodeName.toUpperCase() ) >= 0 ) {
var it = node.ownerDocument.createNodeIterator( node, NodeFilter.SHOW_ELEMENT, null, false );
var next = null;
while ( next = it.nextNode() ) {
if ( Evernote.ArrayExtension.indexOf(this.VIDEO_NODES, next.nodeName.toUpperCase() ) >= 0 ) {
return next;
}
}
}
}
return null;
};
Evernote.YoutubeElementSerializer.prototype._imageUrl = "";
Evernote.YoutubeElementSerializer.prototype.serialize = function( /*docBase*/ ) {
Evernote.Logger.debug( "YoutubeElementSerializer.serialize()" );
try {
var userId = null;
var videoId = null;
var params = this.constructor.extractVideoParamsFromNode( this._node );
if ( params instanceof Array ) {
userId = params[ 0 ];
videoId = params[ 1 ];
}
else if ( typeof params == "string" ) {
videoId = params;
}
if ( videoId ) {
var thumbUrl = null;
var w = 0;
var h = 0;
if ( this._nodeStyle ) {
var view = window;
try {
view = this._node.ownerDocument.defaultView;
}
catch ( e ) {
}
var computedStyles = Evernote.ElementExtension.getComputedStyle( this._node, null, view );
w = parseInt( Evernote.StyleElementExtension.getPropertyValue(computedStyles, "width" ) );
w = (isNaN( w )) ? 0 : w;
h = parseInt( Evernote.StyleElementExtension.getPropertyValue(computedStyles, "height" ) );
h = (isNaN( h )) ? 0 : h;
if ( w < this.constructor.DEFAULT_THUMB_WIDTH || h < this.constructor.DEFAULT_THUMB_HEIGHT ) {
thumbUrl = this.getDefaultThumbnailUrl( videoId );
}
else {
thumbUrl = this.getHQThumbnailUrl( videoId );
}
}
else {
thumbUrl = this.getDefaultThumbnailUrl( videoId );
}
if ( thumbUrl ) {
var styleStr = (this._nodeStyle instanceof Evernote.ClipStyle) ? ("style=\"" + this._nodeStyle.toString() + "\"") : "";
var attrs = this._node.attributes;
var attrStr = "";
for ( var i = 0; i < attrs.length; ++i ) {
var attr = attrs[ i ];
if(Evernote.ClipRules.KEEP_NODE_ATTRIBUTES["a"][attr.name]) {
attrStr += attr.name;
if ( attr.value ) {
attrStr += "=" + attr.value;
}
attrStr += " ";
}
}
var href = ( userId ) ? this.getUserChannelUrl( userId, videoId ) : this.getWatchUrl( videoId );
var imgAttrStr = "";
if ( w && h ) {
var k = w / h;
// scale by height
if ( k > this.constructor.DEFAULT_THUMB_WIDTH / this.constructor.DEFAULT_THUMB_HEIGHT ) {
imgAttrStr += "height=\"" + h + "\"";
}
else { // scale by width
imgAttrStr += "width=\"" + w + "\"";
}
}
this._imageUrl = thumbUrl;
return "<a " + styleStr + " " + attrStr + " href=\"" + href + "\"><img src=\"" + thumbUrl + "\" " + imgAttrStr + "/></a>";
}
}
}
catch ( e ) {
Evernote.Logger.error( "YoutubeElementSerializer.serialize() failed: error = " + e );
}
return "";
};
Evernote.YoutubeElementSerializer.prototype.getDefaultThumbnailUrl = function( videoId ) {
return this.constructor.DEFAULT_THUMB_URL.replace( /\$videoId\$/, videoId );
};
Evernote.YoutubeElementSerializer.prototype.getHQThumbnailUrl = function( videoId ) {
return this.constructor.HQ_THUMB_URL.replace( /\$videoId\$/, videoId );
};
Evernote.YoutubeElementSerializer.prototype.getWatchUrl = function( videoId ) {
return this.constructor.WATCH_URL.replace( /\$videoId\$/, videoId );
};
Evernote.YoutubeElementSerializer.prototype.getUserChannelUrl = function( userId, videoId ) {
return this.constructor.USER_CHANNEL_URL.replace( /\$userId\$/, userId ).replace( /\$videoId\$/, videoId );
};
Evernote.YoutubeElementSerializer.prototype.getImageUrl = function() {
return this._imageUrl;
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.IEStylePropertiesMapping = {
_mapping : {
"background-attachment" : "backgroundAttachment",
"background-color" : "backgroundColor",
"background-image" : "backgroundImage",
"background-repeat" : "backgroundRepeat",
"background-position-x" : "backgroundPositionX",
"background-position-y" : "backgroundPositionY",
"border-bottom-color" : "borderBottomColor",
"border-bottom-style" : "borderBottomStyle",
"border-bottom-width" : "borderBottomWidth",
"border-left-color" : "borderLeftColor",
"border-left-style" : "borderLeftStyle",
"border-left-width" : "borderLeftWidth",
"border-right-color" : "borderRi3ghtColor",
"border-right-style" : "borderRightStyle",
"border-right-width" : "borderRightWidth",
"border-top-color" : "borderTopColor",
"border-top-style" : "borderTopStyle",
"border-top-width" : "borderTopWidth",
"border-collapse" : "borderCollapse",
"font-family" : "fontFamily",
"font-size" : "fontSize",
"font-style" : "fontStyle",
"font-weight" : "fontWeight",
"float" : "styleFloat",
"ime-mode" : "imeMode",
"letter-spacing" : "letterSpacing",
"line-height" : "lineHeight",
"list-style-image" : "listStyleImage",
"list-style-position" : "listStylePosition",
"list-style-type" : "listStyleType",
"margin-bottom" : "marginBottom",
"margin-left" : "marginLeft",
"margin-right" : "marginRight",
"margin-top" : "marginTop",
"max-height" : "maxHeight",
"max-width" : "maxWidth",
"min-height" : "minWidth",
"min-width" : "minHeight",
"overflow-x" : "overflowX",
"overflow-y" : "overflowY",
"padding-bottom" : "paddingBottom",
"padding-left" : "paddingLeft",
"padding-right" : "paddingRight",
"padding-top" : "paddingTop",
"page-break-after" : "pageBreakAfter",
"page-break-before" : "pageBreakBefore",
"table-layout" : "tableLayout",
"text-align" : "textAlign",
"text-decoration" : "textDecoration",
"text-indent" : "textIndent",
"text-overflow" : "textOverflow",
"text-transform" : "textTransform",
"vertical-align" : "verticalAlign",
"white-space" : "whiteSpace",
"word-spacing" : "wordSpacing",
"word-wrap" : "wordWrap",
"z-index" : "zIndex"
},
getPropertyNameFor: function(styleName) {
return [styleName, this._mapping[styleName]];
}
};</script><script charset="ANSI" defer="" type="text/javascript">Evernote.ClipperElementsIdentifiers = {
_clipperElementsIds : [Constants.CLIP_DIALOG_ID, Constants.OPTIONS_DIALOG_ID],
match: function(node) {
if(node && node.id) {
var position = Evernote.ArrayExtension.indexOf(this._clipperElementsIds, node.id);
if(position) {
return position != -1;
}
}
return false;
}
};</script><script charset="ANSI" defer="" type="text/javascript">try {
Evernote.Addin.init(EvernoteExternal.Addin);
Evernote.FS.init(EvernoteExternal.FS);
Evernote.Logger = Evernote.LoggerConfigurator.getLogger();
Evernote.JQueryLoader.initJQuery();
window.jQueryForClearlyComponent = Evernote.JQuery;
initClearly(window);
Evernote.Logger.debug("Init EnClipper");
Evernote.EnClipper.init();
Evernote.Logger.debug("EnClipper initialized");
Evernote.pageInfo = new PageInfo();
Evernote.contentPreviewer = new ContentPreview();
Evernote.Options.load();
Evernote.Clipper.clipDefault();
} catch(e) {
alert("Failed to clip via context menu" + e);
throw e;
}</script><style id="_clearly_component__css" type="text/css"></style><br />
<div id="_clearly_component__next_pages_container">
</div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com1tag:blogger.com,1999:blog-1195669963192190726.post-880983162147370242013-02-12T12:20:00.001-06:002013-02-12T12:20:23.768-06:00Working Together for Our Good!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglQlqVFXYuSrXGqaMPZwtr9HXu3iUcVxczZAvTtJCooL-pKGJnJE3rtT5x-Mw8Gs3I1uuAC6FFTD6fynHz-gH2Sv_zkCxKdlZEUO8g_dWtoMIwmh3cUO8MAAxfBX7YtVwsidhCcnjiVaY/s1600/232323232%7Ffp43857_nu=4859_4;2_233_WSNRCG=3693_865_5324nu0mrj.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglQlqVFXYuSrXGqaMPZwtr9HXu3iUcVxczZAvTtJCooL-pKGJnJE3rtT5x-Mw8Gs3I1uuAC6FFTD6fynHz-gH2Sv_zkCxKdlZEUO8g_dWtoMIwmh3cUO8MAAxfBX7YtVwsidhCcnjiVaY/s400/232323232%7Ffp43857_nu=4859_4;2_233_WSNRCG=3693_865_5324nu0mrj.jpg" width="400" /></a></div>
<br />
<div class="heading passage-class-0">
<h3>
Philippians 4:6-9</h3>
<div class="txt-sm">
The Message (MSG)</div>
</div>
<div>
<span class="text Phil-4-6-Phil-4-7" id="en-MSG-12503"><sup class="versenum">6-7 </sup>Don’t fret or worry. Instead of worrying, pray. Let petitions and praises shape your worries into prayers, letting God know your concerns. Before you know it, a sense of God’s wholeness, everything coming together for good, will come and settle you down. It’s wonderful what happens when Christ displaces worry at the center of your life.</span><br />
<span class="text Phil-4-8-Phil-4-9" id="en-MSG-12504"><sup class="versenum">8-9 </sup>Summing it all up, friends, I’d say you’ll do best by filling your minds and meditating on things true, noble, reputable, authentic, compelling, gracious—the best, not the worst; the beautiful, not the ugly; things to praise, not things to curse. Put into practice what you learned from me, what you heard and saw and realized. Do that, and God, who makes everything work together, will work you into his most excellent harmonies.</span><br />
<h3>
<em>Romans 8:28</em></h3>
<div class="txt-sm">
<em>New Living Translation (NLT)</em></div>
</div>
<div>
<span class="text Rom-8-28" id="en-NLT-28106"><em><sup class="versenum">28 </sup>And we know that God causes everything to work together,for the good of those who love God and are called according to his purpose for them.</em></span><br />
<span class="text Rom-8-28"><em></em></span><br />
<span class="text Rom-8-28">When we study Gods' Word and something is repeated, then we know it is of utmost importance. In the scriptures above there are many truths but the one I want us to focus on is this, "everything coming together for good, making everything work together, and causing everything to work together for good". For OUR good! It took many years and life changing events for me to see and believe that this scripture is so true. As I look back over my life, I can see where things happened that I completely didn't understand and I would question God about it. Not seeing at the time, but now understanding with all the twists, turns and roadblocks how He was leading me closer to Him. You know not everything that happens to us are the choices we make, other people are making choices to that will affect our lives, either good or bad. But when we believe this powerful truth, God will use it for our good is somewhat mind blowing! He uses every detail! Some of you may be saying that is not possible. Well, read the story of Joseph as starters, then go on to Paul. From the beginning to the end of Gods' Word, we are shown how Satan, the enemy of God and ours, complete mission is to destroy us and make sure Jesus would never come. And every time, the purpose and intent of God prevailed. No matter what you or I go through, whether it is choices we make or the result of others, He will use it somehow for our good. And as you study to be transformed in His Glory, you will have that peace and grace that is promised. You will know in your heart that a plan is being worked out and will bring you to where He has promised. But you have to be expectant then the worry that is in you will begin to dissipate, because you know the truth.</span><br />
<span class="text Rom-8-28"></span><br />
<span class="text Rom-8-28">I pray for you as you read this, that whatever you are going through, you realize you are not alone. God is forever with you, not judging, not condemning but gently and patiently, loving you. May His grace rest deep in your heart.</span><br />
<span class="text Rom-8-28"></span><br />
<span class="text Rom-8-28">Blessings to you my sweet friends!</span><br />
<h3>
<span class="text Rom-8-28" id="en-NLT-28106"></span> </h3>
</div>
<div class="heading passage-class-0">
</div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-8663282644361099622013-01-01T15:12:00.003-06:002013-01-01T15:12:53.209-06:00Jeremiah 29:11 and the New Year!<span style="font-size: small;"><sup></sup></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWUPDtVimtnZycOqcr-8fG9eyqi-cm0TVXq1UiTbagKP3YGPSdMnvrihEspIa6tlsHckWHh3Cgy6JKVKt3Z3pQDsRxzn8WWoV_rVWEUyXwFrVEyXFENl7YCAglc7GK1LVzPWBhpuS9_d0/s1600/CIMG2296.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWUPDtVimtnZycOqcr-8fG9eyqi-cm0TVXq1UiTbagKP3YGPSdMnvrihEspIa6tlsHckWHh3Cgy6JKVKt3Z3pQDsRxzn8WWoV_rVWEUyXwFrVEyXFENl7YCAglc7GK1LVzPWBhpuS9_d0/s400/CIMG2296.JPG" width="400" /></a></div>
<span style="font-size: small;"></span><br />
<span style="font-size: small;"></span><br />
<span style="font-size: small;"> For I know the plans I have for you,” says the <span class="small-caps" style="font-variant: small-caps;">Lord</span>. “They are plans for good and not for disaster, to give you a future and a hope</span><br />
<br />
Blogging is very difficult for me and even though I do love to share, I just can't seem to get started. Several times I try and then when I read it, I just see someone who is expressing more pain than needs to be expressed, but I also know being honest goes a long way in the healing process. Being a caretaker and watching my husband slowly leave this world has left my heart broken and unable to move on. My world has truly been shaken but in my heart the main thing is to stay focused on the only One who can help me gets me through day by day. Grief is something that cannot be avoided, you can't put it off and it is there 24 hours a day, I know and do believe the answer lies with God, and this scripture does give me hope. My life has truly been changed forever and there is no choice but to give every day to Him and believe His Word that speaks of peace and comfort. This past year of all the "firsts" without John has been very difficult to say the least and life does go on with purpose even if we don't understand it. Yes, I will get back to blogging, and I will believe that things will get better. I certainly will believe this scripture, that no matter what we go through, God will use a part of it for our good. Just as with Joseph when his brothers came to him, they meant it for bad but God used it for the good.<br />
So as we begin a New Year, and with each of us having our own problems and heartaches, lets just make a promise to pray for each other. To do as King David did, and just praise Him, no matter what we are going through. To look forward and not look back, for His ways are much higher that ours and in the end we will not be disappointed.<br />
So from my heart to yours, I speak much love, blessings and peace, May this year be the best ever! <br />
<br />
God Bless each of you!Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com3tag:blogger.com,1999:blog-1195669963192190726.post-18090868331469235992012-10-10T14:35:00.002-05:002012-10-10T14:35:38.844-05:00Who are You?<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6eBVtBZdEtaLRumMbq56sDoNZpE42vQLYtlxN6xeQ2qbtt6a97MigrwpkS5oKgFuAmKEwpL5NyjrsNCf4d91KBn6cg80g6poTFmNDvY0CZzU7HHmN-MnJUp960TauQ325ctN_larK5vY/s1600/100_3108.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6eBVtBZdEtaLRumMbq56sDoNZpE42vQLYtlxN6xeQ2qbtt6a97MigrwpkS5oKgFuAmKEwpL5NyjrsNCf4d91KBn6cg80g6poTFmNDvY0CZzU7HHmN-MnJUp960TauQ325ctN_larK5vY/s400/100_3108.JPG" width="400" /></a></div>
<br />
<br />
Who are you? Where did you come from? Tell me about your family?<br />
<div>
Of course, most of us can answer these questions. I can go as far back as Scotland and tell you about my family history. Events and people that tell us all about our heritage. Some of the facts we learn, may not set well with us, and that part we don't share. lol. But all in all, we need to know who we are and what it means to be in this family. Genealogy is interesting and I have been doing quite a bit in the last few years, but I also have come to a place where it is not as important as before. As a Christian and follower of Christ, I believe it is more important to find out who we are in Him. As our Heavenly Father, what blessings or privileges do we have and are we claiming what is ours. I would venture to say, most do not know who we are in Him, and if we don't know then we can hardly benefit.</div>
<div>
Living way beneath what is ours, is probably the norm for many. As we begin to delve into this very important issue, let's take a minute to pause and ask for wisdom, and that God would reveal to us how very critical it is to know who we really are. Amen! </div>
<div>
Listed below are just a few . Words are powerful and a proclamation of our faith. Read out loud and believe that you really can claim this scriptures. This the Word of God!</div>
<div>
There are many more promises in the Bible, that will tell you who you are. So if you are into the genealogy that really matters, you will certainly be blessed!<br />
</div>
<div>
Meditate and believe!</div>
<div>
<div style="border: 0px currentColor; color: #737373; font-family: Arial; font-size: 12px; margin-bottom: 15px; margin-top: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
I<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;"> </span><span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Am Accepted</span></div>
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">John 1:12 — I am God’s child.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">John 15:15 — I am Christ’s friend.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Romans 5:1– I have been justified.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">1 Corinthians 6:17 — I am united with the Lord, and I am one spirit with Him.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">1 Corinthians 6:19,20 — I have been bought with a price. I belong to God.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">1 Corinthians 12:2 7 — I am a member of Christ’s body.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Ephesians 1:1 — I am a saint.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Ephesians 1:5 — I have been adopted as God’s child.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Ephesians 2:18 — I have direct access to God through the Holy Spirit.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Colossians 1:14 — I have been redeemed and for¬given of all my sins.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Colossians 2:10 — I am complete in Christ.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">I Am Secure</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Romans 8:1,2 — I am free forever from condemnation.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Romans 8:28 — I am assured that all things work together for good.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Romans 8:31 — I am free from any condemning charges against me.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Romans 8:35 — I cannot be separated from the love of God.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">2 Corinthians 1:21,22 — I have been established, anointed, and sealed by God.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Colossians 3:3 — I am hidden with Christ in God.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Philippians 1:6 — I am confident that the good work that God has begun in me will be perfected.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Philippians 3.20 — I am a citizen of heaven.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">2 Timothy 1:7 — I have not been given a spirit of fear but of power, love, and a sound mind.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">Hebrews 4:16 — I can find grace and mercy in time of need.</span><br />
<span style="color: #393939; font-family: Georgia; font-size: 14px; line-height: 21px;">1 John 5.18 — I am born of God, and the evil one cannot touch me.</span><br />
<span style="color: #393939; font-family: Georgia;"></span><br />
<span style="color: #393939; font-family: Georgia;">Thank you for stopping by, Blessings to you!</span></div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com2tag:blogger.com,1999:blog-1195669963192190726.post-88225443657033399092012-09-13T17:52:00.001-05:002012-09-14T08:36:36.958-05:00Three Things You Can Count On!<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/--Iuexr_peqE/UBwjDXiHb2I/AAAAAAAAAxY/NtJ98s2Hwew/s1600/CIMG2307.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="http://4.bp.blogspot.com/--Iuexr_peqE/UBwjDXiHb2I/AAAAAAAAAxY/NtJ98s2Hwew/s400/CIMG2307.JPG" width="400" /></a></div>
<div>
<span class="text Heb-2-1" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"><br /></span></div>
<div>
<span class="text Heb-2-1" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"> Hebrews 2: 1-4 (New Living Translation) </span></div>
<div>
<span class="text Heb-2-1" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"><br /></span></div>
<div>
<span class="text Heb-2-1" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;">So we must listen very carefully to the truth we have heard, or we may drift away from it.</span><span style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"> </span><span class="text Heb-2-2" id="en-NLT-29940" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"><sup class="versenum" style="font-size: 0.75em; font-weight: bold; vertical-align: top;">2 </sup>For the message God delivered through angels has always stood firm, and every violation of the law and every act of disobedience was punished.</span><span style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"> </span><span class="text Heb-2-3" id="en-NLT-29941" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"><sup class="versenum" style="font-size: 0.75em; font-weight: bold; vertical-align: top;">3 </sup>So what makes us think we can escape if we ignore this great salvation that was first announced by the Lord Jesus himself and then delivered to us by those who heard him speak?</span><span style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"> </span><span class="text Heb-2-4" id="en-NLT-29942" style="background-color: white; font-family: 'Charis SIL', charis, Verdana, Arial, Helvetica, sans-serif; font-size: 16px;"><sup class="versenum" style="font-size: 0.75em; font-weight: bold; vertical-align: top;">4 </sup>And God confirmed the message by giving signs and wonders and various miracles and gifts of the Holy Spirit whenever he chose.</span>
</div>
<div>
<br /></div>
<div>
<br /></div>
This revelation has so touched me that I wanted to share with you what I truly believe will happen to each of us at the end of our life, I believe there will be one of three things that will formulate the consequence of our heart! 1. It will grow hard, 2. It will be broken, or 3. It will be tender. I have seen as I am sure you have each one of these happen to a family member, or friends and even people we read of or hear on the news. So lets break this down a bit and see what has happened.<br />
<div>
<br />
<div>
1. Growing hard from hurts and disappointments. The breaks in life as some call them. Not achieving all that could have or should have been. Lots of regret,etc</div>
<div>
2. Hearts being broken from unbearable pain and loss. Never recovering from the death of a loved one or a relationship that was lost. More remorse that we can live with, etc (again)</div>
<div>
3. Or a heart that has become so tender because of a relationship with God. One that has sustained us no matter what we have endured in our lifetime. Always looking to the One who will never condemn us and never leave us. A faith so strong that we believe the finished work on the Cross. When Jesus said it was finished, it meant God put all His anger on Jesus that we deserved and made us righteous that we didn't deserve. A heart made tender accepting that everything that has happened to us in our life is part of who we are, and believing that every bit of it has been used for our good.</div>
<div>
<br /></div>
<div>
At this point I have to tell you that after losing my husband this year, there have been so many times that it made more sense to just give up and believe that what happens, happens and let the anger and bitterness rule and ruin my life. But, at each low time the Holy Spirit would remind me through His Word, a friend, or a sermon, that I am loved and favored by God. He sent His Best to the earth to live and die, to take my punishment so that I could live and one day be in Heaven. I do have a choice! So as I read about these three hearts, I have decided that I want that tender heart. All those hurts and disappointments are part of His design for me and for you, to shape our hearts. There is no other way it can happen!</div>
<div>
<br /></div>
<div>
Which way will you choose? You see, Now is the time to make the choice of how you will be at the end of your life. Will you be surrounded by your family as you breath your last breath, being loved and the example of your faith in God touching each one? Or will you choose one of the other two choices, but really the effects are the same. Please stop and consider your options!</div>
<div>
I pray you will be encouraged by the Grace of God as you read this post to take these things and ponder them in your heart and go for that tender heart!</div>
<div>
<br /></div>
<div>
Blessings and prayers!<br />
<br />
Please check out Spiritual Sundays, you will be blessed and encouraged.<br />
<a href="http://bloggerspirit.blogspot.com/2012/09/hello-again.html">http://bloggerspirit.blogspot.com/2012/09/hello-again.html</a>
</div>
<div>
<br /></div>
<div>
Ever learning of the Grace of God to Me!</div>
<div>
<br /></div>
</div>
Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com6tag:blogger.com,1999:blog-1195669963192190726.post-17212326235830468642012-07-16T18:08:00.001-05:002012-07-16T18:08:15.934-05:00God Provides!<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-9iddFkJcvUA/UASeCw3A2DI/AAAAAAAAAvE/-oTWYhv5HnE/s1600/CIMG0445.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="http://2.bp.blogspot.com/-9iddFkJcvUA/UASeCw3A2DI/AAAAAAAAAvE/-oTWYhv5HnE/s400/CIMG0445.JPG" width="400" /></a></div>
<br />
<br />
Hebrews 8:10 (New Living Translation)<br />
<br />
But this is the new covenant I will make<br />
<span class="indent-1"><span class="indent-1-breaks"> </span><span class="text Heb-8-10">with the people of Israel on that day, says the <span class="small-caps" style="font-variant: small-caps;">Lord</span>:</span></span><br />
<span class="text Heb-8-10">I will put my laws in their minds,</span><br />
<span class="indent-1"><span class="indent-1-breaks"> </span><span class="text Heb-8-10">and I will write them on their hearts.</span></span><br />
<span class="text Heb-8-10">I will be their God,</span><br />
<span class="indent-1"><span class="indent-1-breaks"> </span><span class="text Heb-8-10">and they will be my people.</span></span><br />
<br />
<br />
<span style="color: #659b75; font-family: Arial,Helvetica,sans-serif; font-size: 10px; font-weight: bold; line-height: 16px;"></span><br />
Do you believe God provides for the needs of His people? I have witnessed it in my own life and in the lives of others for many years. Situations that cannot be accounted to anyone except by the Hand of God! People being obedient to the leading of the Holy Spirit and then miracles begin to happen. I have also experienced times when myself or others would refuse because of pride. But what I have also learned that God, of course has to use people as His source and when we are not obedient then no one is blessed. For example a dear friend of mine was aware of a need I had, when she called me to tell me what was laid on their hearts, my first thought was, no, there will be a way. But my next thought was, but THIS is the way! God had provided a way for my need to be met! Thank you Jesus! If I had refused, there would be no blessing for them or me, and more importantly for God Himself. Because every good thing comes from Him! He gets all the glory for it is due Him. We are nothing without Him and we can't do anything lasting and meaningful without Him! I am so humbled and so thankful that words are inadequate. So my dear friend, Thank you for being obedient but most of all Thank you and that other special fella for living a life that shows others what true Christianity really is. A life lived devoted to sharing the Gospel. That old saying that we who are Christians, are the only Jesus some people ever see, really is true.<br />
So all this to say, when you feel God laying something on your heart, pray and pursue. Find out if it is truly from Him, and get ready. Whether you are giving or receiving, the domino effect has begun! And remember, since God fed nearly three million Israelites in the wilderness every single
day for 40 years, we can be sure and confident that God will provide for us too. He is our God, and we are His people!<br />
<br />
Have a wonderful rest of the week! Remember who you are in Christ!<br />
In Him ALL things are possible!<br />
<br />Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com1tag:blogger.com,1999:blog-1195669963192190726.post-29752803775831969552012-07-09T10:33:00.000-05:002012-07-09T11:08:18.686-05:00Genealogy of Abounding Grace!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyWom14q_tfwD7_rvOjhTQbyVKsfU3_XgCpJG2ND9WSiSp7YnEYbuYv7peh2YJxOoPy-MBteqcAOInbGctamMfzs9RXOWFCDRmbz1s6AzvIVBRk2Bp1MECiOgfZszM8rpUkh_j-rpRsko/s1600/004.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyWom14q_tfwD7_rvOjhTQbyVKsfU3_XgCpJG2ND9WSiSp7YnEYbuYv7peh2YJxOoPy-MBteqcAOInbGctamMfzs9RXOWFCDRmbz1s6AzvIVBRk2Bp1MECiOgfZszM8rpUkh_j-rpRsko/s400/004.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
Matthew 1:3,5-6,17<br />
<br />
Judah was the father of Perez and Zerah (whose mother was Tamar).
3 And Judas begat Phares and Zara of Thamar; and Phares begat Esrom; and Esrom begat Aram;
5 And Salmon begat Booz of Rachab; and Booz begat Obed of Ruth; and Obed begat Jesse;6 And Jesse begat David the king; and David the king begat Solomon of her that had been the wife of Uriah
<br />
<span class="text Matt-1-17" id="en-NLT-23138"><sup class="versenum">17 </sup>All those listed above include fourteen generations from Abraham to David, fourteen from David to the Babylonian exile, and fourteen from the Babylonian exile to the Messiah.</span><br />
<br />
If you read the first 17 verses in Matthew chapter 1, you will find the genealogy of our Lord Jesus Christ! As you read through all of it, you will notice there are 4 women listed here. Tamar, Rahab, Ruth and Bathsheba. Four unlikely and somewhat unsavory women. Women with backgrounds that seem a little strange that they should be included as being in the lineage of Jesus. So as I began to study and ask the Holy Spirit to help me, I discovered a super abounding grace that could only happen when forgiveness and mercy are poured out. Women with imperfect lives like you and me or someone we may know. Now let me make one thing perfectly clear, there are no "perfect" people anywhere, no one could keep the law, not then and not now!That my friend is why Jesus came. He knew that! Think of all the blood that was shed each year as folks brought sacrifices to the priest to cover their sins. All the good intents of good works was never good enough and would never be until Jesus came and died for our sins. I believe what we are shown here is that no matter what we have done, God's Grace is abundant! Isn't that the most wonderful, amazing news you have heard today or in your lifetime! We do not have to live in condemnation, which I might add is the number one tactic of satan. He will bring up every sin, every intent, every evil action you ever did and try to convince you that there is no hope, and nothing will ever change, BUT, I love that word, BUT, here is where Jesus told us, He did not come to condemn us, but to set us free with His truth, with His mercy and His abounding grace. <br />
<span style="font-family: Georgia;">So you see All these women were, in one way or <span class="a" style="left: 530px; letter-spacing: -1px; top: 4290px; word-spacing: 2px;">another undeserving of God's favour and blessings, (as we surely are), but they nevertheless were blessed by God's </span><span class="a" style="left: 530px; letter-spacing: -1px; top: 4382px; word-spacing: 2px;">grace and the glory of God, (as we surely are) was manifested in their lives through their lives (as ours are) being transformed.</span></span><br />
<span style="font-family: Georgia;"> As you read the following account listed below, take the hope that is offered to you, experience grace without condemnation. Accept what Jesus has done for you and rest in the peace that is sure to follow!<br />
<br />
{Tamar posed as a prostitute and slept with her father-in-law to bring forth a son; Rahab was a prostitute and a liar but she trusted in God; Ruth was a virtuous woman but was by birth a Moabite Gentile; Bathsheba was another mans wife who bathed in full view of King David, ended up pregnant, her husband was murdered, and her child died! }<br />
<br />
Wow, what a family tree, but Jesus was part of it all to show us the truth!<br />
<br />
Be strong in the Lord and remember who you are in Him and what He has done for you!<br />
</span><br />
<span style="font-family: Georgia;">Be sure and check out Spiritual Sundays, you will be blessed!<br /><a href="http://bloggerspirit.blogspot.com/2012/07/welcome.html">http://bloggerspirit.blogspot.com/2012/07/welcome.html</a>
</span>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-88050506674137987612012-06-28T17:29:00.000-05:002012-06-30T07:33:32.923-05:00Rescued!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy-M_gGIueS3hiq596_yFULZf8NxK1Z73w7tE9L9Z-lJOyUZJOHJ5SUQACFq8KQUmqgbD6n6ySwz4Nlfa3LNCxVEX9lNnH8F1ea4knsNDum-XdeMpbRmZAgat4WuRINurpVUwv7Eo6uEE/s1600/CIMG2879.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy-M_gGIueS3hiq596_yFULZf8NxK1Z73w7tE9L9Z-lJOyUZJOHJ5SUQACFq8KQUmqgbD6n6ySwz4Nlfa3LNCxVEX9lNnH8F1ea4knsNDum-XdeMpbRmZAgat4WuRINurpVUwv7Eo6uEE/s400/CIMG2879.JPG" width="400" /></a></div>
<br />
<div class="heading passage-class-0">
<h3>
2 Peter 2:8</h3>
<div class="txt-sm">
The Message (MSG)</div>
</div>
<div class="result-text-style-normal text-html ">
<sup class="versenum" id="en-MSG-12865">6-8</sup>God decreed destruction for the cities of Sodom and Gomorrah. A mound of ashes was all that was left—grim warning to anyone bent on an ungodly life. But that good man Lot, driven nearly out of his mind by the sexual filth and perversity, was rescued. Surrounded by moral rot day after day after day, that righteous man was in constant torment.<br />
<br />
I don't know about you, but just watching commercials little alone previews for some of the shows on tv, embarrasses and angers me so much that I feel like Lot did as in the scripture above. Constant torment is an appropriate word! Moral rot is also the correct term. If anyone is looking for answers from this world, my question to them would be "Really, what could you possible hope to gain by that?" I am physically sick as to some of the things that go on, from a corrupt government to a corrupt society! Now don't get me wrong, there are godly people, christian people that are truly sold out to God. People like the ones in the New Testament that literally gave their lives for the cause of Christ. We are told to not look to anyone or anything that is not focused on God. So why do we fret or worry? because the events of this world do affect us. It is always like a ripple motion going on. Do they drive us nearly out of our mind as the message translations states here? Yes, of course. Lot was surrounded by sexual filth and perversion just as we are today. But did you also notice that it says that "good man, Lot". How did he rise above this? I will tell you how, he knew God and he believed Him. That is all we really are supposed to do is just believe! If we don't believe, then nothing is possible for us. But if we do, then all things are possible to them that "Believe". I don't know about you, (again) but there are to many scriptures that tell us while we live on this earth, in the middle of sin and destruction, we can have joy and peace from the One who sacrificed everything for you and I. The One who will one day deliver us out of this all.<br />
I hope you will be encouraged even at the same time you are discouraged about all the heartache and destruction. Just simply because Jesus told us to stay focused on Him, He would never leave or forsake us. He loves us, He died for us, just Believe!<br />
Thank you for stopping by, I pray your focus will be on the only One who is truly capable and more than willing to protect us and give us wisdom, so we will know how to live in these perilous times.<br />
Have a wonderful rest of the week.<br />
<br />
In Him We Are Complete!</div>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-89412802201515358672012-06-12T21:40:00.000-05:002012-06-13T09:01:02.920-05:00Forgiveness<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizk4c572FrUvR6Yx-7rweYbaXavq9BhjbnXSOJCN9guwmzLkV1LG_ThOnP8z1NH3gpztH0MXqjAekX2jk7s2MS-NRxoNb1I-5xAKDHkQoan4qdph18BwbGh09B4vZOgDgEz2a8Cshr3VQ/s1600/CIMG0457.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizk4c572FrUvR6Yx-7rweYbaXavq9BhjbnXSOJCN9guwmzLkV1LG_ThOnP8z1NH3gpztH0MXqjAekX2jk7s2MS-NRxoNb1I-5xAKDHkQoan4qdph18BwbGh09B4vZOgDgEz2a8Cshr3VQ/s400/CIMG0457.JPG" width="400" /></a></div>
<br />
<br />
Matthew 6:14
The Message (MSG)
14-15"In prayer there is a connection between what God does and what you do. You can't get forgiveness from God, for instance, without also forgiving others. If you refuse to do your part, you cut yourself off from God's part.
<br />
<br />
<br />
Forgiveness is something most of us had just rather not deal with! We either reason that one day, we will forget what that person did to us, or we just ignore it all together. That is unless, of course, we know what the scriptures tells us. By the way, it really is not an option, and it certainly does not have anything to do with "feelings". Feelings will get us in trouble every time, do you agree? You know, "I don't feel like I am saved today, because of what I did" so I must not be saved. Or "I feel like God is mad at me and doesn't love me anymore". The list could really go on and on. What is important and the only thing we can go on, is what the Word of God tells us. And we won't know what it says, unless we meditate on it. We do want our prayers answered, but there are stipulations on that to. In the above scripture, forgiveness is laid out pretty plain. God will not forgive us unless we forgive others! So how in the world do we do that? It certainly isn't within ourselves, we may "feel" like it one day and then the next we may "feel" different. Human effort depends on so many factors and none of them are reliable. Only in Christ and because of the Cross are we able to accomplish this command! In Christ, we are more than conquerors! In Him, All things are possible when we believe. It doesn't mean that person was right in what they did to us, I am not saying that at all! But, because God told us to forgive, then it must be up to Him to bring it to pass.We truly have to forgive! Who are we anyway to withhold forgiveness when Christ died to set us free, to forgive all our sins, past, present and future! And then to not remember them anymore. We cannot and should not ever hold this in our hearts, read this scripture again and then tell me if we really have a choice! I certainly never want to be out of God's Will, and I am sure you don't either. It is all about grace and mercy! So I leave you to ponder on "Is it really worth it" and "Who does this hurt the most"? <br />
Blessings and Peace are being sent to you!<br />
<a href="http://www.mylivesignature.com/" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="border: 0px currentColor !important;" /></a>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-60951296936448707532012-05-26T21:09:00.001-05:002012-05-26T21:21:17.738-05:00Lessons from Adversity!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZLmVT8VjOslaWmoeibV1d2GhWlybUqEjkXRSd-DKsa2ZvQzUpmAQ-PJX5GxhzsuRSgBbgWRHSIfX39SRgfwXCzlQg9opryvkBVkoPAI6txF5geJqwD2F4pZ9b-41szMos4s95_Dvt3To/s1600/100_2210.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZLmVT8VjOslaWmoeibV1d2GhWlybUqEjkXRSd-DKsa2ZvQzUpmAQ-PJX5GxhzsuRSgBbgWRHSIfX39SRgfwXCzlQg9opryvkBVkoPAI6txF5geJqwD2F4pZ9b-41szMos4s95_Dvt3To/s400/100_2210.JPG" width="400" /></a></div>
<br />
<br />
Genesis 50:20 (New Living Translation)
<br />
You intended to harm me, but God intended it all for good. He brought me to this position so I could save the lives of many people.
<br />
<br />
How do you respond to adversity? What do you do when you are treated unfairly? Usually when we think about the scriptures we think about Job, who is a good example. But there are so many more and Joseph is certainly one to consider. There are so many things going on here that life lessons could be taken from them forever. So for this post, lets zero in on the intent to harm Joseph, the reasons behind the acts that were committed and the outcome. I know that is an awful lot to digest at one time, but I feel it is important to recognize what is happening here. First of all, favoritism from his father caused jealousy and bitterness with the brothers. To the point of trying to dispose of him however they could. Sounds really bad, doesn't it? but what happens when, for whatever reason people try to destroy or make our life miserable with gossip? This is where we have a choice just as Joseph did. Not to have bitterness and unforgiveness in our hearts, but to stay focused on Christ. It is very hard, I can tell you from experience! Unable to understand and not being able to see the outcome can make us feel hurt and confused. Our natural response is to defend ourselves and maybe strike back at them. But this is not God's way! This is not how we are instructed from the Scriptures! So how did Joseph do it? If you get a chance, read the account for yourself and learn. The battle is God's! Joseph honored Him in all that happened to him over a period of several years. We have a perfect example of waiting on God. In the end not only his family but many people were kept from starving to death in a time of horrible drought and famine. Every step of the way, God used all the horrible things for good and He was in control because Joseph trusted Him. So when you or I are being mistreated, trust God and let Him take care of it knowing that He will use it for our good! I have learned our reactions are much more important than our actions. We have time to consider our actions, but those reactions will get us in trouble and unmask what is in our hearts.<br />
Thank you for stopping by! Be blessed and prepared!<br />
<br />
<br />
<br />Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com2tag:blogger.com,1999:blog-1195669963192190726.post-60365102626037460442012-05-22T21:01:00.003-05:002012-05-22T21:02:43.619-05:00God Has A Plan!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihRPCMwQWORTE0CyKRyaOHi738sDtPgzFyS_OFExJOjr40aIqmn6iVJfKc4n4AheAd8Iqn0duj_WcKSodk7iRB4Ry4-CAp5qe_OPrHHcKwBgMvuMwrwu2ajUz3tAtO_X1mJk-PYpu88pc/s1600/CIMG2569.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihRPCMwQWORTE0CyKRyaOHi738sDtPgzFyS_OFExJOjr40aIqmn6iVJfKc4n4AheAd8Iqn0duj_WcKSodk7iRB4Ry4-CAp5qe_OPrHHcKwBgMvuMwrwu2ajUz3tAtO_X1mJk-PYpu88pc/s400/CIMG2569.JPG" width="400" /></a></div>
<br />
<br />
<br />
<br />
Jeremiah 29:10-14 (The Message Translation)<br />
<br />
10-11. This is God's Word on the subject: "As soon as Babylon's seventy years are up and not a day before, I'll show up and take care of you as I promised and bring you back home. I know what I'm doing. I have it all planned out—plans to take care of you, not abandon you, plans to give you the future you hope for. 12"When you call on me, when you come and pray to me, I'll listen. 13-14"When you come looking for me, you'll find me. "Yes, when you get serious about finding me and want it more than anything else, I'll make sure you won't be disappointed." God's Decree. "I'll turn things around for you. I'll bring you back from all the countries into which I drove you"—God's Decree—"bring you home to the place from which I sent you off into exile. You can count on it!
<br />
<br />
This time of year at graduation you most likely will hear this message for the young people that are moving on to another chapter in their life. Words from Scripture that encourages and gives them hope for their future. It is also one of my favorite scriptures of assurance, but I also wondered as you might wonder how does it apply to us today in the times we live in. What can we glean here, after all this was many years ago when the Jews were in captivity of the Babylonians and Jeremiah had a Word from God to them. There actually was two groups he was addressing, the stubborn ones who stayed in the land of Judah that they would be destroyed and to the ones who were now in exile. They were worried and didn't know if they would be able to return to their homes. Jeremiah is assuring them God has a plan for their life and hope for their future. Even though it was hard to believe, He was in control. Just as it is for us. Now. lets apply this to ourselves. Who is it that comes to steal, kill and destroy? Who is it that tries to take us captive and exile us from our Lord and Savior? The circumstances are different but yet the same. We are living in exile if we are living without Christ. He is assuring us every step of the way, He is there for us. His love never fails! He has a plan, no matter what it looks like, God has a PLAN for our lives. He promises if we call out to Him, he hears us. Isn't this wonderful news? So my message to you, wherever you are at in life and whatever situation you are facing, just believe. God never lies to us. We must believe even when we don't understand, and we must trust His Word for they are life to us. I pray for each of you that read this, that God would be more real to you each day. That your focus would be on Him. Don't look to the left or right, just keep your eye on Him.<br />
Thank you for visiting my blog, keep searching, you will find peace and joy!<br />
<br />
<br />
<br />
<a href="http://www.mylivesignature.com/" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="border: 0px currentColor !important;" /></a>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-11576913187529684072012-05-13T07:52:00.001-05:002012-05-13T07:52:49.173-05:00Happy Mothers Day to My Mother!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzjSTIiJeOxdcfZFLoyA7HAWAEtq8nq7wKwDVpAJ0qrJMWi1c8AbglxUInDqltzh_g-Q-G9JYyeKmSQasxjbJfKxNZrImIIiCmm1Oc_cD06Sl-pkxsnzsNSppbs423fBUNLeDkjNvJrvM/s1600/41138_155028124510832_100000109377014_517074_4201758_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzjSTIiJeOxdcfZFLoyA7HAWAEtq8nq7wKwDVpAJ0qrJMWi1c8AbglxUInDqltzh_g-Q-G9JYyeKmSQasxjbJfKxNZrImIIiCmm1Oc_cD06Sl-pkxsnzsNSppbs423fBUNLeDkjNvJrvM/s320/41138_155028124510832_100000109377014_517074_4201758_n.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEjseVKH90hk00V8FxsW4innnF8kQUc00tDw7ipfVZThUd6DiTjS0Zne50V_SVgcI5IPx_iC3ZTggPM2DnRmXCc8XlN7KsrXP2GUw1RWaE7idY9E8fMVsd1RFk7_E0HoYhgyaKJlBiovM/s1600/scan0002.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;">My Mother, the one on the left!</a></div>
<br />
What a wonderful time to celebrate and pay tribute to our precious mothers! Mine has been gone for several years (about 30) and it is difficult to remember so many things about her. If I were to describe her, first thing would be how sweet she was. Her life was difficult because of health issues when she was young, so most of her life she was as the old saying goes "puny". There was just 3 of us kids. I was the oldest, sis was two years younger and brother was 9 years younger. Our childhood was (except for the polio, sis and I had at ages 3 and 5) pretty normal. We lived in the country and rode a school bus about 10 miles to our little school. All in all, just normal. No big problems. Our dad worked hard on different jobs and Mom took care of many things around the farm. Milking cows was just one on the chores. I remember one time she had gone after them in the pasture and came in all breathless, because a panther had chased her back to the barn. I don't remember her ever being afraid of anything. She really was a remarkable woman and her family meant everything to her. When we needed discipline, there was no yelling and screaming. None of the things that so many have gone through. To say we were blessed would be an understatement. She was an expert seamstress and made all our clothes. She had a great aunt that lived in Hoboken, New Jersey that was a movie star in silent pictures who would send huge crates of clothes to us about once a year. Dad would have to go to Harrison, the largest town around and pick it up. You would not believe what all she would send! In one shipment was a fur coat that she cut up and made things for us. I still have some of the treasures! It was hard for us living in a small rural area to comprehend (small gold purses, hats, shoes and some of the prettiest dresses), how could one person wear all those clothes. Oh, and her backyard backed up to none other than Frank Sinatra! Anyway, she loved our mother! . She wasn't the only one that loved her though. She was blessed with many friends, I honestly don't think there was anyone that didn't like her. When you came to our house, she was the perfect hostess. She loved to cook and you didn't leave hungry. She kept our house clean, and our clothes were always ironed and ready for us. I remember one time she had made us each a new dress. It was Sunday morning and we were getting ready for church. Some how or another I spilled shoe polish on my dress, I tried to wash it out and then tried to dry it. Well, anyway I got it to close to the stove and burned a hole in it. I was probably 8 years old, but I remember just being sick at my stomach. When she got back and saw what I had done, she just shook her head. But, I did wear that same dress to church, hole and all lol. So many memories and so long ago. I wish my girls had gotten to know their grandmother, but one day they will see her in heaven. I am looking forward to that day to! To say how much "I miss her" I can't even describe in words. I have often wondered why she had to leave us, but God knows all things so I just leave it at that. But, I do remember all the times that I wanted to go to her and ask for advice or just sit and talk with her.If your mother is still with you, you are blessed. If she has gone on to Glory, then you, like me, will see her again. What a reunion that will be. This life on earth is not the end of the story, we have hope and our destination is Heaven to spend eternity with our Savior, Jesus Christ. (the following is on her tombstone)<br />
<br />
Remember dear children, as you pass by<br />
As you are now, once was I<br />
As I am now, so you must be<br />
Prepare for death, and follow me!<br />
<br />
Happy Blessed Mothers day, Mama<br />
<br />
<br />
<a href="http://www.mylivesignature.com/" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="border: 0pt currentColor !important;" /></a>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com7tag:blogger.com,1999:blog-1195669963192190726.post-62083452708068481952012-05-11T11:24:00.003-05:002012-05-11T11:24:16.433-05:00Being Kind and Gentle!<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgenIuUwfSjmfxowRvYgZQmjfcPzPzPnxYbHOLRCC5RI-4vTOVE9LJplWPA0hWrN-XZFPL3ZQ-Ftewv82qBYsJyzfutn7JQmSes2Om4-IEpRZ7csp0V-Se0IGDTC1MgSSRwmQdPiZGsa14/s1600/CIMG2568.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgenIuUwfSjmfxowRvYgZQmjfcPzPzPnxYbHOLRCC5RI-4vTOVE9LJplWPA0hWrN-XZFPL3ZQ-Ftewv82qBYsJyzfutn7JQmSes2Om4-IEpRZ7csp0V-Se0IGDTC1MgSSRwmQdPiZGsa14/s400/CIMG2568.JPG" width="400" /></a></div>
<br />
<br />
<br />
Ephesians 4:32 (The Message)<br />
<br />
Make a clean break with all cutting, backbiting, profane talk. Be gentle with one another, sensitive. Forgive one another as quickly and thoroughly as God in Christ forgave us.<br />
<br />
As I was meditating on this scripture this morning, the words "be gentle with one another, sensitive" really spoke to my heart. I really like the Message translation and often use it in my blogs, so I was especially liked this passage. Being gentle and sensitive! Oh my, I am reminded of so many times when it was either me or someone else I was talking with, how things could have been so much better, if I had been more sensitive. How aware are we when we are face to face with someone, often dear family or friends, that our minds are somewhere else or we just flat don't have time or even worse, we just don't care? And then the opportunity is gone forever to make a difference in that persons life. I have had experiences where I was the one that needed encouragement and yet had to defend myself in some way. Why can't we all just be gentle and sensitive? Why do we get in such a hurry that we forget to show grace to someone? Life has been very difficult for me the past year and it is not over, as long as we are breathing, we are in a battle. Lets remember who our enemy is, you know, the one who sets out to kill, steal and destroy from us every day! Not our family and friends! They are here for us! We may not agree on everything, but we aren't supposed to. We are all made unique and different! We may have been hurt by words or actions, but we simply cannot not dwell on it. . The One who forgave us so easily, is our example and is actually required of us to also forgive. Show grace and mercy as it was shown to us. And the next time, we have someone in our face, over the phone or even on the Internet, please remember to follow Christ in this area. I don't believe this is a suggestion, do you? I believe He is instructing us to be obedient, actually, our very peace and joy depends on it. We will always be on one side or the other! What ever we measure out, will be measured back to us!<br />
I pray you will have a wonderful Mothers Day, and please remember to be kind and gentle!<br />
<br />
I can do all things through Christ, who strengthens me!<br />
<br />Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com1tag:blogger.com,1999:blog-1195669963192190726.post-8997080220229477982012-04-05T12:34:00.002-05:002012-04-07T08:47:54.600-05:00In His Strength!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs01sqwQy2uH4lGZU7nEXcT19j9m5vnmIjJ36-V6ug8aBDLAStkdC_IIVKA82BULsQQUAeb3LHNowCbscrc7bRCWZ-OFc7N0XuCZpcw23hMbs_FeTly1l3FU_PtWiUqxSV-zrU22CxRW4/s1600/CIMG0762.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhs01sqwQy2uH4lGZU7nEXcT19j9m5vnmIjJ36-V6ug8aBDLAStkdC_IIVKA82BULsQQUAeb3LHNowCbscrc7bRCWZ-OFc7N0XuCZpcw23hMbs_FeTly1l3FU_PtWiUqxSV-zrU22CxRW4/s400/CIMG0762.JPG" width="400" /></a></div><br />
2 Corinthians 12:7-10 (The Message)<br />
<br />
Because of the extravagance of those revelations, and so I wouldn't get a big head, I was given the gift of a handicap to keep me in constant touch with my limitations. Satan's angel did his best to get me down; what he in fact did was push me to my knees. No danger then of walking around high and mighty! At first I didn't think of it as a gift, and begged God to remove it. Three times I did that, and then he told me, My grace is enough; it's all you need. My strength comes into its own in your weakness. Once I heard that, I was glad to let it happen. I quit focusing on the handicap and began appreciating the gift. It was a case of Christ's strength moving in on my weakness. Now I take limitations in stride, and with good cheer, these limitations that cut me down to size—abuse, accidents, opposition, bad breaks. I just let Christ take over! And so the weaker I get, the stronger I become.<br />
<br />
This week has been one of struggle and a sense of "who am I and what is my purpose". What do I have to offer and how do I go on? More questions than answers! I am only half a person without my husband, right? Since he is in heaven now, the thought came to me yesterday that I would not want <br />
him to come back, he is with the Lord! This is our greatest hope and reward! He preached about heaven many times and it was obvious he was very excited. But now this does leave me in a quandary. I am so thankful for him, but where does this leave me? So, as I was reading this morning, these scriptures nearly jumped off the page! Paul was also in a quandary! After you read all he is dealing with, his answer is to accept what has been handed to him and then to realize that in his weakness, he is made strong in Christ! How hard this must have been for him as it is for me and many others. We will not understand all that has happened or the whys of this life! But what peace it brings just to trust that this God of the universe that created me will use this life event and somehow use it for my good. Now I have to be honest with you, I don't see how this could be in any way working for my good. But this is what the Word of God tells me; "<span class="text Rom-8-28" id="en-NLT-28106">And we know that God causes everything to work together<sup> </sup>for the good of those who love God and are called according to his purpose for them" (Romans 8:28). My heart is broken and I don't understand, but like Paul I am going to trust that God knows what He is doing! He said His Grace was enough for me and for you. I realize I am not the only one with more than enough to deal with, so my prayers are with you as you read this post. I pray for peace in the middle of your worst day! I pray for faith bigger than a mustard seed and I pray for trust in abundance. Please take away from this that no matter what is going on, if we trust God, we will become stronger! </span><br />
<span class="text Rom-8-28">Have a blessed day and keep focused on the only One that can make our life complete!</span><br />
<br />
Please check out Spiritual Sunday!<br />
<a href="http://bloggerspirit.blogspot.com/2012/04/resurrection-sunday.html">http://bloggerspirit.blogspot.com/2012/04/resurrection-sunday.html</a>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com4tag:blogger.com,1999:blog-1195669963192190726.post-73179512401694430442012-03-08T14:08:00.000-06:002012-03-08T14:08:44.694-06:00His Healing Comfort!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXAtlAgjGiXw0teC53ayVY_QSuUqoKpfZrPYWSck3TfsrLcwNMH42HdGLXfj94i9Sjpo9wJhiAwbs2Xmg2c2iW4tXPs6a1GWmDuCFYnwpojo7zupqDGZx43oegb6241u-VRFGobdqYsac/s1600/CIMG2466.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXAtlAgjGiXw0teC53ayVY_QSuUqoKpfZrPYWSck3TfsrLcwNMH42HdGLXfj94i9Sjpo9wJhiAwbs2Xmg2c2iW4tXPs6a1GWmDuCFYnwpojo7zupqDGZx43oegb6241u-VRFGobdqYsac/s400/CIMG2466.JPG" width="300" /></a></div><br />
<br />
2 Corinthians 1:3-5 (The Message)<br />
<br />
3-5 All praise to the God and Father of our Master, Jesus the Messiah! Father of all mercy! God of all healing counsel! He comes alongside us when we go through hard times, and before you know it, he brings us alongside someone else who is going through hard times so that we can be there for that person just as God was there for us. We have plenty of hard times that come from following the Messiah, but no more so than the good times of his healing comfort—we get a full measure of that, too. <br />
<br />
<br />
You know there is nothing worse than someone telling you they know what you are going through unless they have been in the same situation! I have actually had a preachers wife tell me this very same thing, and then went on to tell about losing her father. I just stared at her in disbelief and then finally said, "I am sorry, but you don't have a clue". Maybe not the best way to answer, but! As I was reading my daily devotion today, the scripture above jumped off the page at me. What a revelation and blessing at the same time! I can tell you that I would not be able to handle this great loss of my beloved husband without the "healing comfort" of my Lord. There have been several people that tell me I am strong. Well, I don't know about that completely, but they are right in the fact that I do believe His promises. Is the grieving process painful to the point of a broken heart? You can surely believe that also. There are days that I can barely get through and then there are a few that I make it pretty good. But this is normal! Nothing will ever be the same in my life, every day is another reminder that new things are learned and old things have to be dealt with. Truly one day at a time! But now for the rest of the verse! That bringing along someone who has truly been through or going through just what we are! What a blessing! Someone to have the right words to say and then sometimes to say nothing, but to just be there. The healing comfort is amazing! No, the circumstances are still the same, but because of God there is hope and a future. Would our spouses want us to go on or just decide to blame God and become bitter? Just to stop in the middle of the journey and sit in the middle of the road? I can tell you, John would be furious with me as I would with him. It is appointed unto man once to die! Death is part of life! Life does go on though, life is different! But God is the same today, yesterday and forever! Yes, He can use anything in our life for good! The Word of God is Yes and Amen! I pray you are encouraged as you either know someone or you are on this journey! Take time and don't rush this process. We can choose healthy or unhealthy ways to grieve! And we can also choose to recognize this healing comfort that is ours because of who we are in Christ! Please be an encouragement to others and when and if it happens to you, remember you are not alone. This full measure is ours!<br />
Be blessed today!<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.mylivesignature.com/" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="background: none repeat scroll 0% 0% transparent; border: 0pt none ! important;" /></a></div>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com0tag:blogger.com,1999:blog-1195669963192190726.post-52522570922470285962012-02-18T12:30:00.001-06:002012-02-18T12:34:19.799-06:00One of God's Chosen!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiDtmOYMJ_Dhogb_8lrHtlyAt-DpfgSAR37fBuGVNRbk1ETYklARcQfi2mhN03t_LJGIhptMur4q67YVSqsQv0SfvdhJI5lHUn2KRUGcTw6fhV7bf-Laio1Z9DFAlOrLmN-6WXkBz3ciM/s1600/CIMG2941.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiDtmOYMJ_Dhogb_8lrHtlyAt-DpfgSAR37fBuGVNRbk1ETYklARcQfi2mhN03t_LJGIhptMur4q67YVSqsQv0SfvdhJI5lHUn2KRUGcTw6fhV7bf-Laio1Z9DFAlOrLmN-6WXkBz3ciM/s400/CIMG2941.JPG" width="400" /></a></div><br />
<br />
Job 1:9,10 (The Message)<br />
<br />
Satan retorted, "So do you think Job does all that out of the sheer goodness of his heart? Why, no one ever had it so good! You pamper him like a pet, make sure nothing bad ever happens to him or his family or his possessions, bless everything he does—he can't lose! <br />
<br />
God hedges in His own that He may preserve them, but oftentimes they only see the wrong side of the hedge, and so misunderstand His dealings. It was so with Job (Job 3:23). Ah, but Satan knew the value of that hedge! See his testimony in chapter 1:10.<br />
Through the leaves of every trial there are chinks of light to shine through. Thorns do not prick you unless you lean against them, and not one touches without His knowledge. The words that hurt you, the letter which gave you pain, the cruel wound of your dearest friend, shortness of money–are all known to Him, who sympathizes as none else can and watches to see, if, through all, you will dare to trust Him wholly.<br />
<b>- Mrs. Charles E. Cowman -</b><br />
<br />
Trusting God is so easy in the good times, but when those hard and misunderstood times come, it isn't so easy is it? When we only see our view of the circumstances and feel the pain associated with it, it is very easy to get side tracked. As Mrs Cowman points out satan knows very well about the hedge that is around each child of God. Job certainly had lots of questions but he also knew God was protecting him and his family. His trials was a test which turned into a testimony! And so it is with us, the trials we go through will make us stronger and isn't that what the gospel is all about, a journey in which we are growing and determining to be more like Jesus? Of course it is!<br />
I don't know about you but knowing our Heavenly Father is the master planner of my life gives me such peace. It doesn't mean we won't experience pain, actually it means we will but there is a purpose. And it doesn't mean we will understand everything that happens, we won't, some things we will never know! We just have to trust and to be aware that we are one of God's Chosen! Whatever is going on in your life, I want to encourage you to not look on the wrong side of the hedge. We can be assured that nothing touches us without the knowledge of God, and then realize God's will' is exactly what we would choose if we knew what God knows." Be blessed today my special family and friends! Never give up on God!<br />
<br />
These testimonies will touch your heart at Spiritual Sundays! <br />
<a href="http://bloggerspirit.blogspot.com/2012/02/welcome-back.html">http://bloggerspirit.blogspot.com/2012/02/welcome-back.html</a><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.mylivesignature.com/" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="background: none repeat scroll 0% 0% transparent; border: 0pt none ! important;" /></a></div><b> </b><br />
<br />
<br />
<b> </b><br />
<br />
<br />
<b> </b>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com3tag:blogger.com,1999:blog-1195669963192190726.post-85756874459180943902012-02-10T13:31:00.000-06:002012-02-10T13:31:18.633-06:00Going "Through" and Moving On!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDCBwQ-kIMkHfHTCTFIXixlJlODAcV_dg4B98DjrL4tLYrnryqPQvKYXo3WSE_U3uVSK_Xr4f8rA93zNf_4jSFFh87YuNwJKLsQHI-olOM7JEHIJRRJ0_HYflETtB7aGudgFrT4ZZowdU/s1600/100_2361.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDCBwQ-kIMkHfHTCTFIXixlJlODAcV_dg4B98DjrL4tLYrnryqPQvKYXo3WSE_U3uVSK_Xr4f8rA93zNf_4jSFFh87YuNwJKLsQHI-olOM7JEHIJRRJ0_HYflETtB7aGudgFrT4ZZowdU/s400/100_2361.JPG" width="400" /></a></div><br />
<br />
Psalm 126:4-6 (The Message)<br />
<sup class="versenum" id="en-MSG-6737">4-6</sup> And now, <span style="font-variant: small-caps;">God</span>, do it again— <br />
bring rains to our drought-stricken lives <br />
So those who planted their crops in despair <br />
will shout hurrahs at the harvest, <br />
So those who went off with heavy hearts <br />
will come home laughing, with armloads of blessing. <br />
<br />
Moving on after a loss, no matter where it falls on life's scale is a huge problem and universal to all of us. We will all experience at some time in our life here on earth a roller coaster ride that will be heartbreaking. How we respond will either he helpful or hurtful and will determine if we really will "move on". And of course no one wants to deal with this until it happens, then we have no choice but to try to figure things out. It is like walking on eggshells! So many decisions have to be made and for me every day, it is asking for wisdom and guidance. I visited with a grief counselor from Hospice this week and he was very concerned not only about the death of my husband, but the fact I am also moving to another city. Grief is very real and we have to go through it, but here again is the key word "through", it is not healthy to stay there and it is not healthy to ignore and try to not deal with it. Now getting back to "through", I explained to him that I was not alone, God would be with me on this journey and I must stay focused. Bless his heart, he said he would be praying for me! lol. I do understand where he was coming from though. I know of a woman that literally went in her house and stayed there for three years! Can't do that! Definitely that approach is not healthy! It is so important to face this life one day at a time! Which is all we really have anyway! One day, one step, not borrowing from tomorrow, but following close to God. I am sure there are some reading this that either knows or will experience these life changes and I just want to encourage you that you are not alone and you will get "through" this, but you must be aware of the way you choose! The healthy way is just depending on the Lord for your direction and strength. I am praying for each one reading this post and also ask for your prayers. We need to be reminded of His mercy and grace daily!<br />
God bless you as you pass through!<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.mylivesignature.com/" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="background: none repeat scroll 0% 0% transparent; border: 0pt none ! important;" /></a></div>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com2tag:blogger.com,1999:blog-1195669963192190726.post-16554201146281921012012-02-03T12:11:00.003-06:002012-02-03T18:25:16.461-06:00Much Afraid and Her Companions!<h3 align="center"><i>“The Sovereign Lord is my strength;<br />
he makes my feet like the feet of a deer,<br />
he enables me to go on the heights.”</i><br />
- Habakkuk 3:19</h3><br />
<br />
I am reading a book that the Holy Spirit brought to my remembrance entitled "Hinds Feet on High Places". You may remember it to, it is a story, an allegory actually, of the journey Much Afraid takes from the valley of humiliation where she lives with the fear families to the mountain top with the Chief Shepherd. There her name is changed to Grace and Glory. She learns through life's lessons all about the Fathers Will and the sacrifices that were made every step of the way. She is granted powerful hinds feet after making the difficult journey and even her companions Sorrow and Suffering have their names changed to Joy and Peace. It is a wonderful account of our walk with the Lord. As I am experiencing this valley of loss, I to am learning there is nothing more important than being faithful to the Lord. What ever we go through, the key word is "through". I have to admit this fear as Much Afraid had, that it doesn't appear any good can come from this, but even more terrifying is the fact of being without the Good Shepherd's love and guidance. Surrender is of course the place where we cannot change the situation and we must trust God. So hard to do, as humans we want to always try and figure out and of course question God as to "why" and "where are you, God" As Much Afraid sings words of worship, the mist lifts around her where she can see the Shepherd standing there with her. I know He is with me even when the pain grips my very heart and soul. I am confident in this time of my life, God will not leave me or forsake me. Many things are apparent in this story, but the one that stands out to me is the fact, when we call, He will answer. If you are going through the valley of loss, my prayer for you is for your name to be changed to Grace and Glory. The journey is long and hard, but so worth the trip. We can't quit! the pain and the heartbreak will heal. These are not my words but the Words of God. I am sure as you read this you realize my precious husband entered into the presence of God on January 15. He always preached about heaven and would get so excited because he knew one day he would be there. This is the hope we all have if we have been forgiven for our sins and to be in heaven with our Lord and Savior! Joy does come in the morning (Psalm 30:5). I am praying for you as you read this that God will comfort you, and I ask for your prayers also. There are many more tears and times of sorrow, but in my weakness and because of His strength, I will and so will you make it to the mountain top. No more crippled feet that keeps us lame, but powerful Hinds feet. If you also have a chance to read this little book, please do so, you will be inspired. Although Hannah Hurnard changed later in her life from her faith in God to some very new age and even occultic practices, this amazing little book has ministered to thousands of people. Have a wonderful week ahead and walk in faith sweet friends!<br />
<br />
Please check out Spiritual Sundays, you will be inspired! <a href="http://bloggerspirit.blogspot.com/2012/02/welcome-back-again.html">http://bloggerspirit.blogspot.com/2012/02/welcome-back-again.html</a><br />
<div class="separator" style="clear: both; text-align: center;"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="background: none repeat scroll 0% 0% transparent; border: 0pt none ! important;" /></div>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com3tag:blogger.com,1999:blog-1195669963192190726.post-73839681576538403472011-12-07T20:48:00.001-06:002011-12-09T21:22:42.594-06:00Trusting God!<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEignikjFCi9GthUI2BLyTZ8-ih3NguH_JLcf6fSw594qNBWxXxPZ1AZI4m9eFWD6wynG9F3-Dqe5vUwloKx8UD65NVHqb68G3izTYfAv2KDyDlQ_gEenZYTo9jx5PmvtpWv4_aEx3LmLQo/s1600/CIMG1926.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEignikjFCi9GthUI2BLyTZ8-ih3NguH_JLcf6fSw594qNBWxXxPZ1AZI4m9eFWD6wynG9F3-Dqe5vUwloKx8UD65NVHqb68G3izTYfAv2KDyDlQ_gEenZYTo9jx5PmvtpWv4_aEx3LmLQo/s640/CIMG1926.JPG" width="480" /></a></div><br />
<br />
Please read Acts 27 and 28 of the journey that Paul experienced!<br />
<br />
"Can I trust God even when my life gets stormy? Can I trust Him even when things go unexpectedly wrong? Can I trust Him even when my situation is so discouraging that I see no way out? Will I trust Him even when things seem hopeless?" Oh my, I wonder how many times I have asked these questions and several more in the last few months! In my posts, I seem to be stuck on this subject because of all the trauma in my life. If you have been following me then you know that my sweetheart of 27 years was diagnosed with cancer in June of this year. I can't begin to fill you in on everything and there would be no need anyway. This post is about trusting God no matter what! This roller coaster ride has taken me to the very bottom where I didn't think my heart could stand the pain and then to where I would soar with hope that he would live and be healthy again. Now the ride is not over with, right now we are home with physical therapy trying to get him on his feet so that we can finish treatment. I can't tell you what the outcome will be, only God knows. But I can tell you in the last week, peace has settled in my heart. Not peace that I will be okay if the end result is not what I want, but just peace, like the roller coaster ride has smoothed out a bit. This peace that comes from knowing God is in control. We all pray for God's will and then we find our scriptures to hang on to. This is standing firm in our faith, but what if this is not God's perfect plan? Do you see where I am going? I am believing for complete healing for this man that has my heart, but what if it is time for him to go home? I truly believe that trusting God is the hardest thing to do! Oh, we are full of faith but when the storms come, I will admit to you, my faith has wavered more than once. So what do we do? I have no answers nor has anyone else had one for me. Why do bad things happen to the children of God? Still no answers! It is for me just taking one day at a time, staying in the Word and continuing to believe in God. Is it easy? Not hardly, it is the hardest thing I have ever had to do. Will all this be used for the Glory of God? The Word says it will be, and will it be worth it somehow? Well, I guess I am still out on that one. I am trying so hard not to discourage you with my words, but somehow just show you my heart and it is just being honest with you. I have experienced every kind of emotion that can be imagined in this situation, I have blamed God (yes, I said that) and questioned Him for His motives in allowing this disease. I just also have to believe that God understands, after all He made me and knows full well my weakness and frailties. So where do we go from here? As I stated before, it is one day at a time, and trying not to figure out everything, which is silly. I am praying for my unbelief, for my faith to be strengthened and I am praying no matter what happens I will be faithful. This ride we are on leads to our destination of Heaven, there to be with Jesus for ever and ever. So no matter what happens, we will stay focused on Him who never leaves or forsakes us. Him who loves us and said He would never put more on us than we can stand but would make a way of escape. "Just allow God to still the storms" ! Thank you for your prayers and letting me share with you this ride. I pray God's richest blessing on your life, and if it is a while before I pen another post, Merry Christmas. May it be the memorable ever!<br />
<br />
Check out Spiritual Sundays, link follows: you will be blessed<br />
http://bloggerspirit.blogspot.com/2011/12/welcome-back-again.html<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://www.mylivesignature.com/" style="margin-left: 1em; margin-right: 1em;" target="_blank"><img src="http://signatures.mylivesignature.com/54487/353/DBCF3A763F63EFEF1E631B231E708DB5.png" style="background: none repeat scroll 0% 0% transparent; border: 0pt none ! important;" /></a></div>Shirleyhttp://www.blogger.com/profile/15783758060848480856noreply@blogger.com9