Skip to content

Commit

Permalink
New dist files with updated Blob.js and FileSaver.js
Browse files Browse the repository at this point in the history
  • Loading branch information
diegocr committed May 30, 2014
1 parent dcbc9fc commit 75d18af
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jspdf",
"version": "1.0.145",
"version": "1.0.150",
"homepage": "https://github.com/mrrio/jspdf",
"description": "PDF Document creation from JavaScript",
"main": "dist/jspdf.min.js",
Expand Down
54 changes: 27 additions & 27 deletions dist/jspdf.debug.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @preserve
* jsPDF - PDF Document creation from JavaScript
* Version 1.0.145-git Built on 2014-05-25T12:54
* CommitID fac3703476
* Version 1.0.150-git Built on 2014-05-30T00:40
* CommitID dcbc9fcb9b
*
* Copyright (c) 2010-2014 James Hall, https://github.com/MrRio/jsPDF
* 2010 Aaron Spike, https://github.com/acspike
Expand Down Expand Up @@ -1697,7 +1697,7 @@ var jsPDF = (function(global) {
* pdfdoc.mymethod() // <- !!!!!!
*/
jsPDF.API = {events:[]};
jsPDF.version = "1.0.145-debug 2014-05-25T12:54:diegocr";
jsPDF.version = "1.0.150-debug 2014-05-30T00:40:diegocr";

if (typeof define === 'function' && define.amd) {
define(function() {
Expand Down Expand Up @@ -5257,12 +5257,12 @@ jsPDFAPI.putTotalPages = function(pageExpression) {
})(jsPDF.API);
/* Blob.js
* A Blob implementation.
* 2013-12-27
* 2014-05-27
*
* By Eli Grey, http://eligrey.com
* By Devin Samarin, https://github.com/eboyjr
* License: X11/MIT
* See LICENSE.md
* See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
*/

/*global self, unescape */
Expand All @@ -5271,12 +5271,21 @@ jsPDFAPI.putTotalPages = function(pageExpression) {

/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */

if (!(typeof Blob === "function" || typeof Blob === "object") || typeof URL === "undefined")
self.Blob = (function (view) {
(function (view) {
"use strict";

view.URL = view.URL || view.webkitURL;
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || view.MSBlobBuilder || (function(view) {

if (view.Blob && view.URL) {
try {
new Blob;
return;
} catch (e) {}
}

// Internally we use a BlobBuilder implementation to base Blob off of
// in order to support older browsers that only have BlobBuilder
var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {
var
get_class = function(object) {
return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1];
Expand Down Expand Up @@ -5407,10 +5416,13 @@ self.Blob = (function (view) {
FB_proto.toString = function() {
return "[object Blob]";
};
FB_proto.close = function() {
this.size = this.data.length = 0;
};
return FakeBlobBuilder;
}(view));

return function Blob(blobParts, options) {
view.Blob = function Blob(blobParts, options) {
var type = options ? (options.type || "") : "";
var builder = new BlobBuilder();
if (blobParts) {
Expand All @@ -5421,13 +5433,13 @@ self.Blob = (function (view) {
return builder.getBlob(type);
};
}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this));
/*! FileSaver.js
/* FileSaver.js
* A saveAs() FileSaver implementation.
* 2014-01-24
* 2014-05-27
*
* By Eli Grey, http://eligrey.com
* License: X11/MIT
* See LICENSE.md
* See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md
*/

/*global self */
Expand All @@ -5449,11 +5461,10 @@ var saveAs = saveAs
}
var
doc = view.document
// only get URL when necessary in case BlobBuilder.js hasn't overridden it yet
// only get URL when necessary in case Blob.js hasn't overridden it yet
, get_URL = function() {
return view.URL || view.webkitURL || view;
}
, URL = view.URL || view.webkitURL || view
, save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a")
, can_use_save_link = !view.externalHost && "download" in save_link
, click = function(node) {
Expand All @@ -5479,7 +5490,7 @@ var saveAs = saveAs
while (i--) {
var file = deletion_queue[i];
if (typeof file === "string") { // file is an object URL
URL.revokeObjectURL(file);
get_URL().revokeObjectURL(file);
} else { // file is a File
file.remove();
}
Expand Down Expand Up @@ -5546,20 +5557,9 @@ var saveAs = saveAs
}
if (can_use_save_link) {
object_url = get_object_url(blob);
// FF for Android has a nasty garbage collection mechanism
// that turns all objects that are not pure javascript into 'deadObject'
// this means `doc` and `save_link` are unusable and need to be recreated
// `view` is usable though:
doc = view.document;
save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a");
save_link.href = object_url;
save_link.download = name;
var event = doc.createEvent("MouseEvents");
event.initMouseEvent(
"click", true, false, view, 0, 0, 0, 0, 0
, false, false, false, false, 0, null
);
save_link.dispatchEvent(event);
click(save_link);
filesaver.readyState = filesaver.DONE;
dispatch_all();
return;
Expand Down
20 changes: 10 additions & 10 deletions dist/jspdf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion libs/Blob.js
Submodule Blob.js updated 3 files
+18 −6 Blob.js
+2 −7 LICENSE.md
+0 −7 bower.json
2 changes: 1 addition & 1 deletion libs/FileSaver.js
Submodule FileSaver.js updated 4 files
+6 −18 FileSaver.js
+1 −1 README.md
+0 −23 bower.json
+0 −21 package.json

0 comments on commit 75d18af

Please sign in to comment.