mossroy
9b909c5a6b
Separate DOM-related utility functions (used only by the UI) from the other ones.
...
Suggested by peter-x in #162
2016-01-16 15:26:23 +01:00
mossroy
0498cfa324
Merge branch 'master' into issue161-remove-base64-images-to-reduce-memory-consumption
...
Conflicts:
www/js/app.js
2016-01-16 15:05:02 +01:00
Mossroy
f6ea93903a
Merge pull request #160 from kiwix/issue124-title-search-with-case-variants
...
On title search, try some upper/lower case variants.
2016-01-16 14:46:46 +01:00
mossroy
a1e581ff99
Improvements in case variants for title search.
...
Based on the suggestions of peter-x in #160
The code is more readable, and should be a bit faster.
2016-01-16 14:44:09 +01:00
Mossroy
9209b3277b
Merge pull request #157 from kiwix/absolute-URLs-compatibility
...
Compatibility with absolute URLs (from a ZIM) in jQuery mode.
2016-01-16 13:58:25 +01:00
mossroy
e9b4b12053
Merge branch 'master' into absolute-URLs-compatibility
...
Conflicts:
www/js/app.js
2016-01-16 13:56:46 +01:00
mossroy
6752539430
Improvements on regexp usage, for comments on #157 .
...
+ more information in case of error
2016-01-16 13:54:20 +01:00
Mossroy
1e61bcb80f
Merge pull request #153 from kiwix/only-articles-in-title-search
...
Modify the ZIM backend, so that findTitlesWithPrefix only returns articles
2016-01-11 16:39:46 +01:00
mossroy
8f884b0480
Merge branch 'fix-uriencoding-of-dependencies'
...
Conflicts:
www/js/app.js
2016-01-11 16:37:29 +01:00
Mossroy
ae9cee8af8
Merge pull request #148 from kiwix/unit-tests-improvements
...
Unit tests improvements, and add a unit test on a javascript content.
2016-01-11 16:28:50 +01:00
Mossroy
2855eed4b1
Merge pull request #146 from kiwix/issue144-css-on-mobile
...
Make CSS dependencies work on Firefox OS devices.
2016-01-11 16:28:28 +01:00
mossroy
428a67c410
Fix big memory overhead due to Base64 encoding of images in src attribute, in jQuery mode
...
Fixes #161 .
Each image is now converted to a Blob with a URL that is used by the img tag.
I applied the same thing for math images (Evopedia archives)
2016-01-09 17:49:39 +01:00
mossroy
8cf42f8140
On title search, try some upper/lower case variants.
...
Fixes #124
2016-01-09 15:13:31 +01:00
mossroy
f574e053fe
Compatibility with absolute URLs (from a ZIM) in jQuery mode.
...
For example for wikipedia_fr_all_09_2012.zim
2016-01-08 20:21:52 +01:00
mossroy
0586176312
Fix a bug when the prefix was exactly a title of an article.
...
In this case, the article did not show up in the search results.
Now it does.
2016-01-08 17:14:35 +01:00
mossroy
fb21691f5e
Modify the ZIM backend, so that findTitlesWithPrefix only returns articles.
...
And not other types of contents (javascript etc).
Fixes #151
2016-01-08 17:07:53 +01:00
mossroy
1ba4e55350
Change the javascript content searched in the unit test.
...
So that to search for a content that really exists in the ZIM file ;-)
2016-01-08 16:59:43 +01:00
mossroy
f47523836d
Decode URI encoding for dependencies (images, JS, CSS etc).
...
It's necessary for some of them that have special characters in it.
2016-01-08 14:58:26 +01:00
mossroy
6d01835edb
Improvement for #144 : escape the CSS content (for the jQuery mode).
...
In case there would be HTML tags in it
2016-01-08 14:08:14 +01:00
mossroy
ad1fb6c8fd
Unit tests improvements, and add a unit test on a javascript content.
...
+ minor error handling improvements in app.js
2016-01-08 13:34:12 +01:00
mossroy
6f444b80f5
Make CSS dependencies work on Firefox OS devices.
...
Fixes #144
2016-01-08 12:12:28 +01:00
Mossroy
21ce7b14d3
Merge pull request #142 from mossroy/jquery-fallback
...
JQuery fallback and injection of stylesheets
2016-01-07 20:35:57 +01:00
mossroy
bf69bbc0b8
Minor improvement in code readability
2016-01-07 20:29:18 +01:00
mossroy
d8678e3a83
Enable CSS stylesheets read from the backend. #115
...
It works both in jQuery and ServiceWorker modes.
But, for now, in jQuery mode, it freezes the UI on Firefox OS.
The javascript content is still not available for now.
2016-01-07 20:18:16 +01:00
mossroy
6b9f70f300
Fix for images, to reflect the need of the namespace to read in the ZIM backend.
2016-01-07 19:03:48 +01:00
mossroy
71b1b2a9b5
Fix to reflect the need of the namespace to read in the ZIM backend.
2016-01-07 18:39:07 +01:00
mossroy
4ccdee6324
Merge branch 'master' into jquery-fallback
2016-01-07 18:06:11 +01:00
mossroy
6e7383c72c
Fix the unit tests on evopedia entries. See #140
2016-01-07 18:05:48 +01:00
Mossroy
704f1dae75
Merge pull request #140 from peter-x/pathfix
...
Fix for finding some files in ZIM.
2016-01-07 18:04:07 +01:00
mossroy
799dc281be
Handle the default namespace for articles, in the ServiceWorker
2016-01-07 17:58:38 +01:00
mossroy
a1793121ae
Fix merge error + minor comments improvements
2016-01-07 17:42:37 +01:00
mossroy
727c11928a
Merge branch 'master' into jquery-fallback
...
Conflicts:
service-worker.js
2016-01-07 16:55:11 +01:00
mossroy
369f8a9b0f
Fixes for jQuery/ServiceWorker switch, jQuery mode, and workaround for javascript/css content in ServiceWorker mode
2016-01-07 16:39:28 +01:00
peter-x
b4950d4570
Fix for finding some files in ZIM.
...
The namespace has to be taken into account when titles are compared.
2016-01-07 16:17:59 +01:00
Mossroy
6443e33684
Merge pull request #139 from peter-x/xzdecfix
...
Fix streaming bug in xz decompressor.
2016-01-07 16:17:24 +01:00
Mossroy
6fbfb7254c
Merge pull request #134 from peter-x/binaries
...
Reading binary files.
2016-01-07 16:14:35 +01:00
peter-x
79dbcbf3b1
Tests.
2016-01-07 16:08:46 +01:00
peter-x
b679948db9
Fix streaming bug in xz decompressor.
...
The problem was that in some cases, the input was already read in too
far, so we just re-start the decompressor for each read (the full
contents of a file are read in one go anyway).
2016-01-07 16:08:37 +01:00
mossroy
a4feca9930
In jQuery mode, display images, javascript and CSS dependencies.
...
Images seem to work fine. I could not test JS and CSS for now
See #136
2016-01-06 18:39:40 +01:00
peter-x
6f05a76c66
Fixed typos and added some documentation.
2016-01-06 16:54:55 +01:00
mossroy
8c186867e9
Oups, revert last commit
2016-01-06 16:33:17 +01:00
mossroy
f9ccc51145
Improve the way we start the ServiceWorker, and allow the user to choose between jQuery and ServiceWorker modes.
...
If the user chooses the jQuery mode, we have to disable the ServiceWorker.
It's a first step for #136
2016-01-06 16:29:24 +01:00
mossroy
93cc3dcdfd
Temporary workaround to make it work on Firefox.
...
The original issue is still there : javascript and css dependencies get binary content (a small PNG image)
2016-01-05 23:23:20 +01:00
mossroy
c2bb788974
Merge branch 'binaries' of https://github.com/peter-x/evopedia-html5
...
into peter-x-binaries
2016-01-05 22:53:30 +01:00
mossroy
8a0748597a
Minor fixes to avoid warnings in the browser
2016-01-05 22:43:08 +01:00
peter-x
f16b44f1d3
Fix tests: Use promise and actually check the image.
2016-01-05 18:59:54 +01:00
peter-x
72e4da5e02
Reading binary files.
...
Support for reading binary files and some cleanup regarding the move
from manual callbacks to promises.
2016-01-05 18:33:00 +01:00
mossroy
7bb77c8e36
Avoid the need to manually select Evopedia and ZIM test files to run unit tests.
...
It should help to automate unit testing in #119
2016-01-04 19:42:05 +01:00
mossroy
15a4c04e62
"Claim" the Service Worker as soon as it is activated, so that it can
...
be triggered right away (without the need to reload the page or app).
Fixes #129
2016-01-04 11:39:28 +01:00
mossroy
4bcf287835
Fix in the service worker that was hanging in Firefox OS on many pages.
...
It seems that Firefox OS is disturbed when it has a reject or no answer
on some HTTP requests, where Firefox desktop and Chromium simply ignore
that.
This fix sends a dummy content on javascript requests, which allows
Firefox OS to display at least some articles of the Ray Charles file.
But some articles still can't be read, probably because of some other
missing dependencies.
2015-11-30 21:30:54 +01:00