mirror of
https://github.com/kiwix/kiwix-js-pwa.git
synced 2025-09-16 07:46:58 -04:00
Bin
Former-commit-id: 9c9b8290620189e762735f3a619ed5713b29f35b [formerly 0a06732f22043a99542369d60bd1d9c6e874ec5c] Former-commit-id: cb5a94283282fba34ce20605e99c90e38d8a04e2
This commit is contained in:
parent
7911274a83
commit
6f93d6522a
@ -42,18 +42,23 @@
|
||||
</uap:InitialRotationPreference>
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<uap:Extension Category="windows.fileSavePicker">
|
||||
<uap:FileSavePicker>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap:FileTypeAssociation Name="zimarchive">
|
||||
<uap:DisplayName>ZIM Archive</uap:DisplayName>
|
||||
<uap:InfoTip>Compressed ZIM FIle Archive</uap:InfoTip>
|
||||
<uap:EditFlags OpenIsSafe="true" />
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:SupportsAnyFileType />
|
||||
<uap:FileType ContentType="application/zlib">.zim</uap:FileType>
|
||||
<uap:FileType ContentType="application/zlib">.zimaa</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
</uap:FileSavePicker>
|
||||
</uap:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="removableStorage" />
|
||||
<DeviceCapability Name="location" />
|
||||
</Capabilities>
|
||||
<build:Metadata>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<WindowsSdkPath>
|
||||
</WindowsSdkPath>
|
||||
<LayoutDir>C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\AppX</LayoutDir>
|
||||
<RegisteredManifestChecksum>7133B2376A3D682BE4A070D95772B739036E7588AC0E40E35C9BE51F78EC05FA</RegisteredManifestChecksum>
|
||||
<RegisteredManifestChecksum>C16D189268AC138A7AEBC32F9392907DA8637CE76181AB56C8491D20A2C867E6</RegisteredManifestChecksum>
|
||||
<RegisteredPackageMoniker>Kiwix.KiwixJS_0.8.5.0_neutral__zfxmafgedzx24</RegisteredPackageMoniker>
|
||||
<RegisteredUserModeAppID>Kiwix.KiwixJS_zfxmafgedzx24!App</RegisteredUserModeAppID>
|
||||
<RegisteredPackageID>Kiwix.KiwixJS</RegisteredPackageID>
|
||||
@ -32,7 +32,7 @@
|
||||
<AppXManifest Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\AppxManifest.xml">
|
||||
<PackagePath>AppxManifest.xml</PackagePath>
|
||||
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
||||
<Modified>2017-08-29T20:23:58.885</Modified>
|
||||
<Modified>2017-08-31T08:59:50.612</Modified>
|
||||
</AppXManifest>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -443,7 +443,7 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\-\s\style-dark.css">
|
||||
<PackagePath>www\-\s\style-dark.css</PackagePath>
|
||||
<Modified>2017-08-29T09:15:58.010</Modified>
|
||||
<Modified>2017-08-30T09:26:05.357</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\-\s\style-mobile.css">
|
||||
<PackagePath>www\-\s\style-mobile.css</PackagePath>
|
||||
@ -459,7 +459,7 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\css\app.css">
|
||||
<PackagePath>www\css\app.css</PackagePath>
|
||||
<Modified>2017-08-28T08:44:06.601</Modified>
|
||||
<Modified>2017-08-30T11:50:47.343</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\css\bootstrap-theme.css">
|
||||
<PackagePath>www\css\bootstrap-theme.css</PackagePath>
|
||||
@ -475,7 +475,7 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\index.html">
|
||||
<PackagePath>www\index.html</PackagePath>
|
||||
<Modified>2017-08-28T21:07:55.171</Modified>
|
||||
<Modified>2017-08-31T07:17:36.471</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\favicon.ico">
|
||||
<PackagePath>www\favicon.ico</PackagePath>
|
||||
@ -603,11 +603,11 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\app.js">
|
||||
<PackagePath>www\js\app.js</PackagePath>
|
||||
<Modified>2017-08-29T20:23:38.899</Modified>
|
||||
<Modified>2017-08-30T21:02:22.332</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\init.js">
|
||||
<PackagePath>www\js\init.js</PackagePath>
|
||||
<Modified>2017-08-27T09:54:13.405</Modified>
|
||||
<Modified>2017-08-30T12:47:38.487</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\lib\abstractFilesystemAccess.js">
|
||||
<PackagePath>www\js\lib\abstractFilesystemAccess.js</PackagePath>
|
||||
@ -647,7 +647,7 @@
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\lib\util.js">
|
||||
<PackagePath>www\js\lib\util.js</PackagePath>
|
||||
<Modified>2017-08-25T14:07:25.494</Modified>
|
||||
<Modified>2017-08-31T08:59:39.629</Modified>
|
||||
</AppxPackagedFile>
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\www\js\lib\xzdec.js">
|
||||
<PackagePath>www\js\lib\xzdec.js</PackagePath>
|
||||
@ -1528,7 +1528,7 @@
|
||||
<AppxPackagedFile Include="C:\Users\geoff\Source\Repos\kiwix-js-windows\bin\Release\ReverseMap\resources.pri">
|
||||
<PackagePath>resources.pri</PackagePath>
|
||||
<ReRegisterAppIfChanged>true</ReRegisterAppIfChanged>
|
||||
<Modified>2017-08-29T20:20:27.135</Modified>
|
||||
<Modified>2017-08-31T07:00:06.005</Modified>
|
||||
</AppxPackagedFile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -14,15 +14,14 @@
|
||||
*/
|
||||
|
||||
/* transparent background */
|
||||
div, span:not(.legend-color):not([class*="wikEd"]):not([style*="background"]), .MainPageBG, .navbox-list,
|
||||
div#mw-head, .mw-wsmfinal-content, #bodyContent, .referencetooltip > li + li,
|
||||
div.vectorTabs ul li, tr[style*="background:#F5FFFA"],
|
||||
th[style*="background-color: #fff"], .mw-echo-notifications-badge,
|
||||
.ext-cards-card-list .ext-cards-card, .infobox span.plainlinks *,
|
||||
.tracklist
|
||||
{
|
||||
div, span:not(.legend-color):not([class*="wikEd"]):not([style*="background"]), .MainPageBG, .navbox-list,
|
||||
div#mw-head, .mw-wsmfinal-content, #bodyContent, .referencetooltip > li + li,
|
||||
div.vectorTabs ul li, tr[style*="background:#F5FFFA"],
|
||||
th[style*="background-color: #fff"], .mw-echo-notifications-badge,
|
||||
.ext-cards-card-list .ext-cards-card, .infobox span.plainlinks *,
|
||||
.tracklist, p[style*="background"] {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*** Overall ***/
|
||||
td:not([style*="background"]), p, li, th:not([style*="background"]), caption, div,
|
||||
@ -133,13 +132,12 @@ html, body {
|
||||
color: #b9b9b9 !important;
|
||||
}
|
||||
|
||||
td[style*="background:#FFFFFF"], .jfk-bubble, .navpopup, div span[style*="background-color:#FFFF"]
|
||||
{
|
||||
td[style*="background"], .jfk-bubble, .navpopup, div span[style*="background-color:#FFFF"] {
|
||||
background-color: #181818 !important;
|
||||
}
|
||||
|
||||
table, input, button, select, textarea:not([class*="mw-editfont"]),
|
||||
tr[style*="background: antiquewhite;"], #toc, td[style*="background-color"], td[style*="background:#F5FAFF"], td[style*="background:#F8"],
|
||||
tr[style*="background: antiquewhite"], tr[style*="background-color:#ee"], tr[style*="background-color:#ff"], tr[style*="background-color:#FF"], #toc, td[style*="background-color"], td[style*="background:#F5FAFF"], td[style*="background:#F8"],
|
||||
td[style*="background:WhiteSmoke"], td[style*="background:GhostWhite"], td[style*="background:#f5"], #mw-content-text div[style*="background: #"], .vevent td, .referencetooltip li, .suggestions,
|
||||
.mw-ui-button[style*="background"], .mw-ui-button[style*="background"] *, .wikiEditor-ui,
|
||||
table.navbox.collapsible tr:nth-child(2) > td, div.menu, .oo-ui-popupWidget-popup,
|
||||
@ -148,6 +146,10 @@ table.navbox.collapsible tr:nth-child(2) > td, div.menu, .oo-ui-popupWidget-popu
|
||||
background-color: #222 !important;
|
||||
}
|
||||
|
||||
#hauptseite > table {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.navbox th, .climate-table th, .wikitable th, .navbox-title, th[bgcolor], td[bgcolor], th[style*="background"] {
|
||||
background-color: darkslategray !important;
|
||||
border-color: #555 !important;
|
||||
|
@ -209,7 +209,7 @@ footer .glyphicon {
|
||||
background-color: darkslategray !important;
|
||||
}
|
||||
|
||||
.dark .btn-default, .dark .input-group-addon {
|
||||
.dark .btn-default, .dark .input-group-addon, .dark pre {
|
||||
background: #222 !important;
|
||||
color: lightgray !important;
|
||||
text-shadow: none;
|
||||
|
@ -165,7 +165,7 @@
|
||||
from <a href="http://download.kiwix.org/zim" target="_blank">http://download.kiwix.org/zim/</a>, with a regular computer.
|
||||
<strong>Currently only Wikimedia contents (ZIM files in wiki* subdirectories, for instance <a href="http://download.kiwix.org/zim/wikipedia/" target="_blank">http://download.kiwix.org/zim/wikipedia/</a>) have been tested</strong>.
|
||||
There are known bugs when reading other contents; and audio/video/dynamic contents are not supported for now.
|
||||
<br />For a quick test, you can start with the <a href="http://download.kiwix.org/zim/wikipedia/wikipedia_en_ray_charles_2015-06.zim" target="_blank">"Ray Charles" ZIM file</a> : it contains some wikipedia articles about Ray Charles.
|
||||
<br />For a quick test, you can start with the <a href="http://download.kiwix.org/zim/wikipedia/wikipedia_en_ray_charles_2015-06.zim.meta4" target="_blank">"Ray Charles" ZIM file</a> : it contains some wikipedia articles about Ray Charles.
|
||||
<br />After that, you can download materials in your language. Check the size before you download files as many of the files are large (several Gigabytes).
|
||||
<br />If the file is larger than 2 GB, it might not be supported by your device if your storage is formatted using a FAT filesystem. If so, it's possible to split the material into several 2GB files : see <a href="http://www.kiwix.org/wiki/FAQ">the Kiwix FAQ</a>
|
||||
<br />
|
||||
@ -251,8 +251,11 @@
|
||||
</div>
|
||||
<div id="configuration" style="display: none;" class="category-padding">
|
||||
<div id="returntoArticle_top" style="text-align: center;"></div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<h2>Configuration</h2>
|
||||
This application needs a ZIM archive to work. If you have not downloaded one yet, please see the <a href="#" onclick="$('#btnAbout').click();">About</a> section.<br /><br />
|
||||
This application needs a ZIM archive to work. If you have not downloaded one yet, please open the <a href="#downloads">download links panel</a> or see the <a href="#" onclick="$('#btnAbout').click();">About</a> section.<br /><br />
|
||||
<div id="openLocalFiles" style="display: none;">
|
||||
If you have downloaded one single (unsplit) ZIM archive, select it with the <b>left</b> button.
|
||||
If your ZIM archive is split into multiple files (.zimaa, .zimab, etc.) or if you have more than one archive in a folder,
|
||||
@ -282,14 +285,31 @@
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><br />
|
||||
</div>
|
||||
<div id="noZIMFound" style="display: none;">
|
||||
<br /><p style="color: red;">There were no ZIM file(s) found in the selected location! Please choose a different folder.</p>
|
||||
</div>
|
||||
<h2>Display settings</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top; min-width : 16em;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="downloads" class="container">
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<h3>Download links</h3>
|
||||
<p>
|
||||
<i>Warning:</i> this requires and will use an Internet connection
|
||||
<br />Files can be very large, <b>do not attempt to download over a mobile connection!</b>
|
||||
<br /><a id="downloadTrigger" href="#">Open full list of download links</a>
|
||||
</p>
|
||||
<div id="downloadLinks" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<h3>Display settings</h3>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<div class="panel panel-info" id="cssSettingsDiv">
|
||||
<div class="panel-heading">Please select the display style:</div>
|
||||
<div class="panel-body">
|
||||
@ -333,14 +353,14 @@
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="returntoArticle_bottom" style="text-align: center;"></div>
|
||||
<h2>Expert settings</h2>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="vertical-align:top; min-width : 16em;">
|
||||
<div class="container">
|
||||
<h3>Expert settings</h3>
|
||||
<div class="row">
|
||||
<div class="column">
|
||||
<div class="panel panel-warning" style="min-width: 16em" id="mathsProcessingMode">
|
||||
<div class="panel-heading">Mathematical and chemical equations and symbols:</div>
|
||||
<div class="panel-body">
|
||||
@ -370,9 +390,9 @@
|
||||
</div>
|
||||
<div id="serviceWorkerStatus"></div>
|
||||
<div id="messageChannelStatus"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
@ -392,7 +412,7 @@
|
||||
<div id="progressMessage"><p></p></div>
|
||||
</div>
|
||||
<iframe id="articleContent" src="A/dummyArticle.html" class="articleIFrame"> </iframe>
|
||||
</article>
|
||||
</article>
|
||||
<footer id="footer">
|
||||
<div id="navigationButtons" class="btn-toolbar">
|
||||
<!-- We need to restrict the size of this navbar,
|
||||
|
@ -327,6 +327,7 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
|
||||
$("#articleContent").hide();
|
||||
$('#articleContent').hide();
|
||||
$('#searchingForArticles').hide();
|
||||
$('#downloadLinks').hide();
|
||||
refreshAPIStatus();
|
||||
//If user hadn't previously picked a folder or a file, resort to the local storage folder (UWP functionality)
|
||||
if (params.localStorage && !params.pickedFolder && !params.pickedFile) {
|
||||
@ -397,9 +398,9 @@ define(['jquery', 'zimArchiveLoader', 'util', 'uiUtil', 'cookies', 'abstractFile
|
||||
//@TODO hide folderpicker
|
||||
}
|
||||
});
|
||||
//Legacy logic : replace with above sections
|
||||
//$('#archiveFile').on('change', setLocalArchiveFromFileSelect);
|
||||
|
||||
document.getElementById('downloadTrigger').addEventListener('click', function () {
|
||||
util.requestDownloadLinks(params.kiwixDownloadLink);
|
||||
});
|
||||
|
||||
$('input:radio[name=contentInjectionMode]').on('change', function (e) {
|
||||
if (checkWarnServiceWorkerMode(this.value)) {
|
||||
|
@ -24,6 +24,7 @@
|
||||
var params = {};
|
||||
params['version'] = "0.8.2 Beta"; //DEV: do not set this dynamically -- it is compared to the cookie "version" in order to show first-time info, and the cookie is updated in app.js
|
||||
params['storedFile'] = getCookie('lastSelectedArchive') || "wikipedia_en_ray_charles_2015-06.zimaa"; //For packaged Kiwix JS (e.g. with Wikivoyage file), set this to the filename (for split files, give the first chunk *.zimaa) and place file(s) in default storage
|
||||
params['kiwixDownloadLink'] = "http://download.kiwix.org/zim/"; //Include final slash
|
||||
|
||||
params['results'] = params['results'] || 15; //Number of search results to display
|
||||
params['relativeFontSize'] = ~~(getCookie('relativeFontSize') || "100"); //Sets the initial font size for articles (as a percentage) - user can adjust using zoom buttons
|
||||
|
@ -694,6 +694,84 @@ define(['q'], function(q) {
|
||||
|
||||
}
|
||||
|
||||
function requestDownloadLinks(URL) {
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
var doc = this.responseText;
|
||||
var downloadLinks = document.getElementById('downloadLinks');
|
||||
if (/\.meta4$/i.test(URL)) {
|
||||
//It's the metalink with download links
|
||||
var linkArray = doc.match(/<url\b[^>]*>[^<]*<\/url>/ig);
|
||||
var size = doc.match(/<size>(\d+)<\/size>/i);
|
||||
//Filter value (add commas if required)
|
||||
size = size.length ? size[1] : "";
|
||||
var megabytes = size ? Math.round(size * 10 / (1024 * 1024)) / 10 : size;
|
||||
//Use the lookbehind reversal trick to add commas....
|
||||
size = size.toString().split('').reverse().join('').replace(/(\d{3}(?!.*\.|$))/g, '$1,').split('').reverse().join('');
|
||||
doc = "";
|
||||
//NB we'ere intentionally discarding first link to kiwix.org (not to zim)
|
||||
var mirrorservice = false;
|
||||
for (var i = 1; i < linkArray.length; i++) {
|
||||
if (/mirrorservice\.org/i.test(linkArray[i])) {
|
||||
mirrorservice = true;
|
||||
doc += linkArray[i].replace(/<url\b[^>]*>([^<]*)<\/url>/i, '<li>*** Server has download bug, see note ***<br />$1</li>\r\n');
|
||||
} else {
|
||||
doc += linkArray[i].replace(/<url\b[^>]*>([^<]*)<\/url>/i, '<li><a href="$1" target="_blank">$1</a></li>\r\n');
|
||||
}
|
||||
}
|
||||
var fullDoc = '<div class="panel panel-body" style="overflow-y: auto;">\r\n<h4>We found the following links to your file</h4>\r\n<h5';
|
||||
if (megabytes > 200) fullDoc += ' style="color:red;"';
|
||||
fullDoc += '>WARNING: file size is <b>' + (megabytes ? megabytes + 'Mb' : 'unnown') + '</b>' + (size ? ' (' + size + ' bytes)' : '') + '</h5>\r\n';
|
||||
if (megabytes > 200) fullDoc += '<b>Consider using a torrent download method: see <a href="#" onclick="$(\'#btnAbout\').click();">About</a> section</b>\r\n';
|
||||
fullDoc += '<p><i>Links will open in a new browser window</i></p><ol>\r\n' + doc + '</ol>\r\n';
|
||||
if (mirrorservice) fullDoc += '*** Note: mirrorservice.org currently has a download bug with ZIM archives: on some browsers it will download the ZIM file as plain text in browser window<br /><br />';
|
||||
fullDoc += '<a id="returnLink" href="#" data-kiwix-dl="' + URL.replace(/\/[^\/]*\.meta4$/i, "\/") +'"><< Back to list of files</a></pre>';
|
||||
downloadLinks.innerHTML = fullDoc;
|
||||
document.getElementById('returnLink').addEventListener('click', function (e) {
|
||||
requestDownloadLinks(this.dataset.kiwixDl);
|
||||
});
|
||||
return;
|
||||
}
|
||||
//Remove images
|
||||
var doc = doc.replace(/<img\b[^>]*>\s*/ig, "");
|
||||
//Reduce size of header
|
||||
doc = doc.replace(/<h1\b([^>]*>[^<]*<\/)h1>/ig, "<h3$1h3>");
|
||||
//Limit height of pre box and prevent word wrapping
|
||||
doc = doc.replace(/<pre>/i, '<div class="panel panel-success"><pre class="panel-heading">$#$#</pre>\r\n<pre class="panel panel-body" style="max-height:360px; word-wrap:normal; margin-bottom:10px;">');
|
||||
//Remove hr at end of page and add extra </div>
|
||||
doc = doc.replace(/<hr\b[^>]*>(\s*<\/pre>)/i, "$1</div>");
|
||||
//Move header into panel-header (NB regex is deliberately redundant to increase specificity of search)
|
||||
doc = doc.replace(/\$\#\$\#([\s\S]+?)(<a\s+href[^>]+>name<[\s\S]+?last\s+modified<[\s\S]+?)<hr>\s*/i, "$2$1");
|
||||
if (/\dK|\dM|\dG/.test(doc)) {
|
||||
//Swap size and date fields to make file size more prominent on narrow screens
|
||||
doc = doc.replace(/(<a\b[^>]*>last\s+modified<\/a>)(\s+)(<a\b[^>]*>size<\/a>)/ig, "$3$2$1");
|
||||
doc = doc.replace(/(\d\d-\w{3}-\d{4}\s\d\d\:\d\d)(\s+)(\d[\d.\w]+)\s+$/img, "$3$2$1");
|
||||
}
|
||||
downloadLinks.innerHTML = doc;
|
||||
var links = downloadLinks.getElementsByTagName("a");
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
//Store the href - seems it's not useful?
|
||||
//links[i].setAttribute("data-kiwix-dl", links[i].href);
|
||||
links[i].href = "#";
|
||||
links[i].addEventListener('click', function (e) {
|
||||
var replaceURL = URL + this.text;
|
||||
if (/\.zim$/i.test(this.text))
|
||||
replaceURL = replaceURL + ".meta4";
|
||||
if (/parent\s*directory/i.test(this.text))
|
||||
replaceURL = URL.replace(/\/[^\/]*\/$/i, "\/");
|
||||
requestDownloadLinks(replaceURL);
|
||||
});
|
||||
}
|
||||
//Toggle display of download panel -- bug: causes whole div to close if clicking on a link...
|
||||
//downloadLinks.style.display = downloadLinks.style.display == "none" ? "inline" : "none";
|
||||
downloadLinks.style.display = "inline";
|
||||
}
|
||||
};
|
||||
xhttp.open("GET", URL, true);
|
||||
xhttp.send();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Functions and classes exposed by this module
|
||||
@ -717,6 +795,7 @@ define(['q'], function(q) {
|
||||
leftShift: leftShift,
|
||||
matchOuter: matchOuter,
|
||||
matchInner: matchInner,
|
||||
Hilitor: Hilitor
|
||||
Hilitor: Hilitor,
|
||||
requestDownloadLinks: requestDownloadLinks
|
||||
};
|
||||
});
|
||||
|
@ -42,18 +42,23 @@
|
||||
</uap:InitialRotationPreference>
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<uap:Extension Category="windows.fileSavePicker">
|
||||
<uap:FileSavePicker>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap:FileTypeAssociation Name="zimarchive">
|
||||
<uap:DisplayName>ZIM Archive</uap:DisplayName>
|
||||
<uap:InfoTip>Compressed ZIM FIle Archive</uap:InfoTip>
|
||||
<uap:EditFlags OpenIsSafe="true" />
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:SupportsAnyFileType />
|
||||
<uap:FileType ContentType="application/zlib">.zim</uap:FileType>
|
||||
<uap:FileType ContentType="application/zlib">.zimaa</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
</uap:FileSavePicker>
|
||||
</uap:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="removableStorage" />
|
||||
<DeviceCapability Name="location" />
|
||||
</Capabilities>
|
||||
<build:Metadata>
|
||||
|
@ -14,15 +14,14 @@
|
||||
*/
|
||||
|
||||
/* transparent background */
|
||||
div, span:not(.legend-color):not([class*="wikEd"]):not([style*="background"]), .MainPageBG, .navbox-list,
|
||||
div#mw-head, .mw-wsmfinal-content, #bodyContent, .referencetooltip > li + li,
|
||||
div.vectorTabs ul li, tr[style*="background:#F5FFFA"],
|
||||
th[style*="background-color: #fff"], .mw-echo-notifications-badge,
|
||||
.ext-cards-card-list .ext-cards-card, .infobox span.plainlinks *,
|
||||
.tracklist
|
||||
{
|
||||
div, span:not(.legend-color):not([class*="wikEd"]):not([style*="background"]), .MainPageBG, .navbox-list,
|
||||
div#mw-head, .mw-wsmfinal-content, #bodyContent, .referencetooltip > li + li,
|
||||
div.vectorTabs ul li, tr[style*="background:#F5FFFA"],
|
||||
th[style*="background-color: #fff"], .mw-echo-notifications-badge,
|
||||
.ext-cards-card-list .ext-cards-card, .infobox span.plainlinks *,
|
||||
.tracklist, p[style*="background"] {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*** Overall ***/
|
||||
td:not([style*="background"]), p, li, th:not([style*="background"]), caption, div,
|
||||
@ -133,13 +132,12 @@ html, body {
|
||||
color: #b9b9b9 !important;
|
||||
}
|
||||
|
||||
td[style*="background:#FFFFFF"], .jfk-bubble, .navpopup, div span[style*="background-color:#FFFF"]
|
||||
{
|
||||
td[style*="background"], .jfk-bubble, .navpopup, div span[style*="background-color:#FFFF"] {
|
||||
background-color: #181818 !important;
|
||||
}
|
||||
|
||||
table, input, button, select, textarea:not([class*="mw-editfont"]),
|
||||
tr[style*="background: antiquewhite;"], #toc, td[style*="background-color"], td[style*="background:#F5FAFF"], td[style*="background:#F8"],
|
||||
tr[style*="background: antiquewhite"], tr[style*="background-color:#ee"], tr[style*="background-color:#ff"], tr[style*="background-color:#FF"], #toc, td[style*="background-color"], td[style*="background:#F5FAFF"], td[style*="background:#F8"],
|
||||
td[style*="background:WhiteSmoke"], td[style*="background:GhostWhite"], td[style*="background:#f5"], #mw-content-text div[style*="background: #"], .vevent td, .referencetooltip li, .suggestions,
|
||||
.mw-ui-button[style*="background"], .mw-ui-button[style*="background"] *, .wikiEditor-ui,
|
||||
table.navbox.collapsible tr:nth-child(2) > td, div.menu, .oo-ui-popupWidget-popup,
|
||||
@ -148,6 +146,10 @@ table.navbox.collapsible tr:nth-child(2) > td, div.menu, .oo-ui-popupWidget-popu
|
||||
background-color: #222 !important;
|
||||
}
|
||||
|
||||
#hauptseite > table {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.navbox th, .climate-table th, .wikitable th, .navbox-title, th[bgcolor], td[bgcolor], th[style*="background"] {
|
||||
background-color: darkslategray !important;
|
||||
border-color: #555 !important;
|
||||
|
@ -209,7 +209,7 @@ footer .glyphicon {
|
||||
background-color: darkslategray !important;
|
||||
}
|
||||
|
||||
.dark .btn-default, .dark .input-group-addon {
|
||||
.dark .btn-default, .dark .input-group-addon, .dark pre {
|
||||
background: #222 !important;
|
||||
color: lightgray !important;
|
||||
text-shadow: none;
|
||||
|
@ -35,18 +35,23 @@
|
||||
</uap:InitialRotationPreference>
|
||||
</uap:VisualElements>
|
||||
<Extensions>
|
||||
<uap:Extension Category="windows.fileSavePicker">
|
||||
<uap:FileSavePicker>
|
||||
<uap:Extension Category="windows.fileTypeAssociation">
|
||||
<uap:FileTypeAssociation Name="zimarchive">
|
||||
<uap:DisplayName>ZIM Archive</uap:DisplayName>
|
||||
<uap:InfoTip>Compressed ZIM FIle Archive</uap:InfoTip>
|
||||
<uap:EditFlags OpenIsSafe="true" />
|
||||
<uap:SupportedFileTypes>
|
||||
<uap:SupportsAnyFileType />
|
||||
<uap:FileType ContentType="application/zlib">.zim</uap:FileType>
|
||||
<uap:FileType ContentType="application/zlib">.zimaa</uap:FileType>
|
||||
</uap:SupportedFileTypes>
|
||||
</uap:FileSavePicker>
|
||||
</uap:FileTypeAssociation>
|
||||
</uap:Extension>
|
||||
</Extensions>
|
||||
</Application>
|
||||
</Applications>
|
||||
<Capabilities>
|
||||
<Capability Name="internetClient" />
|
||||
<uap:Capability Name="removableStorage" />
|
||||
<DeviceCapability Name="location" />
|
||||
</Capabilities>
|
||||
</Package>
|
Loading…
x
Reference in New Issue
Block a user