Live Sports

 

Ohlone College Radio Broadcasting Program Webcasting play-by-play action

Students from the Ohlone College Radio Broadcasting Program Webcasting play-by-play action on the Ohlone College Sports Network from Renegades games.

Listen to live sports play-by-play action as students from the Ohlone College Radio Broadcasting Program take to the Internet and bring you select Renegades Athletics games on the Ohlone College Sports Network.


Listen to live-streamed play-by-play Webcasts of select Renegades Athletics games.

 


Ohlone College Sports Network is on Mixlr

Cannot save clip

View Crash Report

Clipped to default notebook
Untitled note

Source link

Copy to clipboard

',
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': 'hidden'
}
};
})(jQuery);
// ]]>

'
+ _global__the_html.substr(_pos__start__before, (_pos__end__after - _pos__start__before))
+ '

'
;
return;
}

// add image classes
if (_tag_name == 'img')
{
_explored = (_explored || $D.getContent__exploreNodeAndGetStuff(_node, true));
if (_explored && _explored._is__unskippable); else
{
switch (true)
{
case (_explored._is__image_skip):
$D.debugOutline(_node, 'clean-after', 'skip-img');
_global__the_html = _global__the_html.substr(0, _pos__start__before);
return;

case (_explored._is__image_large):

// add float class -- for images too narrow/tall
// remove width/height -- only for large images

// http://www.wired.com/threatlevel/2011/05/gps-gallery/?pid=89&viewall=true
// http://david-smith.org/blog/2012/03/10/ios-5-dot-1-upgrade-stats/index.html
// http://www.turntablekitchen.com/2012/04/dutch-baby-with-caramelized-vanilla-bean-pears-moving-through-the-decades/

_global__the_html = ''
+ _global__the_html.substr(0, _pos__start__before)
+ '

'
+ _global__the_html.substr(_pos__start__before, (_pos__end__after - _pos__start__before)).replace(/width="([^=]+?)"/gi, '').replace(/height="([^=]+?)"/gi, '')
+ '

'
;
return;
}
}
}

// large images in links
if (_tag_name == 'a')
{
_explored = (_explored || $D.getContent__exploreNodeAndGetStuff(_node, true));
switch (true)
{
case (_explored._count__images_large == 1):
_global__the_html = ''
+ _global__the_html.substr(0, _pos__start__after-1)
+ ' class="readableLinkWithLargeImage">'
+ _global__the_html.substr(_pos__start__after, (_pos__end__before - _pos__start__after))
+ ''
;
return;

case (_explored._count__images_medium == 1):
_global__the_html = ''
+ _global__the_html.substr(0, _pos__start__after-1)
+ ' class="readableLinkWithMediumImage">'
+ _global__the_html.substr(_pos__start__after, (_pos__end__before - _pos__start__after))
+ ''
;
return;
}
}

// too much content
if ($D.parseOptions._elements_too_much_content.indexOf('|'+_tag_name+'|') > -1)
{
_explored = (_explored || $D.getContent__exploreNodeAndGetStuff(_node, true));
if (_explored && _explored._is__unskippable); else
{
switch (true)
{
case (_tag_name == 'h1' && (_explored._length__all_text > (65 * 2))):
case (_tag_name == 'h2' && (_explored._length__all_text > (65 * 2 * 3))):
case ((_tag_name.match(/^h(3|4|5|6)$/) != null) && (_explored._length__all_text > (65 * 2 * 5))):
case ((_tag_name.match(/^(b|i|em|strong)$/) != null) && (_explored._length__all_text > (65 * 5 * 5))):
$D.debugOutline(_node, 'clean-after', 'too-much-content');
_global__the_html = ''
+ _global__the_html.substr(0, _pos__start__before)
+ _global__the_html.substr(_pos__start__after, (_pos__end__before - _pos__start__after))
;
return;
}
}
}

// empty elements
switch (true)
{
case (($D.parseOptions._elements_self_closing.indexOf('|'+_tag_name+'|') > -1)):
case (($D.parseOptions._elements_ignore_tag.indexOf('|'+_tag_name+'|') > -1)):
case (_tag_name == 'td'):
break;

default:
var _contents = _global__the_html.substr(_pos__start__after, (_pos__end__before - _pos__start__after));
_contents = _contents.replace(/(
)/gi, '');
_contents = _contents.replace(/(


)/gi, '');

// for rows, clear empty cells
if (_tag_name == 'tr')
{
_contents = _contents.replace(/

]*?>/gi, '');
_contents = _contents.replace(/< \/td>/gi, '');
}

