517 Commits

Author SHA1 Message Date
Mossroy
bc263ceebd Merge pull request #168 from kiwix/issue141
The random article feature must not display titles with a namespace!=A
2016-06-15 16:44:29 +02:00
mossroy
eb0a6d39ab Initial work on #113 (handle splitted ZIM files).
It basically works on desktop, but not yet with DeviceStorage.
To be done :
- handle DeviceStorage
- fix for the case where the content is splitted into 2 (or more) files
2016-05-10 23:17:53 +02:00
mossroy
56d31f43d6 Minor update of README. 2016-04-29 22:47:34 +02:00
mossroy
f60155ef9e Add explanations in README on how to use the app in this beta state.
On a Firefox OS device (without the Marketplace)
And on a standard desktop browser
2016-04-29 22:39:42 +02:00
mossroy
ef269f1e84 Add warnings if the users selects the Service Worker mode.
It's still unstable for now (see #145).
If the user confirms he wants to use this mode, a cookie is set, so that he
is not warned again in the next 24 hours
2016-04-29 17:09:45 +02:00
mossroy
344c84deef Fix in the redirection algorithm, that was leading to the wrong article.
The redirection algorithm was considering the redirectTarget as a TitleIndex
instead of a UrlIndex.
That was sometimes causing some infinite loops, and often opened the wrong
article when clicking on a link.

Fixes #106
Fixes #133
2016-04-29 14:36:39 +02:00
mossroy
59ec612b40 The random article feature must not display titles with a namespace!=A.
When randomly selecting a title, we could end up on a content with any namespace
For example images, javascript, CSS etc.
Now, if this happens, we randomly select another title, until we find a content
with namespace 'A' (i.e an article)
2016-04-29 13:47:07 +02:00
mossroy
f6ad260867 Add unit test for "America, the Beautiful" article redirection.
The expected redirection behavior is described on #106
2016-04-29 08:59:56 +02:00
mossroy
0c2f340029 Merge branch 'unit-tests-on-redirection-issues' of github.com:kiwix/kiwix-html5 2016-04-29 08:46:21 +02:00
mossroy
cff5461f52 Fix a bug in unit tests, that appeared with recent versions of browsers.
Recent versions of Firefox and Chromium did not like the way I was
trying to find the webworker_bzip2.js file in 2 different possible locations
(because the path is slightly different when running from a unit test)
I changed this hack by another one : use a global variable that stores the
prefix of this path, with a different value in a unit test.
There should be a better way to do that, but this is only needed for legacy
Evopedia archives. So it's not worth spending too much time on things that
are now discontinued.
2016-04-27 22:44:11 +02:00
mossroy
e8c87980a0 Upgrade QUnit to 1.23.1 instead of 1.20.0 2016-04-27 22:02:50 +02:00
Mossroy
e5f4ae0b13 Merge pull request #167 from kiwix/issue156-empty-articles-on-big-ZIM
Fix integer computation on ZIM backend to make it work on big ZIM files.
2016-02-24 15:56:16 +01:00
mossroy
263b4ef96c Add unit tests for 2 redirection issues : #133 and #106
These unit tests are currently failing, and might help solving the issue(s) underneath
2016-02-08 22:15:47 +01:00
mossroy
c8bb00c69c Fix integer computation on ZIM backend to make it work on big ZIM files.
Fixes #156
The performance can probably be optimized
2016-02-08 21:35:34 +01:00
Mossroy
9c3d960ba0 Merge pull request #164 from kiwix/issue154-rebranding-kiwix
Initial rebranding to kiwix
2016-01-19 14:11:57 +01:00
Mossroy
2a22d05cf9 Typos and carriage returns in README 2016-01-19 14:11:02 +01:00
Mossroy
ecf884dd53 Minor changes in index.html
See comments from #164
2016-01-19 14:06:52 +01:00
Mossroy
ee0a7e4689 Minor changes in README.md
See comments in #164
2016-01-19 14:02:50 +01:00
mossroy
01cd610ecd Change the branding for HTML files and README
See #154
2016-01-16 17:27:14 +01:00
mossroy
ce73e555ec Merge branch 'master' into issue154-rebranding-kiwix 2016-01-16 15:42:09 +01:00
Mossroy
24ad30409c Merge pull request #162 from kiwix/issue161-remove-base64-images-to-reduce-memory-consumption
Fix big memory overhead due to Base64 encoding of images in src attribute, in jQuery mode
2016-01-16 15:40:57 +01:00
mossroy
8e5f062d12 Re-apply fix for CSS content on Firefox OS. See #144
I certainly reverted it by mistake in a previous merge.
2016-01-16 15:39:29 +01:00
mossroy
a50d27b997 Actually remove the utility functions that have been moved to uiUtil.js
I forgot that in previous commit.
2016-01-16 15:29:45 +01:00
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
13ebd51260 Initial rebranding from Evopedia to Kiwix (#154).
The About section still needs to be modified, and many other things.
2016-01-11 16:27:04 +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