Sha256: afbd92d99bdba64d7e6b0b1ed95a4828afb113b7ff7407d7704f7c071b0a8872
Contents?: true
Size: 776 Bytes
Versions: 1
Compression:
Stored size: 776 Bytes
Contents
/* * jQuery.gdocViewer - Embed linked documents using Google Docs Viewer * Licensed under MIT license. * Date: 2011/01/16 * * @author Jawish Hameed * @version 1.0 */ (function(a){a.fn.gdocsViewer=function(b){var c={width:"600",height:"700", security:"http"};if(b){a.extend(c,b)}return this.each(function(){var d=a(this).attr("href");var e=d.substring(d.lastIndexOf(".")+1);if(/^(tiff|pdf|ppt|pps|doc|docx)$/.test(e)){a(this).after(function(){var g=a(this).attr("id");var f=(typeof g!=="undefined"&&g!==false)?g+"-gdocsviewer":"";return'<div id="'+f+'" class="gdocsviewer"><iframe src=' + c.security + '://docs.google.com/viewer?embedded=true&url='+encodeURIComponent(d)+'" width="'+c.width+'" height="'+c.height+' style="border: none;"></iframe></div>'})}})}})(jQuery);
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
googledocviewer-1.7.0 | vendor/assets/javascripts/jquery.gdocsviewer.min.js |