// for tables, clear empty rows
if (_tag_name == 'table')
{
_contents = _contents.replace(/

]*?>/gi, '');

_contents = _contents.replace(/< \/tr>/gi, '');

}

var _contentsLength = $D.measureText__getTextLength(_contents);

_explored = (_explored || $D.getContent__exploreNodeAndGetStuff(_node, true));
if (_explored && _explored._is__unskippable); else
{
switch (true)
{
case (_contentsLength == 0 && _tag_name == 'p'):
_global__the_html = _global__the_html.substr(0, _pos__start__before) + '

';
return;

case (_contentsLength == 0):
case ((_contentsLength < 5) && ($D.parseOptions._elements_visible.indexOf('|'+_tag_name+'|') > -1)):
$D.debugOutline(_node, 'clean-after', 'blank');
_global__the_html = _global__the_html.substr(0, _pos__start__before);
return;
}
}

break;
}

// too much missing
if ($D.parseOptions._elements_link_density.indexOf('|'+_tag_name+'|') > -1)
{
_explored = (_explored || $D.getContent__exploreNodeAndGetStuff(_node, true));
if (_explored && _explored._is__unskippable); else
{
var
_contents = _global__the_html
.substr(_pos__start__after, (_pos__end__before - _pos__start__after))
.replace(/(< ([^>]+)>)/gi, ''),
_contentsLength = $D.measureText__getTextLength(_contents),
_initialLength = 0
+ _explored._length__all_text
+ (_explored._count__images_small * 10)
+ (_explored._count__images_skip * 10)
+ (_node.getElementsByTagName('iframe').length * 10)
+ (_node.getElementsByTagName('object').length * 10)
+ (_node.getElementsByTagName('embed').length * 10)
+ (_node.getElementsByTagName('button').length * 10)
+ (_node.getElementsByTagName('input').length * 10)
+ (_node.getElementsByTagName('select').length * 10)
+ (_node.getElementsByTagName('textarea').length * 10)
;

// too much missing
switch (true)
{
case (!(_contentsLength > 0)):
case (!(_initialLength > 0)):
case (!((_contentsLength / _initialLength) < 0.5)):
case (!(($D.language == 'cjk') && (_contentsLength / _initialLength) < 0.1)): case ((_global__exploreNodeToBuildHTMLFor && ((_explored._length__plain_text / _global__exploreNodeToBuildHTMLFor._length__plain_text) > 0.25))):
case (($D.language == 'cjk') && (_global__exploreNodeToBuildHTMLFor && ((_explored._length__plain_text / _global__exploreNodeToBuildHTMLFor._length__plain_text) > 0.1))):
break;

default:
$D.debugOutline(_node, 'clean-after', 'missing-density');
_global__the_html = _global__the_html.substr(0, _pos__start__before);
return;
}
}
}

// return
return;
};

// actually do it
_recursive(_nodeToBuildHTMLFor);

// return html
return _global__the_html;
};

// build html for node }

// isolate title in html {
// =======================

$D.articleTitleMarker__start = '

';
$D.articleTitleMarker__end = '

';

$D.getContent__find__hasIsolatedTitleInHTML = function (_html)
{
return (_html.substr(0, $D.articleTitleMarker__start.length) == $D.articleTitleMarker__start);
};

$D.getContent__find__getIsolatedTitleInHTML = function (_html)
{
// is it there?
if ($D.getContent__find__hasIsolatedTitleInHTML(_html)); else { return ''; }

// regex
var
_getTitleRegex = new RegExp($D.articleTitleMarker__start + '(.*?)' + $D.articleTitleMarker__end, 'i'),
_getTitleMatch = _html.match(_getTitleRegex)
;

// match?
if (_getTitleMatch); else { return ''; }

// return
return _getTitleMatch[1];
};

