Browse files

Added js code to bookmarklet button

Signed-off-by: Mehdi Hasan <mhasan@omicronlab.com>
  • Loading branch information...
1 parent cdec43c commit cd53010a97c9bbb2976e44da98b2457cd9edc1c7 @mugli mugli committed Nov 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 bookmarklet/index.html
View
2 bookmarklet/index.html
@@ -41,7 +41,7 @@
<li>Just drag the following button to your Bookmarks Toolbar.</li>
</ol>
<div class="cntr">
- <a class="cupid-green">Avro Phonetic</a>
+ <a class="cupid-green" href="javascript:(function(){function c(){e&&jQuery.noConflict();var a=b?document.createElementNS(b,'script'):document.createElement('script');a.type='text/javascript';a.onreadystatechange=function(){this.readyState=='complete'&&d()};a.onload=d;a.src='https://raw.github.com/torifat/jsAvroPhonetic/master/dist/avro-latest.js';f.appendChild(a)}function d(){jQuery('textarea, input[type=text]').avro({bangla:!1,notification:!0});jQuery('body').bind('DOMNodeInserted',function(a){jQuery(a.target).find('textarea, input[type=text]').avro({bangla:!1, notification:!0})});jQuery('#avro_js_loader').slideUp('slow',function(){jQuery(this).find('div').html('Use <strong>Ctrl+M</strong> to switch keyboard').parent().slideDown()});setTimeout(function(){jQuery('#avro_js_loader').slideUp('slow')},5E3)}if(typeof OmicronLab!=='undefined')d();else{var f=document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0],b=document.createElementNS&&document.documentElement.namespaceURI,a=b?document.createElementNS(b,'div'):document.createElement('div'); a.setAttribute('style','position:fixed; z-index:1000; top:0; left:0; right:0; -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .52); border-bottom: 1px solid #000');a.innerHTML='<div style='font:normal 13px sans-serif; padding:10px; background:#000; opacity:0.8; color: #fff; text-align:center;'>Loading...</div>';a.setAttribute('id','avro_js_loader');document.getElementsByTagName('body')[0].appendChild(a);var e=!1;typeof jQuery==='undefined'?(a=b?document.createElementNS(b,'script'):document.createElement('script'), a.type='text/javascript',a.onreadystatechange=function(){this.readyState=='complete'&&c()},a.onload=c,a.src='https://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.min.js',f.appendChild(a),typeof $!=='undefined'&&(e=!0)):c()}})();">Avro Phonetic</a>
</div>
</div>
</div>

0 comments on commit cd53010

Please sign in to comment.