Skip to content

Commit

Permalink
Fixes #284
Browse files Browse the repository at this point in the history
jQuery Ajax fails in Windows because of non-explicit JSON return type
  • Loading branch information
danielweck committed Feb 12, 2015
1 parent 5d3089a commit 2e9ccc3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
14 changes: 12 additions & 2 deletions lib/Readium.js
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ define('text',['module'], function (module) {
});


define('text!version.json',[],function () { return '{"readiumJs":{"sha":"0dc45978a2850e32bb2b3d5ff894d9ce1e306814","tag":"Release-0.10-395-g0dc4597","clean":true},"readiumSharedJs":{"sha":"1375f2de8ab214e352fb8ac863a71db150da84da","tag":"Release-0.10-474-g1375f2d","clean":true}}';});
define('text!version.json',[],function () { return '{"readiumJs":{"sha":"5351a27f2073067d24f5a37f98ced3e9c1af0abd","tag":"Release-0.10-396-g5351a27","clean":true},"readiumSharedJs":{"sha":"1375f2de8ab214e352fb8ac863a71db150da84da","tag":"Release-0.10-474-g1375f2d","clean":true}}';});

/*
This code is required to IE for console shim
Expand Down Expand Up @@ -29756,7 +29756,17 @@ define('epub-fetch/iframe_zip_loader',['URIjs'], function(URI){
// TODO: Currently using the document.write() approach only for IE, as it breaks CSS selectors
// with namespaces for some reason (e.g. the childrens-media-query sample EPUB)
iframe.contentWindow.document.open();
iframe.contentWindow.document.write(contentDocumentData);

// Currently not handled automatically by winstore-jscompat,
// so we're doing it manually. See:
// https://github.com/MSOpenTech/winstore-jscompat/
if (window.MSApp && window.MSApp.execUnsafeLocalFunction) {
window.MSApp.execUnsafeLocalFunction(function() {
iframe.contentWindow.document.write(contentDocumentData);
});
} else {
iframe.contentWindow.document.write(contentDocumentData);
}
}

iframe.onload = function () {
Expand Down
2 changes: 1 addition & 1 deletion lib/versioning/UnpackagedVersioning.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ define(['jquery', 'Readium'], function($, Readium){
versionInfo.readiumSharedJs = readiumVersion.readiumSharedJs;


$.get('package.json', function(data){
$.getJSON('package.json', function(data){
obj.version = data.version;
obj.chromeVersion = '2.' + data.version.substring(2);

Expand Down
2 changes: 1 addition & 1 deletion readium-js

0 comments on commit 2e9ccc3

Please sign in to comment.