$D.getContent__find__isolateTitleInHTML = function (_html, _document_title)
{
// use document title
if ($D.$document.find('body').attr($D.parseOptions._use_document_title_attribute) == $D.parseOptions._use_document_title_attribute_value)
{ return _html; }

// can't just use (h1|h2|h3|etc)
// we want to try them in a certain order

var
_heading_pregs = [
/< (h1)[^>]*?>([\s\S]+?)< \/\1>/gi,
/< (h2)[^>]*?>([\s\S]+?)< \/\1>/gi,
/< (h3|h4|h5|h6)[^>]*?>([\s\S]+?)< \/\1>/gi
],
_secondary_headings = '|h2|h3|h4|h5|h6|',
_search_document_title = ' ' + _document_title.replace(/< [^>]+?>/gi, '').replace(/\s+/gi, ' ') + ' '
;

// loop pregs
for (var i=0, _i=_heading_pregs.length; i -1)):
// will continue loop
break;

default:

// measurements
var
_heading_end_pos = _heading_pregs[i].lastIndex,
_heading_start_pos = (_heading_end_pos - _match[0].length),

_heading_type = _match[1],
_heading_text = _match[2].replace(/< \s*br[^>]*>/gi, '').replace(/[\n\r]+/gi, ''),
_heading_text_plain = _heading_text.replace(/< [^>]+?>/gi, '').replace(/\s+/gi, ' ');
_heading_length = $D.measureText__getTextLength(_heading_text_plain),
_heading_words = [],

_to_heading_text = _html.substr(0, _heading_start_pos),
_to_heading_length = $D.measureText__getTextLength(_to_heading_text.replace(/< [^>]+?>/gi, '').replace(/\s+/gi, ' '))
;

// return?
switch (true)
{
case (!(_heading_length > 5)):
case (!(_heading_length < (65 * 3))):
case (!(_to_heading_length < (65 * 3 * 2))): // will continue for loop break; case ((_secondary_headings.indexOf('|' + _heading_type + '|') > -1)):
// words in this heading
_heading_words = _heading_text_plain.split(' ');

// count words present in title
for (var j=0, _j=_heading_words.length, _matched_words=''; j -1) {
_matched_words += _heading_words[j] + ' ';
}
}

// break continues for loop
// nothing goes to switch's default

// no break?
// =========
var _no_break = false;
switch (true)
{
// if it's big enough, and it's a substring of the title, it's good
case ((_heading_length > 20) && (_search_document_title.indexOf(_heading_text_plain) > -1)):

// if it's slightly smaler, but is exactly at the begging or the end
case ((_heading_length > 10) && ((_search_document_title.indexOf(_heading_text_plain) == 1) || (_search_document_title.indexOf(_heading_text_plain) == (_search_document_title.length - 1 - _heading_text_plain.length)))):

_no_break = true;
break;
}

// break?
// ======
var _break = false;
switch (true)
{
// no break?
case (_no_break):
break;

// heading too long? -- if not h2
case ((_heading_length > ((_search_document_title.length - 2) * 2)) && (_heading_type != 'h2')):

// heading long enough?
case ((_heading_length < Math.ceil((_search_document_title.length - 2) * 0.50))):

// enough words matched?
case ((_heading_length < 25) && (_matched_words.length < Math.ceil(_heading_length * 0.75))):
case ((_heading_length < 50) && (_matched_words.length < Math.ceil(_heading_length * 0.65))):
case ((_matched_words.length < Math.ceil(_heading_length * 0.55))): _break = true; break; } // break? // ====== if (_break) { break; } default: // this is the title -- do isolation; return return '' + $D.articleTitleMarker__start + _heading_text + $D.articleTitleMarker__end + $D.getContent__find__isolateTitleInHTML__balanceDivsAtStart(_html.substr(_heading_end_pos)) ; } break; } } // return unmodified return _html; }; $D.getContent__find__isolateTitleInHTML__balanceDivsAtStart__substrCount = function (_haystack, _needle, _offset, _length) { // http://kevin.vanzonneveld.net // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + improved by: Brett Zamir (http://brett-zamir.me) // + improved by: Thomas // * example 1: substr_count('Kevin van Zonneveld', 'e'); // * returns 1: 3 // * example 2: substr_count('Kevin van Zonneveld', 'K', 1); // * returns 2: 0 // * example 3: substr_count('Kevin van Zonneveld', 'Z', 0, 10); // * returns 3: false var cnt = 0; _haystack += ''; _needle += ''; if (isNaN(_offset)) { _offset = 0; } if (isNaN(_length)) { _length = 0; } if (_needle.length == 0) { return false; } _offset--; while ((_offset = _haystack.indexOf(_needle, _offset + 1)) != -1) { if (_length > 0 && (_offset + _needle.length) > _length) {
return false;
}
cnt++;
}

