summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/_inc/build/after-the-deadline/jquery.atd.min.js')
-rw-r--r--plugins/jetpack/_inc/build/after-the-deadline/jquery.atd.min.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/jetpack/_inc/build/after-the-deadline/jquery.atd.min.js b/plugins/jetpack/_inc/build/after-the-deadline/jquery.atd.min.js
index 6f6c86e9..eb87f0f4 100644
--- a/plugins/jetpack/_inc/build/after-the-deadline/jquery.atd.min.js
+++ b/plugins/jetpack/_inc/build/after-the-deadline/jquery.atd.min.js
@@ -14,4 +14,4 @@
* Project : http://jquery-spellchecker.googlecode.com
* Contact : willis.rh@gmail.com
*/
-var AtD={rpc:"",rpc_css:"http://www.polishmywriting.com/atd-jquery/server/proxycss.php?data=",rpc_css_lang:"en",api_key:"",i18n:{},listener:{}};AtD.getLang=function(e,t){return window.AtD_l10n_r0ar&&window.AtD_l10n_r0ar[e]||t},AtD.addI18n=function(e){window.AtD_l10n_r0ar=e},AtD.setIgnoreStrings=function(e){AtD.core.setIgnoreStrings(e)},AtD.showTypes=function(e){AtD.core.showTypes(e)},AtD.checkCrossAJAX=function(e,t){"undefined"!=typeof AtD_proofread_click_count&&AtD_proofread_click_count++,AtD.callback_f=t,AtD.remove(e);var r=jQuery("#"+e),a=jQuery.trim(r.html());if(a=a.replace(/\&lt;/g,"<").replace(/\&gt;/g,">").replace(/\&amp;/g,"&"),a=encodeURIComponent(a.replace(/\%/g,"%25")),a.length>2e3&&"Microsoft Internet Explorer"===navigator.appName||a.length>7800)return void(void 0!==t&&void 0!==t.error&&t.error("Maximum text length for this browser exceeded"));CSSHttpRequest.get(AtD.rpc_css+a+"&lang="+AtD.rpc_css_lang+"&nocache="+(new Date).getTime(),function(t){var r;if("Microsoft Internet Explorer"===navigator.appName?(r=new ActiveXObject("Microsoft.XMLDOM"),r.async=!1,r.loadXML(t)):r=(new DOMParser).parseFromString(t,"text/xml"),AtD.core.hasErrorMessage(r))return void(void 0!==AtD.callback_f&&void 0!==AtD.callback_f.error&&AtD.callback_f.error(AtD.core.getErrorMessage(r)));AtD.container=e;var a=Number(AtD.processXML(e,r));void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ready&&AtD.callback_f.ready(a),0===a&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(a),AtD.counter=a,AtD.count=a})},AtD.check=function(e,t){"undefined"!=typeof AtD_proofread_click_count&&AtD_proofread_click_count++,AtD.callback_f=t,AtD.remove(e);var r=jQuery("#"+e),a=jQuery.trim(r.html());a=a.replace(/\&lt;/g,"<").replace(/\&gt;/g,">").replace(/\&amp;/g,"&"),a=encodeURIComponent(a),jQuery.ajax({type:"POST",url:AtD.rpc+"/checkDocument",data:"key="+AtD.api_key+"&data="+a,format:"raw",dataType:jQuery.browser.msie?"text":"xml",error:function(e,t,r){void 0!==AtD.callback_f&&void 0!==AtD.callback_f.error&&AtD.callback_f.error(t+": "+r)},success:function(t){var r;if("string"==typeof t?(r=new ActiveXObject("Microsoft.XMLDOM"),r.async=!1,r.loadXML(t)):r=t,AtD.core.hasErrorMessage(r))return void(void 0!==AtD.callback_f&&void 0!==AtD.callback_f.error&&AtD.callback_f.error(AtD.core.getErrorMessage(r)));AtD.container=e;var a=Number(AtD.processXML(e,r));void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ready&&AtD.callback_f.ready(a),0===a&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(a),AtD.counter=a,AtD.count=a}})},AtD.remove=function(e){AtD._removeWords(e,null)},AtD.clickListener=function(e){AtD.core.isMarkedNode(e.target)&&AtD.suggest(e.target)},AtD.processXML=function(e,t){var r=AtD.core.processXML(t);return r.count>0&&(r.count=AtD.core.markMyWords(jQuery("#"+e).contents(),r.errors)),jQuery("#"+e).unbind("click",AtD.clickListener),jQuery("#"+e).click(AtD.clickListener),r.count},AtD.useSuggestion=function(e){this.core.applySuggestion(AtD.errorElement,e),0===--AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count)},AtD.editSelection=function(){var e=AtD.errorElement.parent();void 0!==AtD.callback_f&&void 0!==AtD.callback_f.editSelection&&AtD.callback_f.editSelection(AtD.errorElement),AtD.errorElement.parent()!==e&&0===--AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count)},AtD.ignoreSuggestion=function(){AtD.core.removeParent(AtD.errorElement),0===--AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count)},AtD.ignoreAll=function(e){var t=AtD.errorElement.text(),r=AtD._removeWords(e,t);AtD.counter-=r,0===AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count),void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ignore&&(AtD.callback_f.ignore(t),AtD.core.setIgnoreStrings(t))},AtD.explainError=function(){void 0!==AtD.callback_f&&void 0!==AtD.callback_f.explain&&AtD.callback_f.explain(AtD.explainURL)},AtD.suggest=function(e){var t;0===jQuery("#suggestmenu").length?(t=jQuery('<div id="suggestmenu"></div>'),t.prependTo("body")):(t=jQuery("#suggestmenu"),t.hide());var r=AtD.core.findSuggestion(e);if(AtD.errorElement=jQuery(e),t.empty(),void 0===r)t.append("<strong>"+AtD.getLang("menu_title_no_suggestions","No suggestions")+"</strong>");else if(0===r.suggestions.length)t.append("<strong>"+r.description+"</strong>");else{t.append("<strong>"+r.description+"</strong>");for(var a=0;a<r.suggestions.length;a++)!function(e){t.append("<a href=\"javascript:AtD.useSuggestion('"+e.replace(/'/,"\\'")+"')\">"+e+"</a>")}(r.suggestions[a])}void 0!==AtD.callback_f&&void 0!==AtD.callback_f.explain&&void 0!==r.moreinfo&&(t.append('<a href="javascript:AtD.explainError()" class="spell_sep_top">'+AtD.getLang("menu_option_explain","Explain...")+"</a>"),AtD.explainURL=r.moreinfo),t.append('<a href="javascript:AtD.ignoreSuggestion()" class="spell_sep_top">'+AtD.getLang("menu_option_ignore_once","Ignore suggestion")+"</a>"),void 0!==AtD.callback_f&&void 0!==AtD.callback_f.editSelection?(void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ignore?t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+"')\">"+AtD.getLang("menu_option_ignore_always","Ignore always")+"</a>"):t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+"')\">"+AtD.getLang("menu_option_ignore_all","Ignore all")+"</a>"),t.append("<a href=\"javascript:AtD.editSelection('"+AtD.container+'\')" class="spell_sep_bottom spell_sep_top">'+AtD.getLang("menu_option_edit_selection","Edit Selection...")+"</a>")):void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ignore?t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+'\')" class="spell_sep_bottom">'+AtD.getLang("menu_option_ignore_always","Ignore always")+"</a>"):t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+'\')" class="spell_sep_bottom">'+AtD.getLang("menu_option_ignore_all","Ignore all")+"</a>");var c=jQuery(e).offset(),n=jQuery(e).width();n>100&&(n=50),jQuery(t).css({left:c.left+n+"px",top:c.top+"px"}),jQuery(t).fadeIn(200),AtD.suggestShow=!0,setTimeout(function(){jQuery("body").bind("click",function(){AtD.suggestShow||jQuery("#suggestmenu").fadeOut(200)})},1),setTimeout(function(){AtD.suggestShow=!1},2)},AtD._removeWords=function(e,t){return this.core.removeWords(jQuery("#"+e),t)},AtD.initCoreModule=function(){var e=new AtDCore;return e.hasClass=function(e,t){return jQuery(e).hasClass(t)},e.map=jQuery.map,e.contents=function(e){return jQuery(e).contents()},e.replaceWith=function(e,t){return jQuery(e).replaceWith(t)},e.findSpans=function(e){return jQuery.makeArray(e.find("span"))},e.create=function(t){t=t.replace(/\&/g,"&amp;"),t=t.replace(/</g,"&lt;").replace(/\>/g,"&gt;");var r,a=t.match(/\&lt;span class="hidden\w+?" pre="[^"]*"\&gt;.*?\&lt;\/span\&gt;/g);if(a)for(r=0;r<a.length;r++)t=t.replace(a[r],a[r].replace(/\&lt;/gi,"<").replace(/\&gt;/gi,">"));if(e.isIE()&&(a=t.match(/\&lt;span class="mceItemHidden"\&gt;\&amp;nbsp;\&lt;\/span&gt;/g,t)))for(r=0;r<a.length;r++)t=t.replace(a[r],a[r].replace(/\&lt;/gi,"<").replace(/\&gt;/gi,">").replace(/\&amp;/gi,"&"));var c=jQuery('<span class="mceItemHidden"></span>');return c.html(t),c},e.remove=function(e){return jQuery(e).remove()},e.removeParent=function(e){return jQuery(e).unwrap?jQuery(e).contents().unwrap():jQuery(e).replaceWith(jQuery(e).html())},e.getAttrib=function(e,t){return jQuery(e).attr(t)},e},AtD.core=AtD.initCoreModule(); \ No newline at end of file
+var AtD={rpc:"",rpc_css:"http://www.polishmywriting.com/atd-jquery/server/proxycss.php?data=",rpc_css_lang:"en",api_key:"",i18n:{},listener:{},getLang:function(e,t){return window.AtD_l10n_r0ar&&window.AtD_l10n_r0ar[e]||t},addI18n:function(e){window.AtD_l10n_r0ar=e},setIgnoreStrings:function(e){AtD.core.setIgnoreStrings(e)},showTypes:function(e){AtD.core.showTypes(e)},checkCrossAJAX:function(e,t){"undefined"!=typeof AtD_proofread_click_count&&AtD_proofread_click_count++,AtD.callback_f=t,AtD.remove(e);var r=jQuery("#"+e),a=jQuery.trim(r.html());a=a.replace(/\&lt;/g,"<").replace(/\&gt;/g,">").replace(/\&amp;/g,"&"),(a=encodeURIComponent(a.replace(/\%/g,"%25"))).length>2e3&&"Microsoft Internet Explorer"===navigator.appName||a.length>7800?void 0!==t&&void 0!==t.error&&t.error("Maximum text length for this browser exceeded"):CSSHttpRequest.get(AtD.rpc_css+a+"&lang="+AtD.rpc_css_lang+"&nocache="+(new Date).getTime(),function(t){var r;if("Microsoft Internet Explorer"===navigator.appName?((r=new ActiveXObject("Microsoft.XMLDOM")).async=!1,r.loadXML(t)):r=(new DOMParser).parseFromString(t,"text/xml"),AtD.core.hasErrorMessage(r))void 0!==AtD.callback_f&&void 0!==AtD.callback_f.error&&AtD.callback_f.error(AtD.core.getErrorMessage(r));else{AtD.container=e;var a=Number(AtD.processXML(e,r));void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ready&&AtD.callback_f.ready(a),0===a&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(a),AtD.counter=a,AtD.count=a}})},check:function(e,t){"undefined"!=typeof AtD_proofread_click_count&&AtD_proofread_click_count++,AtD.callback_f=t,AtD.remove(e);var r=jQuery("#"+e),a=jQuery.trim(r.html());a=a.replace(/\&lt;/g,"<").replace(/\&gt;/g,">").replace(/\&amp;/g,"&"),a=encodeURIComponent(a),jQuery.ajax({type:"POST",url:AtD.rpc+"/checkDocument",data:"key="+AtD.api_key+"&data="+a,format:"raw",dataType:jQuery.browser.msie?"text":"xml",error:function(e,t,r){void 0!==AtD.callback_f&&void 0!==AtD.callback_f.error&&AtD.callback_f.error(t+": "+r)},success:function(t){var r;if("string"==typeof t?((r=new ActiveXObject("Microsoft.XMLDOM")).async=!1,r.loadXML(t)):r=t,AtD.core.hasErrorMessage(r))void 0!==AtD.callback_f&&void 0!==AtD.callback_f.error&&AtD.callback_f.error(AtD.core.getErrorMessage(r));else{AtD.container=e;var a=Number(AtD.processXML(e,r));void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ready&&AtD.callback_f.ready(a),0===a&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(a),AtD.counter=a,AtD.count=a}}})},remove:function(e){AtD._removeWords(e,null)},clickListener:function(e){AtD.core.isMarkedNode(e.target)&&AtD.suggest(e.target)},processXML:function(e,t){var r=AtD.core.processXML(t);return r.count>0&&(r.count=AtD.core.markMyWords(jQuery("#"+e).contents(),r.errors)),jQuery("#"+e).unbind("click",AtD.clickListener),jQuery("#"+e).click(AtD.clickListener),r.count},useSuggestion:function(e){this.core.applySuggestion(AtD.errorElement,e),AtD.counter--,0===AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count)},editSelection:function(){var e=AtD.errorElement.parent();void 0!==AtD.callback_f&&void 0!==AtD.callback_f.editSelection&&AtD.callback_f.editSelection(AtD.errorElement),AtD.errorElement.parent()!==e&&(AtD.counter--,0===AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count))},ignoreSuggestion:function(){AtD.core.removeParent(AtD.errorElement),AtD.counter--,0===AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count)},ignoreAll:function(e){var t=AtD.errorElement.text(),r=AtD._removeWords(e,t);AtD.counter-=r,0===AtD.counter&&void 0!==AtD.callback_f&&void 0!==AtD.callback_f.success&&AtD.callback_f.success(AtD.count),void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ignore&&(AtD.callback_f.ignore(t),AtD.core.setIgnoreStrings(t))},explainError:function(){void 0!==AtD.callback_f&&void 0!==AtD.callback_f.explain&&AtD.callback_f.explain(AtD.explainURL)},suggest:function(e){var t;0===jQuery("#suggestmenu").length?(t=jQuery('<div id="suggestmenu"></div>')).prependTo("body"):(t=jQuery("#suggestmenu")).hide();var r,a=AtD.core.findSuggestion(e);if(AtD.errorElement=jQuery(e),t.empty(),void 0===a)t.append("<strong>"+AtD.getLang("menu_title_no_suggestions","No suggestions")+"</strong>");else if(0===a.suggestions.length)t.append("<strong>"+a.description+"</strong>");else{t.append("<strong>"+a.description+"</strong>");for(var c=0;c<a.suggestions.length;c++)r=a.suggestions[c],t.append("<a href=\"javascript:AtD.useSuggestion('"+r.replace(/'/,"\\'")+"')\">"+r+"</a>")}void 0!==AtD.callback_f&&void 0!==AtD.callback_f.explain&&void 0!==a.moreinfo&&(t.append('<a href="javascript:AtD.explainError()" class="spell_sep_top">'+AtD.getLang("menu_option_explain","Explain...")+"</a>"),AtD.explainURL=a.moreinfo),t.append('<a href="javascript:AtD.ignoreSuggestion()" class="spell_sep_top">'+AtD.getLang("menu_option_ignore_once","Ignore suggestion")+"</a>"),void 0!==AtD.callback_f&&void 0!==AtD.callback_f.editSelection?(void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ignore?t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+"')\">"+AtD.getLang("menu_option_ignore_always","Ignore always")+"</a>"):t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+"')\">"+AtD.getLang("menu_option_ignore_all","Ignore all")+"</a>"),t.append("<a href=\"javascript:AtD.editSelection('"+AtD.container+'\')" class="spell_sep_bottom spell_sep_top">'+AtD.getLang("menu_option_edit_selection","Edit Selection...")+"</a>")):void 0!==AtD.callback_f&&void 0!==AtD.callback_f.ignore?t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+'\')" class="spell_sep_bottom">'+AtD.getLang("menu_option_ignore_always","Ignore always")+"</a>"):t.append("<a href=\"javascript:AtD.ignoreAll('"+AtD.container+'\')" class="spell_sep_bottom">'+AtD.getLang("menu_option_ignore_all","Ignore all")+"</a>");var n=jQuery(e).offset(),o=jQuery(e).width();o>100&&(o=50),jQuery(t).css({left:n.left+o+"px",top:n.top+"px"}),jQuery(t).fadeIn(200),AtD.suggestShow=!0,setTimeout(function(){jQuery("body").bind("click",function(){AtD.suggestShow||jQuery("#suggestmenu").fadeOut(200)})},1),setTimeout(function(){AtD.suggestShow=!1},2)},_removeWords:function(e,t){return this.core.removeWords(jQuery("#"+e),t)},initCoreModule:function(){var e=new AtDCore;return e.hasClass=function(e,t){return jQuery(e).hasClass(t)},e.map=jQuery.map,e.contents=function(e){return jQuery(e).contents()},e.replaceWith=function(e,t){return jQuery(e).replaceWith(t)},e.findSpans=function(e){return jQuery.makeArray(e.find("span"))},e.create=function(t){var r,a=(t=(t=t.replace(/\&/g,"&amp;")).replace(/</g,"&lt;").replace(/\>/g,"&gt;")).match(/\&lt;span class="hidden\w+?" pre="[^"]*"\&gt;.*?\&lt;\/span\&gt;/g);if(a)for(r=0;r<a.length;r++)t=t.replace(a[r],a[r].replace(/\&lt;/gi,"<").replace(/\&gt;/gi,">"));if(e.isIE()&&(a=t.match(/\&lt;span class="mceItemHidden"\&gt;\&amp;nbsp;\&lt;\/span&gt;/g,t)))for(r=0;r<a.length;r++)t=t.replace(a[r],a[r].replace(/\&lt;/gi,"<").replace(/\&gt;/gi,">").replace(/\&amp;/gi,"&"));var c=jQuery('<span class="mceItemHidden"></span>');return c.html(t),c},e.remove=function(e){return jQuery(e).remove()},e.removeParent=function(e){return jQuery(e).unwrap?jQuery(e).contents().unwrap():jQuery(e).replaceWith(jQuery(e).html())},e.getAttrib=function(e,t){return jQuery(e).attr(t)},e}};AtD.core=AtD.initCoreModule(); \ No newline at end of file