return cnt;
};

$D.getContent__find__isolateTitleInHTML__balanceDivsAtStart = function (_html)
{
// easy; remove all at begining
var
_h = _html.replace(/^(\s*< \s*\/\s*[^>]+>)+/gi, ''),
_r = /< \s*\/\s*([^\s>]+?)[^>]*>/gi,
_the_end_tag = '

',
_the_start_tag = '

<div ',_end_tag_pos = -1,
_last_pos = 0
;

// remove all unbalanced _end_tags
for (var _i=0; _i<100; _i++) { _end_tag_pos = _h.indexOf(_the_end_tag, _last_pos); if (_end_tag_pos > -1); else { break; }

var
_sub = _h.substr(0, _end_tag_pos),
_start_tags = $D.getContent__find__isolateTitleInHTML__balanceDivsAtStart__substrCount(_sub, _the_start_tag, _last_pos),
_end_tags = ((_start_tags > 0) ? (1 + $D.getContent__find__isolateTitleInHTML__balanceDivsAtStart__substrCount(_sub, _the_end_tag, _last_pos)) : false)
;

if ((!(_start_tags > 0)) || (_start_tags < _end_tags)) { _h = '' + _h.substr(0, _end_tag_pos) + _h.substr(_end_tag_pos + _the_end_tag.length) ; _last_pos = _end_tag_pos; } else { _last_pos = _end_tag_pos + 1; } } $D.log(_h); return _h; }; // isolate title in html } // find in page { // ============== $D.getContent__findInPage = function (_pageWindow) { // calculations // ============ var _firstCandidate = false, _secondCandidate = false, _targetCandidate = false ; $D.debugTimerStart('ExploreAndGetStuff'); var _stuff = $D.getContent__exploreNodeAndGetStuff(_pageWindow.document.body); $D.debugRemember('ExploreAndGetStuff', $D.debugTimerEnd()+'ms'); $D.debugTimerStart('ProcessFirst'); var _processedCandidates = $D.getContent__processCandidates__first(_stuff._candidates); _firstCandidate = _processedCandidates[0]; _targetCandidate = _firstCandidate; $D.debugRemember('ProcessFirst', $D.debugTimerEnd()+'ms'); // debug if ($D.debug) { // debug first candidates $D.log('First 5 Main Candidates:'); for (var x in _processedCandidates) { if (x == 5) { break; } $D.log(_processedCandidates[x], _processedCandidates[x].__node); } // highlight first $D.debugOutline(_firstCandidate.__node, 'target', 'first'); } // in case we stop $D.debugRemember('Target', 'first'); // do second? switch (true) { case (!(_firstCandidate._count__containers > 0)):
case (!(_firstCandidate._count__candidates > 0)):
case (!(_firstCandidate._count__pieces > 0)):
case (!(_firstCandidate._count__containers > 25)):
break;

default:

$D.debugTimerStart('ProcessSecond');
var _processedCandidatesSecond = $D.getContent__processCandidates__second(_processedCandidates);
_secondCandidate = _processedCandidatesSecond[0];
$D.debugRemember('ProcessSecond', $D.debugTimerEnd()+'ms');

// they're the same
if (_firstCandidate.__node == _secondCandidate.__node) { break; }

// debug
if ($D.debug)
{
// log second candidates
$D.log('First 5 Second Candidates:');
for (var x in _processedCandidatesSecond)
{
if (x == 5) { break; }
$D.log(_processedCandidatesSecond[x], _processedCandidatesSecond[x].__node);
}

// highlight second
$D.debugOutline(_secondCandidate.__node, 'target', 'second');
}

// compute again
// =============
_firstCandidate['__points_history_final'] = $D.getContent__computePointsForCandidate__third(_firstCandidate, _firstCandidate);
_firstCandidate['__points_final'] = _firstCandidate.__points_history_final[0];

_secondCandidate['__points_history_final'] = $D.getContent__computePointsForCandidate__third(_secondCandidate, _firstCandidate);
_secondCandidate['__points_final'] = _secondCandidate.__points_history_final[0];

// log results
// ===========
if ($D.debug)
{
$D.log('The 2 Candidates:');
$D.log(_firstCandidate);
$D.log(_secondCandidate);
}

// are we selecting _second?
// =========================
switch (true)
{
case ((_secondCandidate.__candidate_details._count__lines_of_65_characters < 20) && (_secondCandidate.__points_final / _firstCandidate.__points_final) > 1):
case ((_secondCandidate.__candidate_details._count__lines_of_65_characters > 20) && (_secondCandidate.__points_final / _firstCandidate.__points_final) > 0.9):
case ((_secondCandidate.__candidate_details._count__lines_of_65_characters > 50) && (_secondCandidate.__points_final / _firstCandidate.__points_final) > 0.75):
_targetCandidate = _secondCandidate;
$D.debugRemember('Target', 'second');
break;
}

// print points
// ============
if ($D.debug)
{
$D.debugRemember('PointsFirst', _firstCandidate['__points_history_final'][0].toFixed(2));
$D.debugRemember('PointsSecond', _secondCandidate['__points_history_final'][0].toFixed(2));
}

break;
}

// highlight target
// ================
if ($D.debug)
{
$CJ(_targetCandidate.__node).css({
'box-shadow':
'inset 0px 0px 50px rgba(255, 255, 0, 0.95), 0px 0px 50px rgba(255, 255, 0, 0.95)'
});
}

// get html
// ========
$D.debugTimerStart('BuildHTML');
var _html = $D.getContent__buildHTMLForNode(_targetCandidate.__node, 'the-target');
_html = _html.substr((_html.indexOf('>')+1))
_html = _html.substr(0, _html.lastIndexOf('< '));
$D.debugRemember('BuildHTML', $D.debugTimerEnd()+'ms');

$D.debugTimerStart('BuildHTMLPregs');
_html = _html.replace(/<(blockquote|div|p|td|li)([^>]*)>(\s*
)+/gi, '< $1$2>');
_html = _html.replace(/(
\s*)+< \/(blockquote|div|p|td|li)>/gi, '');
_html = _html.replace(/(
\s*)+< (blockquote|div|h\d|ol|p|table|ul|li)([^>]*)>/gi, '< $2$3>');
_html = _html.replace(/< \/(blockquote|div|h\d|ol|p|table|ul|li)>(\s*
)+/gi, '');
_html = _html.replace(/(


\s*


\s*)+/gi, '


');
_html = _html.replace(/(
\s*
\s*)+/gi, '

');
$D.debugRemember('BuildHTMLPregs', $D.debugTimerEnd()+'ms');

// return
// ======
return {
'_html': _html,
'_links': _stuff._links,
'_targetCandidate': _targetCandidate,
'_firstCandidate': _firstCandidate
};
};

// find in page }

// start {
// =======

$D.start = function ()
{
// get content
// ===========
var
_found = $D.getContent__findInPage($D.window),
_found_links = _found._links,
_targetNode = _found._targetCandidate.__node,
_$targetNode = $CJ(_targetNode),
_aboveNodes = []
;

// RTL
// ===
switch (true)
{
case (_$targetNode.attr('dir') == 'rtl'):
case (_$targetNode.css('direction') == 'rtl'):
$D.makeRTL();
break;
}

// get html
// ========
var
_foundHTML = _found._html,
_firstFragmentBeforeProcessing = $D.nextPage__getFirstFragment(_foundHTML),
_documentTitle = ($D.document.title > '' ? $D.document.title : '')
;

// get title
// =========

// has title already?
_foundHTML = $D.getContent__find__isolateTitleInHTML(_foundHTML, _documentTitle);
$D.articleTitle = $D.getContent__find__getIsolatedTitleInHTML(_foundHTML);
$D.debugRemember('TitleSource', 'target');

// get html above?
if ($D.articleTitle > ''); else
{
// get html above target?
// ======================

// global vars:
// _found
// _foundHTML
// _documentTitle
// _aboveNodes

var
_prevNode = _found._targetCandidate.__node,
_prevHTML = '',
_aboveHTML = '',
_differentTargets = (_found._firstCandidate.__node != _found._targetCandidate.__node)
;

(function ()
{

while (true)
{
// the end?
switch (true)
{
case (_prevNode.tagName && (_prevNode.tagName.toLowerCase() == 'body')):
case (_differentTargets && (_prevNode == _found._firstCandidate.__node)):
// enough is enough
return;
}

// up or sideways?
if (_prevNode.previousSibling); else
{
_prevNode = _prevNode.parentNode;
continue;
}

// previous
_prevNode = _prevNode.previousSibling;

// outline -- element might be re-outlined, when buildHTML is invoked
if ($D.debug) { $D.debugOutline(_prevNode, 'target', 'add-above'); }

// get html; add
_prevHTML = $D.getContent__buildHTMLForNode(_prevNode, 'above-the-target');
_aboveHTML = _prevHTML + _aboveHTML;
_aboveNodes.unshift(_prevNode);

// isolate title
_aboveHTML = $D.getContent__find__isolateTitleInHTML(_aboveHTML, _documentTitle);

// finished?
switch (true)
{
case ($D.measureText__getTextLength(_aboveHTML.replace(/< [^>]+?>/gi, '').replace(/\s+/gi, ' ')) > (65 * 3 * 3)):
case ($D.getContent__find__hasIsolatedTitleInHTML(_aboveHTML)):
return;
}
}

})();

// is what we found any good?
// ==========================
switch (true)
{
case ($D.getContent__find__hasIsolatedTitleInHTML(_aboveHTML)):
case (_differentTargets && (_aboveHTML.split('<a ').length < 3) && ($D.measureText__getTextLength(_aboveHTML.replace(/<[^>]+?>/gi, '').replace(/\s+/gi, ' ')) < (65 * 3))): _foundHTML = _aboveHTML + _foundHTML; break; default: _aboveHTML = ''; _aboveNodes = []; break; } // set title // ========= $D.articleTitle = $D.getContent__find__getIsolatedTitleInHTML(_foundHTML); $D.debugRemember('TitleSource', 'above_HTML'); // get document title? if ($D.articleTitle > ''); else
{
// if all else failed, get document title
// ======================================

// global vars:
// _foundHTML
// _documentTitle

(function ()
{
// return?
// =======
if (_documentTitle > ''); else { return; }

// vars
var
_doc_title_parts = [],
_doc_title_pregs =
[
/( [-][-] |( [-] )|( [>][>] )|( [< ][<] )|( [|] )|( [\/] ))/i,
/(([:] ))/i
]
;

// loop through pregs
// ==================
for (var i=0, _i=_doc_title_pregs.length; i<_i; i++) { // split _doc_title_parts = _documentTitle.split(_doc_title_pregs[i]); // break if we managed a split if (_doc_title_parts.length > 1) { break; }
}

// sort title parts -- longer goes higher up -- i.e. towards 0
// ================
_doc_title_parts.sort(function (a, b)
{
switch (true)
{
case (a.length > b.length): return -1;
case (a.length < b.length): return 1; default: return 0; } }); // set title -- first part, if more than one word; otherwise, whole // ========= _foundHTML = '' + $D.articleTitleMarker__start + (_doc_title_parts[0].split(/\s+/i).length > 1 ? _doc_title_parts[0] : _documentTitle)
+ $D.articleTitleMarker__end
+ _foundHTML
;

})();

// set title
// =========

$D.articleTitle = $D.getContent__find__getIsolatedTitleInHTML(_foundHTML);
$D.debugRemember('TitleSource', 'document_title');
}
}

// remember
// ========
$D.debugRemember('theTarget', _found._targetCandidate.__node);
$D.debugRemember('firstCandidate', _found._firstCandidate.__node);

// result
// ======

$D.nextPage__firstFragment__firstPage = _firstFragmentBeforeProcessing;
$D.nextPage__firstFragment__lastPage = $D.nextPage__getFirstFragment(_foundHTML);
$D.nextPage__firstLinks = _found_links;

var
_result = {
'_html': _foundHTML,
'_title': $D.articleTitle,
'_rtl': $D.rtl
}
;

// add elements
_result['_elements'] = _aboveNodes;
_result['_elements'].push(_found._targetCandidate.__node);

// return
// ======
$D.callbacks.finished(_result);
};

// start }

// return self
// ===========
return $D;
}
// ]]>

'
+ '

'
+ '

'

+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
+ '

'
;
_iframeElement.setAttribute('id', _frame_id);

// css
// ===

if ($R.settings.onCreateFrameDoNotInsertCSS); else
{
var
_cssElement = $R.document.createElement('style'),
_cssText = ''
+ '#'+_frame_id+' { '
+ 'margin: 0; padding: 0; border: none; '
+ 'position: absolute; '
+ 'width: 10px; height: 10px; '
+ 'top: -100px; left: -100px; '
+ '} '
;
_cssElement.setAttribute('id', _frame_id + '__css');
_cssElement.setAttribute('type', 'text/css');
if (_cssElement.styleSheet) { _cssElement.styleSheet.cssText = _cssText; }
else { _cssElement.appendChild($R.document.createTextNode(_cssText)); }
}

// write
// =====

var _body = $R.document.getElementsByTagName('body')[0];
/* css */ if (_cssElement) { _body.appendChild(_cssElement); }
/* frame */ _body.appendChild(_iframeElement);

var _iframe = $R.document.getElementById(_frame_id);
var _doc;
_iframe.innerHTML = _iframeHTML;

// callback & variables
// ====================
var _check_interval = false;
var _check = function ()
{
// iframe
var _iframe = $R.document.getElementById(_frame_id);
if (_iframe); else { return; }

// body
var _body = $CJ(_iframe).find('#bodyContent')[0];

if (_body); else { return; }

// clear interval
$R.window.clearInterval(_check_interval);

// global vars
$R.iframe = _iframe;
$R.$iframe = $CJ($R.iframe);

$R.iframeDocument = _iframe;
$R.$iframeDocument = $CJ($R.iframeDocument);

$R.iframeWindow = _iframe;
$R.$iframeWindow = $CJ($R.iframeWindow);

$R.$iframeBox = $R.$iframeDocument.find('#box');
$R.$iframePages = $R.$iframeDocument.find('#pages');
$R.$iframeBackground = $R.$iframeDocument.find('#background');
$R.$iframeFootnotedLinks = $R.$iframeDocument.find('#footnotedLinks');

// callback
if ($R.callbacks.frameCreated) { $R.callbacks.frameCreated(); }
};

// set interval
_check_interval = $R.window.setInterval(_check, 250);
};

// create frame }

// add page {
// ==========

$R.addNewPage = function (_pageHTML, _pageURL)
{
// update page count
// =================
var _pageNr = $R.pagesCount + 1;
$R.pagesCount++;

// separator
// =========
if (_pageNr > 1)
{
$R.$iframePages.append(''
+ '

'
+ '

'
+ '

'+$R.settings.pageLabel+_pageNr+'

'
+ '

'
);
}

// append page
// ===========
$R.$iframePages.append(''
+ '

'
+ '

'
+ _pageHTML
+ '

'
+ '

'
);

// this new page
// =============

// cache
var _$page = $R.$iframeDocument.find('#page'+_pageNr);

// links as footnotes
_$page.find('a').each(function (_index, _element)
{
// check
var _href = _element.href;
if (_href > ''); else { return; }
if (_href.indexOf); else { return; }
if (_href.indexOf('#') > -1) { return; }

// count
var _nr = ++$R.footnotedLinksCount;

// add
$CJ(_element).append(' ['+_nr+']');
$R.$iframeFootnotedLinks.append('

  • '+_href+'

');
});
};

// add page }

// clear all pages {
// =================

$R.clearAllPages = function ()
{
// reset pages count
$R.pagesCount = 0;

// delete all pages
$R.$iframePages.get(0).innerHTML = '';

// reset footnote count
$R.footnotedLinksCount = 0;

// delete all footnotes
$R.$iframeFootnotedLinks.get(0).innerHTML = '';
};

// clear all pages }

// return self
// ===========
return $R;
}
// ]]>

' + titleAttr + '

';
var hrDiv = '

 

';

Evernote.pageInfo.getBiggestImage(function(data) {
if (data && data.src) {
var im = '';
imgDiv = '

' + im + '

';
contentStyle = contentStyle.replace('max-width:370px','max-width:562px');
}
});

var link = '' + urlStr + '';
var favicon = '

 

';
var linkDiv = '

' ;
var snipDiv = '

' + snip + '

';
var contDiv = '

' + linkDiv + snipDiv + '

';
var clearDiv = '

'

var content = '

' + titleDiv + hrDiv + imgDiv + contDiv + clearDiv + '

';
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";
};
})();
// ]]>

Exit mobile version